-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Computer #6
Comments
linux 高速下载工具 aria2 的用法2014年12月28日 22:44:01 aria2下载工具特点: 1、支持http/https/ftp/bt协议 注:aria有gtk界面,但aria2只有命令行版本。 典型用法: 注:https下载依赖于安装gnutls或openssl bt下载依赖于安装gnutls+libgcrypt或openssl metalink下载依赖于安装libxml2 官方地址:http://aria2.sourceforge.net/ 命令行下多线程下载工具:axel (prozilla下载工具因安全问题不推荐使用) 图形界面下载工具:d4x wxdownload |
Kodi 添加中文插件库安装教程:下载最新的 Kodi 中文插件库安装文件,目前有两个中文插件库可以选择,分别是「Chinese Add-ons Repository - repository.xbmc-addons-chinese.zip」和「HDPFans 中文插件库 - repository.hdpfans.xbmc-addons-chinese.zip」。不同的库里面提供了不同的插件,推荐大家把这两个库都装上吧,日后想安装什么插件也方便一些。 注意文件下载回去后不要解压,如果是安装到手机/平板或电视盒上的 Kodi,请把文件拷贝到该设备中。 启动 Kodi,进入 “系统->插件”,这次要点击「从 ZIP 文件安装」,然后选择刚才下载的 zip 文件,待 Kodi 更新完毕,对应的插件库即安装完成。 再次进入 “系统->插件->从库安装”,此时便会在库列表中看到多出新安装的库了,如下图,多出的Chinese Add-ons 和 HDPfans 中文插件库就是我刚安装上去的。(最下面那个 Kodi Add-on repository 是 Kodi 官方自带的英文插件库)。 |
Kodi 设置成中文界面的方法 (解决显示乱码问题)默认情况下,新安装好的 Kodi 启动后是英文版的界面。但事实上,Kodi 包含多国语言 (包含简繁体中文版),我们可以设置改回简体中文界面。不过,很多人都遇到修改 Kodi 的语言为中文之后整个界面显示乱码的问题,正确的设置方法如下: 启动 Kodi,进入 System -> Settings -> Appearance -> Skin,将其中的 Fonts 修改成 Arial Based (这是必须的,也是第一步首先要做的步骤,否则就会显示乱码) 然后再进入 System -> Settings -> International -> Language,选择 Chinese (Simple) 确定 进入 系统->设置->视频->字幕 “首选字幕语言” 以及“下载字幕语言”均选择 Chinese (Simple) |
Kodi 怎样添加本机和网络上的电影(视频)、音乐、图片目录?Kodi 可以添加本机的文件夹,也可以将局域网中其他电脑 / NAS 中的共享文件夹添加进来。也就是说,你可以非常方便地在客厅的 Kodi 中播放寝室电脑里或 NAS 中下载好的电影视频!加上 Kodi 支持各种平台,因此,你可以选用「安卓机顶盒」、「树莓派」、「Mac Mini」、笔记本或组装一台小型 Windows 电脑 (HTPC 迷你主机) 放在客厅用来做专用播放机。 添加视频源的方法如下:依次点击 视频 -> 文件 -> 添加视频... -> 浏览,可以看到你可以添加本机硬盘的目录,也能添加 SMB (Windows共享) 和 NFS (Mac 或 Linux 使用的共享协议) 的网络路径,在“添加网络位置...”选项里还能添加 HTTP、FTP、WebDAV 等网络路径。 |
OSMC 远程桌面连接方法没有显示器,而新在树莓派上安装的OSMC又得配置,就按照linux中使用xrdp配置远程桌面,但是远程能够登陆成功,死活无法进桌面。 On OSMC, prepare using the following
贴出来,让同样使用树莓派的朋友少走弯路 |
树莓派 3b OSMC VNC 远程桌面 dispmanx_vncdispmanx_vnc参考: 在Raspberry pi上安装vnc服务器 想拿树莓派3b+做个电视盒子,但是手头没有现成HDMI显示器,想到既然是linux系统那么安装个VNC吧,就install tightvncserver 结果不行,显示灰屏~然后去网上找资料,发现并未有相关文章,我就跑到OSMC官方论坛里搜索了一下,结果还真找到了,所以,我就整理下,发在此处。 一、使用SSH连接: 将刷好OSMC系统的TF卡插入树莓派后,系统将会进行初始化,这个时间大概需要五分钟以上,所以可以用ping命令监控系统是否已正常启动,SSH默认是开启的,所以只要系统正常启动就可以使用SSH连接了,默认用户名:osmc,密码:osmc。 二、安装依赖包:
三、要将vnc服务器添加为服务,创建一个基本的配置文件(密码,fps等),并将服务器复制到/ bin文件夹以便于执行
我这里用的是VI编辑器,你也可以用nano,然后将下面的代码粘贴到编辑器里
按ESC键,然后输入:wq保存所做的更改并退出vi。 注意: port:设置端口号 fullscreen:全屏设置,就我的经验来说就算设置成true,分辨率还是很小 multi-threaded:多线程设置 password:密码设置,这个一定要改成自己的,别忘了 frame-rate:刷新率 将下面的代码粘贴到编辑器里:
按ESC键,然后输入:wq保存所做的更改并退出vi。 五、启动服务并加载,当然也可以重新启动树莓派
在VNC客户端输入树莓派的IP然后再输入第三步中设置的密码后,就可以愉快的玩耍了~ |
KODI开启SSH服务安装:
启动:
停止:
查询服务启动状态:
或者
配置开机启动:
把四项都选上。 修改默认端口:
找到Port 22,然后改成相应的端口。建议先保留22端口的。后面连接成功了之后再删除22端口,保险起见。 重启服务
查看状态
用端口进行连接
连接成功之后记得把22端口去除。 注意:如果开通了ufw防火墙的要加入规则,默认端口为22。在Ubuntu下防火墙建议使用ufw进行管理,主要是方便操作。 |
Linux Netcat 命令——网络工具中的瑞士军刀 - CSDN博客Chat Server假如你想和你的朋友聊聊,有很多的软件和信息服务可以供你使用。但是,如果你没有这么奢侈的配置,比如你在计算机实验室,所有的对外的连接都是被限制的,你怎样和整天坐在隔壁房间的朋友沟通那?不要郁闷了,netcat提供了这样一种方法,你只需要创建一个Chat服务器,一个预先确定好的端口,这样子他就可以联系到你了。 Server
netcat 命令在1567端口启动了一个tcp 服务器,所有的标准输出和输入会输出到该端口。输出和输入都在此shell中展示。 Client
不管你在机器B上键入什么都会出现在机器A上。 文件传输大部分时间中,我们都在试图通过网络或者其他工具传输文件。有很多种方法,比如FTP,SCP,SMB等等,但是当你只是需要临时或者一次传输文件,真的值得浪费时间来安装配置一个软件到你的机器上嘛。假设,你想要传一个文件file.txt 从A 到B。A或者B都可以作为服务器或者客户端,以下,让A作为服务器,B为客户端。 Server
Client
这里我们创建了一个服务器在A上并且重定向netcat的输入为文件file.txt,那么当任何成功连接到该端口,netcat会发送file的文件内容。 在客户端我们重定向输出到file.txt,当B连接到A,A发送文件内容,B保存文件内容到file.txt. 没有必要创建文件源作为Server,我们也可以相反的方法使用。像下面的我们发送文件从B到A,但是服务器创建在A上,这次我们仅需要重定向netcat的输出并且重定向B的输入文件。 B作为Server Server
Client
|
树莓派SSH连接-SSH服务安装与开机自动启动1 SSH连接 SSH连接比Telnet远程桌面连接使用更为安全,已经成为行业标准。使用SSH连接树莓派,可以对树莓派进行远程控制与编程开发,在没有桌面环境的条件下使用SSH连接是非常合适的选择。 第2节和第3节中SSH服务相关的命令同样适用于Debian和Ubuntu系统。 2 树莓派SSH服务安装、检测、启动与配置 (1)SSH服务安装
(2)检查树莓派SSH服务是否开启
ssh-agent为客户端,sshd为服务器端服务,只有ssh-agent没有sshd表明SSH服务还没有开启。 (3)SSH服务开启
(4)SSH服务配置 openssh-server配置文件为“/etc/ssh/sshd_config”,可以配置SSH服务的各项参数,如端口配置,默认端口为22,可以配置为其他端口,配置后重启生效。 3 树莓派SSH服务开机自动启动 在终端命令行中启动SSH服务后,如果系统重启或关机后启动,SSH服务默认是关闭的,依然需要手动启动,为了方便可以设置SSH服务开机自动启动,打开/etc/rc.local文件,在语句exit 0之前加入:
4 SSH连接客户端软件 Windows平台SSH连接客户端软件可以使用Xshell,家庭和学校版本是免费使用的,简单易用。 |
【树莓派】树莓派新版系统SSH连接被拒绝问题处理问题描述:将全新的树莓派系统烧录,开机然后用SSH远程连接,结果SSH连接提示“connection refused”,导致连接树莓派失败。 问题原因:出现错误的原因是自 2016-11-25 官方发布的 Raspbian 系统镜像,系统默认禁用了 SSH 服务。 之前我用的是NOOBS_v2_0_0.zip,现在用了NOOBS_v2_4_0.zip,该版本下ssh默认是不能直接连的。 找了一下,官方说: As of the November 2016 release, Raspbian has the SSH server disabled by default. 报错信息如下: ssh: connect to host 192.168.21.150 port 22: Connection refused 官方的解决方案是: SSH disabled by default; can be enabled by creating a file with name "ssh" in boot partition 如果有显示器,开机后,在树莓派配置中将SSH开启即可。
但在没有显示器,首次开机需要用SSH登陆的时候,就需要在系统烧录完毕后,进入到根目录,新建一个名为ssh的空白文件就行了。 完成后再将SD卡插回树莓派,就可以正常使用SSH了。 对于windows用户,在驱动器根目录下使用PowerShell输入以下指令即可。
新建文本改名为ssh也是一样的效果。 完成后再将SD卡插回树莓派,就可以正常使用SSH了。 |
修改树莓派用户密码树莓派在安装系统之后都会有原始默认的用户名和密码,接下来我们可以自行修改树莓派的用户密码。 环境: 树莓派3 B型,树莓派系统:raspbian,默认的用户名:pi,默认密码:raspberry 修改用户密码:
通过以上操作,我们就可以修改用户密码以及进行用户的切换。 |
raspbian安装 firefoxWhilst the Mozilla project does not provide downloads for Firefox or Thunderbird for the Raspberry Pi that does not mean you can’t install them! The trick is knowing what the unbranded Open Source versions of these applications are called, these versions are available in the repositories of most Linux distributions including Raspbian (Jessie). The Firefox browser gets renamed Iceweasel and the Thunderbird mail client gets renamed Icedove, so once you know this installing them is quite straight forward. Obviously you need to be running either the MATE of XFCE desktop. Before downloading and installing anything we need to be running as root and it is a good idea to make sure that your system is up to date.
OR
Installing Firefox The current version of Iceweasel is 31.8 which corresponds to the last extended support release (ESR) of Firefox. Note – Unfortunately since support for Adobe Flash depends on a browser plugin that requires an x86 processor it isn’t available on the Raspberry Pi. To keep the number of installed packages to a minimum I’ve chosen not to install the recommended packages.
One installed you can start it from the application menu. It is going to seem a little slower than on a desktop PC, particularly when starting up, but given the small size and low power of the Raspberry Pi it works surprisingly well |
树莓派上安装ftp服务--vsftpd【安装】 apt-get install vsftpd 【配置】 1、配置文件路径:/etc/vsftpd.conf 2、配置用户可以写权限:write_enable=YES 3、配置uMask:local_umask=022(默认为077,该种方式不支持断点续传,修改为022) 4、禁止匿名用户登录:anonymous_enable=NO 5、限制用户访问配置以外的路径:chroot_local_user=YES(这个配置是限制全部用户的,也可以限制部分用户) 6、配置用户的Home目录:local_root=/application/search/test 7、为系统新分配一个账号:test/test 【重启服务】 service vsftpd restart 【Q&A】 1、Q:配置“chroot_local_user=YES”后,用户登录的时候会出现“500 OOPS: vsftpd: refusing to run with writable root”错误是什么原因? A:这个是2.3.5-3版本新添加的一个规则,设定了chroot限制后,用户的根目录必须是只读的,将根目录设定权限为755即可。 2、Q、配置“chroot_local_user=YES”后,用户登录的时候会出现“500 OOPS: cannot change directory”错误是什么原因? A、这个是因为用户的根目录设定的太严导致的,必须是755权限,user权限小于7的都会出现这个问题。 3、Q、按照上面说的,岂不是我不能配置一个可以写的,并且不允许用户访问根目录之外的设置了? A、不是的,可以将根目录设置为755,然后在根目录下面新建一个目录,将该目录设置为777权限,这样用户就可以在这个新建目录下活动了。 |
树莓派使用vsftpd搭建ftp服务器vsftpd配置 树莓派使用vsftpd搭建ftp服务器 sudo apt-get install vsftpd 2.修改配置 /etc/vsftpd.conf sudo vim /etc/vsftpd.conf 替换为以下内容 #若出现以下报错是,则开启一下行 vsftpd: 500 OOPS: prctl PR_SET_SECCOMP failed userlist_enable=YES ls_recurse_enable=YES 3.修改配置 /etc/vsftpd.user_list sudo vim /etc/vsftpd.user_list 将允许访问的树莓派系统用户添加进来,这里添加了1个用户 pi 4.修改配置 /etc/vsftpd.chroot_list chroot_list_enable=YES时,vsftpd.chroot_list中配置那些可以访问根目录的用户。我是管理员,所以这里会配置我用的帐号pi pi 5.修改配置 /etc/ftpuser 此配置文件是安装时vsftpd自动生成的,存放帐户黑名单,这些帐户一般是比较敏感的帐户,禁止用来做ftp登录,比如root,这里都是默认的,我没改,如果发现有些帐户不能登录,要以查查这里。 #这个目录好像是匿名登录时默认显示的目录,不过我没有开启匿名登录 sudo mkdir /var/ftp #注意这里一定不能添加w权限,否则client登录的时候会被拒绝,这里坑了很久 sudo chmod 555 /var/ftp 8.连接 使用客户端连接即可,这里推荐使用xftp客户端,简单好用 [1] http://os.51cto.com/art/201008/222036.htm |
折腾树莓派(二)使用Samba进行局域网共享安装Samba sudo apt-get samba samba-common-bin 配置Samba 修改配置文件smb.conf sudo vim /etc/samba/smb.conf 在文件最下面加上以下内容,这里设置/home/pi/Public为共享文件夹
重启Samba服务 sudo samba restart 设置文件夹权限 在Samba配置文件设置过权限后,还需要在系统中将共享文件夹的权限设置为同配置文件中相同的权限,这样才能确保其他用户正常访问及修改文件夹内容 sudo chmod -R 777 /home/pi/Public/ 配置完成后即可从局域网内其他电脑访问共享文件夹,Windows下访问目录为\IP\Folder,例如: \192.168.1.55\Public |
Linux Shell中的数组及遍历在Linux下使用shell的时候,为方便起见,偶尔会用到一下数组。数组的申明方式是:
也就是直接用圆括号包数组元素包起来,数组元素之间用空格隔开就行了。 数据的读取如下
数组的遍历用到一个取全部:
,完整示例如下:
|
Linux的chmod命令,对一个目录及其子目录所有文件添加权限对一个目录及其子目录所有文件添加权限 命令:
给予html目录下可读可写可操作权限。 或者
|
SAMBA在CentOS6上出现NT_STATUS_ACCESS_DENIED错误的解决方法NT_STATUS_ACCESS_DENIED listing * 在CENTOS上配了个SAMBA与WINDOW共享文件。 一访问共享目录就”NT_STATUS_ACCESS_DENIED listing *“ ,找了好久,发现是SELINUX阻挡了。
解决方法一: 关闭SELIUNX
SELINUX几种状态表示: enforcing:强制模式,代表 SELinux 运行中,且已经正确的开始限制 domain/type 了; 解决方法二: 更改selinux的策略 chcon -t samba_share_t 共享目录(/var/www/html) |
刷openwrt系统的路由器的选购 玩openwrt一年以来,发了一些固件,在圈内知道的明月永在的朋友也多了起来。 于是经常有朋友要求我推荐路由一个合适的路由器。故写些心得和大家分享一下openwrt路由的选购经验。 能运行openwrt系统的路由,cpu主要有三四个公司,openwrt是一个开源系统,所用的软件,包括驱动都是开源的,官方是不会采用有版权的闭源驱动。 在这方面,比不上TT和DD,后两个在官方发布的固件或者源码里可以用闭源的驱动。一般来说闭源驱动的性能、兼容性和稳定性都会好于开源驱动,有时些一些芯片甚至没有开源驱动,导致无法使用。但闭源驱动的内核几乎千年不变,所以这两个版本一直还停留在2.6内核。 AR系列cpu相对来说是对openwrt支持最好的,新旧芯片都在openwrt系统运行良好 。cpu主要有ar7240 ar9331 ar9341 ar9342 ar9344 ar7161 等。大部分芯片自带无线部分,不必要使用单独的无线芯片。ar系列的cpu主要有TPLINK 美国的netgear、国内的水星、迅捷、巴法络等公司使用较多。ar7240使用的型号主要有tp740v1-v3 ,841和941的几个较旧的机型,9331主要是tp的740v4/v5 743v2,tp841v8使用ar9341,1041v2使用ar9342 ,tp3500/3600/4300/4310以及水星的4530使用ar9344 cpu,ar9344是现在的主流cpu,性能相当不错。网件的4300就是使用这个cpu,网件的3800使用ar7161。这类芯片性能一般,但对op兼容最好。Buffalo翻译为巴法络,或者巴法罗,也是AR芯片的使用者,这个是个高档品牌,一般可以直接刷,价格当然也是高高在上的。 BRCM系列的cpu使用的较少,主要有华硕、华为一些厂家,cpu有47xx 和53xx 63xx系列,好些机型使用openwrt系统会没有无线,因为op没有无线驱动。这系统的路由主要用来玩Tomato也就是我们常说TT系统。另DD-wrt,也就里常说的DD系统,对这类芯片也支持不错。这类芯片性比ar稍强,但只有部分型号能良好 的运行openwrt固件。 另台湾 的联发科,新推出有mtk系列的cpu,主要有mt7620n和mt7620a,前者为单核,后者为接口扩展版,性能相当的不错,对op的支持不是太好,但还能勉强接受。主要是无线 驱动比较差,无线能用,但不太稳定。在脱 机下载,usb传输上,的速度比较好。这类芯片也不是首选 。 还有一个realtk吧,也就是大家所说的螃蟹芯片,这类芯片openwrt支持极差,op的官方没有可支持的源码,只看到有部分商家使用这芯片,自己定制了op系统,据说基本没有什么功能的。这类芯片暂时不要碰为好,这类芯片有一个最大的特点,就是这种路由特别便宜。 综上所述,建议大家最好选购ar芯片的路由器。bcm和mtk的其次。另大家选购路由要看以下几个方面: 闪存和内存的大小,由于国内商家为了节省成本 ,加上原厂的固件较小,所以一般原厂的闪存和内存都很小。有的固件闪存才1-2M,内存仅16M。这是不可能运行openwrt系统的。openwrt系统的最低要求是4M闪存,32M内存。如果刷我编译的固件,因为内置了很多软件,至少 得8M闪存,32M内存运行不太理想,只是能运行而以。推荐用16M闪存和64M内存。因些,如果不进行改机,我们所说的硬改,原厂的在200M以下价格的路由基本上不能刷我的固件,AR系列的型号不用改机可直接刷的大概有下面些型号,水星mw4530,TP3500/3600/4300/4310,这些路由是8M闪存,二手的价格比较便宜,网件的3800 ,是16M闪存,网件的4300是128M nand,也就相当128M闪存,nand也是闪存的一种,其实就是大家U盘中所用的很多脚的存储芯片。这种很多脚,更换和修理 起来不方便 。一明坏了,业余修理基本不可能。就算换了nand,需要重写固件,可刷nand固件的编程器至少一千以上,不是普通人能玩得起的,而一般的8脚 闪存的编程器最小的才20多元。最近网件的3800用的人相当的多,但网件的路由基本是国外的二手,硬件参差不齐,经常有听说出各种奇怪的问题。所以大家自己权衡买 什么好。另外tp的其它的低端路由可以自己买 回来 修改,花十多远钱换个闪存和内存也可以用来刷openwrt系统,不过没有usb的机型,很多功能就没法用了。tp低端的带usb的型号主要是tP743v2 tp843,这两个如果有旧货可以改改,1041v2电路板上预留了usb位置,再买一个5v的电源模块,加装上usb接口,也是一个很不错的选择,此型号用9342cpu,比9331强不少。改装可以自己动手,找附近的会修理的朋友,也可以花点小钱找人帮忙 。如果是新手,强烈建议不会轻易换内存,已经有无数的正常路由被这样焊坏了。 发烧量,如果芯片发热厉害,会导致夏天过热死机。这也是要考虑的。 天线的类型,一般来说内置天线的路由是看起来好看,但信号的收发能力远低于外置天线的路由。还有无线芯片的带宽可能也需要考虑,很旧的那些是54M,再后一点的单天线是150M的,双天线一般是300M的,多天线一般会比单天线好一些。但也不是天线越多越好,现在有部分厂商,以此为噱头,加了许多天线,把路由弄得比蜘蛛的脚还多。 建议大家在购机前,先多了解下,对比下,看看别人的评测和刷机,说了一大堆,可能由于本人的知识有限,有些错误 ,请见谅。 |
feeefee |
reveal.js
A framework for easily creating beautiful presentations using HTML. Check out the live demo. reveal.js comes with a broad range of features including nested slides, Markdown contents, PDF export, speaker notes and a JavaScript API. There's also a fully featured visual editor and platform for sharing reveal.js presentations at slides.com. Table of contents
More reading
Online EditorPresentations are written using HTML or Markdown but there's also an online editor for those of you who prefer a graphical interface. Give it a try at https://slides.com. InstructionsMarkupHere's a barebones example of a fully working reveal.js presentation: <html>
<head>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/white.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section>Slide 1</section>
<section>Slide 2</section>
</div>
</div>
<script src="js/reveal.js"></script>
<script>
Reveal.initialize();
</script>
</body>
</html> The presentation markup hierarchy needs to be <div class="reveal">
<div class="slides">
<section>Single Horizontal Slide</section>
<section>
<section>Vertical Slide 1</section>
<section>Vertical Slide 2</section>
</section>
</div>
</div> MarkdownIt's possible to write your slides using Markdown. To enable Markdown, add the This is based on data-markdown from Paul Irish modified to use marked to support GitHub Flavored Markdown. Sensitive to indentation (avoid mixing tabs and spaces) and line breaks (avoid consecutive breaks). <section data-markdown>
<textarea data-template>
## Page title
A paragraph with some text and a [link](http://hakim.se).
</textarea>
</section> External MarkdownYou can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file: the When used locally, this feature requires that reveal.js runs from a local web server. The following example customises all available options: <section data-markdown="example.md"
data-separator="^\n\n\n"
data-separator-vertical="^\n\n"
data-separator-notes="^Note:"
data-charset="iso-8859-15">
<!--
Note that Windows uses `\r\n` instead of `\n` as its linefeed character.
For a regex that supports all operating systems, use `\r?\n` instead of `\n`.
-->
</section> Element AttributesSpecial syntax (through HTML comments) is available for adding attributes to Markdown elements. This is useful for fragments, amongst other things. <section data-markdown>
<script type="text/template">
- Item 1 <!-- .element: class="fragment" data-fragment-index="2" -->
- Item 2 <!-- .element: class="fragment" data-fragment-index="1" -->
</script>
</section> Slide AttributesSpecial syntax (through HTML comments) is available for adding attributes to the slide <section data-markdown>
<script type="text/template">
<!-- .slide: data-background="#ff0000" -->
Markdown content
</script>
</section> Configuring markedWe use marked to parse Markdown. To customise marked's rendering, you can pass in options when configuring Reveal: Reveal.initialize({
// Options which are passed into marked
// See https://github.com/chjj/marked#options-1
markdown: {
smartypants: true
}
}); ConfigurationAt the end of your page you need to initialize reveal by running the following code. Note that all configuration values are optional and will default to the values specified below. Reveal.initialize({
// Display presentation control arrows
controls: true,
// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: true,
// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: 'bottom-right',
// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: 'faded',
// Display a presentation progress bar
progress: true,
// Display the page number of the current slide
slideNumber: false,
// Push each slide change to the browser history
history: false,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Enable the slide overview mode
overview: true,
// Vertical centering of slides
center: true,
// Enables touch navigation on devices with touch input
touch: true,
// Loop the presentation
loop: false,
// Change the presentation direction to be RTL
rtl: false,
// Randomizes the order of slides each time the presentation loads
shuffle: false,
// Turns fragments on and off globally
fragments: true,
// Flags whether to include the current fragment in the URL,
// so that reloading brings you to the same fragment position
fragmentInURL: false,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: false,
// Flags if we should show a help overlay when the questionmark
// key is pressed
help: true,
// Flags if speaker notes should be visible to all viewers
showNotes: false,
// Global override for autoplaying embedded media (video/audio/iframe)
// - null: Media will only autoplay if data-autoplay is present
// - true: All media will autoplay, regardless of individual setting
// - false: No media will autoplay, regardless of individual setting
autoPlayMedia: null,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: 0,
// Stop auto-sliding after user input
autoSlideStoppable: true,
// Use this method for navigation when auto-sliding
autoSlideMethod: Reveal.navigateNext,
// Specify the average time in seconds that you think you will spend
// presenting each slide. This is used to show a pacing timer in the
// speaker view
defaultTiming: 120,
// Enable slide navigation via mouse wheel
mouseWheel: false,
// Hides the address bar on mobile devices
hideAddressBar: true,
// Opens links in an iframe preview overlay
// Add `data-preview-link` and `data-preview-link="false"` to customise each link
// individually
previewLinks: false,
// Transition style
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Transition speed
transitionSpeed: 'default', // default/fast/slow
// Transition style for full page slide backgrounds
backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom
// Number of slides away from the current that are visible
viewDistance: 3,
// Parallax background image
parallaxBackgroundImage: '', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
// Parallax background size
parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px"
// Number of pixels to move the parallax background per slide
// - Calculated automatically unless specified
// - Set to 0 to disable movement along an axis
parallaxBackgroundHorizontal: null,
parallaxBackgroundVertical: null,
// The display mode that will be used to show slides
display: 'block'
}); The configuration can be updated after initialization using the // Turn autoSlide off
Reveal.configure({ autoSlide: 0 });
// Start auto-sliding every 5s
Reveal.configure({ autoSlide: 5000 }); Presentation SizeAll presentations have a normal size, that is, the resolution at which they are authored. The framework will automatically scale presentations uniformly based on this size to ensure that everything fits on any given display or viewport. See below for a list of configuration options related to sizing, including default values: Reveal.initialize({
// ...
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
width: 960,
height: 700,
// Factor of the display size that should remain empty around the content
margin: 0.1,
// Bounds for smallest/largest possible scale to apply to content
minScale: 0.2,
maxScale: 1.5
}); If you wish to disable this behavior and do your own scaling (e.g. using media queries), try these settings: Reveal.initialize({
// ...
width: "100%",
height: "100%",
margin: 0,
minScale: 1,
maxScale: 1
}); DependenciesReveal.js doesn't rely on any third party scripts to work but a few optional libraries are included by default. These libraries are loaded as dependencies in the order they appear, for example: Reveal.initialize({
dependencies: [
// Cross-browser shim that fully implements classList - https://github.com/eligrey/classList.js/
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
// Interpret Markdown in <section> elements
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
// Syntax highlight for <code> elements
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
// Zoom in and out with Alt+click
{ src: 'plugin/zoom-js/zoom.js', async: true },
// Speaker notes
{ src: 'plugin/notes/notes.js', async: true },
// MathJax
{ src: 'plugin/math/math.js', async: true }
]
}); You can add your own extensions using the same syntax. The following properties are available for each dependency object:
To load these dependencies, reveal.js requires head.js (a script loading library) to be loaded before reveal.js. Ready EventA Reveal.addEventListener( 'ready', function( event ) {
// event.currentSlide, event.indexh, event.indexv
} ); Note that we also add a Auto-slidingPresentations can be configured to progress through slides automatically, without any user input. To enable this you will need to tell the framework how many milliseconds it should wait between slides: // Slide every five seconds
Reveal.configure({
autoSlide: 5000
}); When this is turned on a control element will appear that enables users to pause and resume auto-sliding. Alternatively, sliding can be paused or resumed by pressing »A« on the keyboard. Sliding is paused automatically as soon as the user starts navigating. You can disable these controls by specifying You can also override the slide duration for individual slides and fragments by using the <section data-autoslide="2000">
<p>After 2 seconds the first fragment will be shown.</p>
<p class="fragment" data-autoslide="10000">After 10 seconds the next fragment will be shown.</p>
<p class="fragment">Now, the fragment is displayed for 2 seconds before the next slide is shown.</p>
</section> To override the method used for navigation when auto-sliding, you can specify the Whenever the auto-slide mode is resumed or paused the Keyboard BindingsIf you're unhappy with any of the default keyboard bindings you can override them using the Reveal.configure({
keyboard: {
13: 'next', // go to the next slide when the ENTER key is pressed
27: function() {}, // do something custom when ESC is pressed
32: null // don't do anything when SPACE is pressed (i.e. disable a reveal.js default binding)
}
}); Touch NavigationYou can swipe to navigate through a presentation on any touch-enabled device. Horizontal swipes change between horizontal slides, vertical swipes change between vertical slides. If you wish to disable this you can set the If there's some part of your content that needs to remain accessible to touch events you'll need to highlight this by adding a Lazy LoadingWhen working on presentation with a lot of media or iframe content it's important to load lazily. Lazy loading means that reveal.js will only load content for the few slides nearest to the current slide. The number of slides that are preloaded is determined by the To enable lazy loading all you need to do is change your <section>
<img data-src="image.png">
<iframe data-src="http://hakim.se"></iframe>
<video>
<source data-src="video.webm" type="video/webm" />
<source data-src="video.mp4" type="video/mp4" />
</video>
</section> APIThe // Navigation
Reveal.slide( indexh, indexv, indexf );
Reveal.left();
Reveal.right();
Reveal.up();
Reveal.down();
Reveal.prev();
Reveal.next();
Reveal.prevFragment();
Reveal.nextFragment();
// Randomize the order of slides
Reveal.shuffle();
// Toggle presentation states, optionally pass true/false to force on/off
Reveal.toggleOverview();
Reveal.togglePause();
Reveal.toggleAutoSlide();
// Shows a help overlay with keyboard shortcuts, optionally pass true/false
// to force on/off
Reveal.toggleHelp();
// Change a config value at runtime
Reveal.configure({ controls: true });
// Returns the present configuration options
Reveal.getConfig();
// Fetch the current scale of the presentation
Reveal.getScale();
// Retrieves the previous and current slide elements
Reveal.getPreviousSlide();
Reveal.getCurrentSlide();
Reveal.getIndices(); // { h: 0, v: 0, f: 0 }
Reveal.getSlidePastCount();
Reveal.getProgress(); // (0 == first slide, 1 == last slide)
Reveal.getSlides(); // Array of all slides
Reveal.getTotalSlides(); // Total number of slides
// Returns the speaker notes for the current slide
Reveal.getSlideNotes();
// State checks
Reveal.isFirstSlide();
Reveal.isLastSlide();
Reveal.isOverview();
Reveal.isPaused();
Reveal.isAutoSliding(); Custom Key BindingsCustom key bindings can be added and removed using the following Javascript API. Custom key bindings will override the default keyboard bindings, but will in turn be overridden by the user defined bindings in the Reveal.addKeyBinding( binding, callback );
Reveal.removeKeyBinding( keyCode ); For example // The binding parameter provides the following properties
// keyCode: the keycode for binding to the callback
// key: the key label to show in the help overlay
// description: the description of the action to show in the help overlay
Reveal.addKeyBinding( { keyCode: 84, key: 'T', description: 'Start timer' }, function() {
// start timer
} )
// The binding parameter can also be a direct keycode without providing the help description
Reveal.addKeyBinding( 82, function() {
// reset timer
} ) This allows plugins to add key bindings directly to Reveal so they can
Slide Changed EventA Some libraries, like MathJax (see #226), get confused by the transforms and display states of slides. Often times, this can be fixed by calling their update or render function from this callback. Reveal.addEventListener( 'slidechanged', function( event ) {
// event.previousSlide, event.currentSlide, event.indexh, event.indexv
} ); Presentation StateThe presentation's current state can be fetched by using the Reveal.slide( 1 );
// we're on slide 1
var state = Reveal.getState();
Reveal.slide( 3 );
// we're on slide 3
Reveal.setState( state );
// we're back on slide 1 Slide StatesIf you set Furthermore you can also listen to these changes in state via JavaScript: Reveal.addEventListener( 'somestate', function() {
// TODO: Sprinkle magic
}, false ); Slide BackgroundsSlides are contained within a limited portion of the screen by default to allow them to fit any display and scale uniformly. You can apply full page backgrounds outside of the slide area by adding a Color BackgroundsAll CSS color formats are supported, including hex values, keywords, <section data-background-color="#ff0000">
<h2>Color</h2>
</section> Image BackgroundsBy default, background images are resized to cover the full page. Available options:
<section data-background-image="http://example.com/image.png">
<h2>Image</h2>
</section>
<section data-background-image="http://example.com/image.png" data-background-size="100px" data-background-repeat="repeat">
<h2>This background image will be sized to 100px and repeated</h2>
</section> Video BackgroundsAutomatically plays a full size video behind the slide.
<section data-background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm" data-background-video-loop data-background-video-muted>
<h2>Video</h2>
</section> Iframe BackgroundsEmbeds a web page as a slide background that covers 100% of the reveal.js width and height. The iframe is in the background layer, behind your slides, and as such it's not possible to interact with it by default. To make your background interactive, you can add the <section data-background-iframe="https://slides.com" data-background-interactive>
<h2>Iframe</h2>
</section> Background TransitionsBackgrounds transition using a fade animation by default. This can be changed to a linear sliding transition by passing Parallax BackgroundIf you want to use a parallax scrolling background, set the first two properties below when initializing reveal.js (the other two are optional). Reveal.initialize({
// Parallax background image
parallaxBackgroundImage: '', // e.g. "https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg"
// Parallax background size
parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px" - currently only pixels are supported (don't use % or auto)
// Number of pixels to move the parallax background per slide
// - Calculated automatically unless specified
// - Set to 0 to disable movement along an axis
parallaxBackgroundHorizontal: 200,
parallaxBackgroundVertical: 50
}); Make sure that the background size is much bigger than screen size to allow for some scrolling. View example. Slide TransitionsThe global presentation transition is set using the <section data-transition="zoom">
<h2>This slide will override the presentation transition and zoom!</h2>
</section>
<section data-transition-speed="fast">
<h2>Choose from three transition speeds: default, fast or slow!</h2>
</section> You can also use different in and out transitions for the same slide: <section data-transition="slide">
The train goes on …
</section>
<section data-transition="slide">
and on …
</section>
<section data-transition="slide-in fade-out">
and stops.
</section>
<section data-transition="fade-in slide-out">
(Passengers entering and leaving)
</section>
<section data-transition="slide">
And it starts again.
</section> You can choose from Internal linksIt's easy to link between slides. The first example below targets the index of another slide whereas the second targets a slide with an ID attribute ( <a href="#/2/2">Link</a>
<a href="#/some-slide">Link</a> You can also add relative navigation links, similar to the built in reveal.js controls, by appending one of the following classes on any element. Note that each element is automatically given an <a href="#" class="navigate-left">
<a href="#" class="navigate-right">
<a href="#" class="navigate-up">
<a href="#" class="navigate-down">
<a href="#" class="navigate-prev"> <!-- Previous vertical or horizontal slide -->
<a href="#" class="navigate-next"> <!-- Next vertical or horizontal slide --> FragmentsFragments are used to highlight individual elements on a slide. Every element with the class The default fragment style is to start out invisible and fade in. This style can be changed by appending a different class to the fragment: <section>
<p class="fragment grow">grow</p>
<p class="fragment shrink">shrink</p>
<p class="fragment fade-out">fade-out</p>
<p class="fragment fade-up">fade-up (also down, left and right!)</p>
<p class="fragment fade-in-then-out">fades in, then out when we move to the next step</p>
<p class="fragment fade-in-then-semi-out">fades in, then obfuscate when we move to the next step</p>
<p class="fragment highlight-current-blue">blue only once</p>
<p class="fragment highlight-red">highlight-red</p>
<p class="fragment highlight-green">highlight-green</p>
<p class="fragment highlight-blue">highlight-blue</p>
</section> Multiple fragments can be applied to the same element sequentially by wrapping it, this will fade in the text on the first step and fade it back out on the second. <section>
<span class="fragment fade-in">
<span class="fragment fade-out">I'll fade in, then out</span>
</span>
</section> The display order of fragments can be controlled using the <section>
<p class="fragment" data-fragment-index="3">Appears last</p>
<p class="fragment" data-fragment-index="1">Appears first</p>
<p class="fragment" data-fragment-index="2">Appears second</p>
</section> Fragment eventsWhen a slide fragment is either shown or hidden reveal.js will dispatch an event. Some libraries, like MathJax (see #505), get confused by the initially hidden fragment elements. Often times this can be fixed by calling their update or render function from this callback. Reveal.addEventListener( 'fragmentshown', function( event ) {
// event.fragment = the fragment DOM element
} );
Reveal.addEventListener( 'fragmenthidden', function( event ) {
// event.fragment = the fragment DOM element
} ); Code syntax highlightingBy default, Reveal is configured with highlight.js for code syntax highlighting. To enable syntax highlighting, you'll have to load the highlight plugin (plugin/highlight/highlight.js) and a highlight.js CSS theme (Reveal comes packaged with the zenburn theme: lib/css/zenburn.css). Reveal.initialize({
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
]
}); Below is an example with clojure code that will be syntax highlighted. When the <section>
<pre><code data-trim data-noescape>
(def lazy-fib
(concat
[0 1]
<mark>((fn rfib [a b]</mark>
(lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
</code></pre>
</section> Slide numberIf you would like to display the page number of the current slide you can do so using the // Shows the slide number using default formatting
Reveal.configure({ slideNumber: true });
// Slide number formatting can be configured using these variables:
// "h.v": horizontal . vertical slide number (default)
// "h/v": horizontal / vertical slide number
// "c": flattened slide number
// "c/t": flattened slide number / total slides
Reveal.configure({ slideNumber: 'c/t' });
// Control which views the slide number displays on using the "showSlideNumber" value:
// "all": show on all views (default)
// "speaker": only show slide numbers on speaker notes view
// "print": only show slide numbers when printing to PDF
Reveal.configure({ showSlideNumber: 'speaker' }); Overview modePress »ESC« or »O« keys to toggle the overview mode on and off. While you're in this mode, you can still navigate between slides, Reveal.addEventListener( 'overviewshown', function( event ) { /* ... */ } );
Reveal.addEventListener( 'overviewhidden', function( event ) { /* ... */ } );
// Toggle the overview mode programmatically
Reveal.toggleOverview(); Fullscreen modeJust press »F« on your keyboard to show your presentation in fullscreen mode. Press the »ESC« key to exit fullscreen mode. Embedded mediaAdd <video data-autoplay src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video> If you want to enable or disable autoplay globally, for all embedded media, you can use the Note that embedded HTML5 Embedded iframesreveal.js automatically pushes two post messages to embedded iframes. Stretching elementsSometimes it's desirable to have an element, like an image or video, stretch to consume as much space as possible within a given slide. This can be done by adding the <section>
<h2>This video will use up the remaining space on the slide</h2>
<video class="stretch" src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video>
</section> Limitations:
postMessage APIThe framework has a built-in postMessage API that can be used when communicating with a presentation inside of another window. Here's an example showing how you'd make a reveal.js instance in the given window proceed to slide 2: <window>.postMessage( JSON.stringify({ method: 'slide', args: [ 2 ] }), '*' ); When reveal.js runs inside of an iframe it can optionally bubble all of its events to the parent. Bubbled events are stringified JSON with three fields: namespace, eventName and state. Here's how you subscribe to them from the parent window: window.addEventListener( 'message', function( event ) {
var data = JSON.parse( event.data );
if( data.namespace === 'reveal' && data.eventName ==='slidechanged' ) {
// Slide changed, see data.state for slide number
}
} ); This cross-window messaging can be toggled on or off using configuration flags. Reveal.initialize({
// ...
// Exposes the reveal.js API through window.postMessage
postMessage: true,
// Dispatches all reveal.js events to the parent window through postMessage
postMessageEvents: false
}); PDF ExportPresentations can be exported to PDF via a special print stylesheet. This feature requires that you use Google Chrome or Chromium and to be serving the presentation from a webserver. Separate pages for fragmentsFragments are printed on separate slides by default. Meaning if you have a slide with three fragment steps, it will generate three separate slides where the fragments appear incrementally. If you prefer printing all fragments in their visible states on the same slide you can set the Page sizeExport dimensions are inferred from the configured presentation size. Slides that are too tall to fit within a single page will expand onto multiple pages. You can limit how many pages a slide may expand onto using the Print stylesheetTo enable the PDF print capability in your presentation, the special print stylesheet at /css/print/pdf.css must be loaded. The default index.html file handles this for you when <script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script> Instructions
Alternatively you can use the decktape project. ThemingThe framework comes with a few different themes included:
Each theme is available as a separate stylesheet. To change theme you will need to replace black below with your desired theme name in index.html: <link rel="stylesheet" href="css/theme/black.css" id="theme"> If you want to add a theme of your own see the instructions here: /css/theme/README.md. Speaker Notesreveal.js comes with a speaker notes plugin which can be used to present per-slide notes in a separate browser window. The notes window also gives you a preview of the next upcoming slide so it may be helpful even if you haven't written any notes. Press the »S« key on your keyboard to open the notes window. A speaker timer starts as soon as the speaker view is opened. You can reset it to 00:00:00 at any time by simply clicking/tapping on it. Notes are defined by appending an Alternatively you can add your notes in a When used locally, this feature requires that reveal.js runs from a local web server. <section>
<h2>Some Slide</h2>
<aside class="notes">
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit »S« on your keyboard).
</aside>
</section> If you're using the external Markdown plugin, you can add notes with the help of a special delimiter: <section data-markdown="example.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n" data-separator-notes="^Note:"></section>
# Title
## Sub-title
Here is some content...
Note:
This will only display in the notes window. Share and Print Speaker NotesNotes are only visible to the speaker inside of the speaker view. If you wish to share your notes with others you can initialize reveal.js with the When Speaker notes clock and timersThe speaker notes window will also show:
The pacing timer can be enabled by configuring by the Server Side Speaker NotesIn some cases it can be desirable to run notes on a separate device from the one you're presenting on. The Node.js-based notes plugin lets you do this using the same note definitions as its client side counterpart. Include the required scripts by adding the following dependencies: Reveal.initialize({
// ...
dependencies: [
{ src: 'socket.io/socket.io.js', async: true },
{ src: 'plugin/notes-server/client.js', async: true }
]
}); Then:
MultiplexingThe multiplex plugin allows your audience to view the slides of the presentation you are controlling on their own phone, tablet or laptop. As the master presentation navigates the slides, all client presentations will update in real time. See a demo at https://reveal-js-multiplex-ccjbegmaii.now.sh/. The multiplex plugin needs the following 3 things to operate:
Master presentationServed from a static file server accessible (preferably) only to the presenter. This need only be on your (the presenter's) computer. (It's safer to run the master presentation from your own computer, so if the venue's Internet goes down it doesn't stop the show.) An example would be to execute the following commands in the directory of your master presentation:
If you want to use the speaker notes plugin with your master presentation then make sure you have the speaker notes plugin configured correctly along with the configuration shown below, then execute You can then access your master presentation at Example configuration: Reveal.initialize({
// other options...
multiplex: {
// Example values. To generate your own, see the socket.io server instructions.
secret: '13652805320794272084', // Obtained from the socket.io server. Gives this (the master) control of the presentation
id: '1ea875674b17ca76', // Obtained from socket.io server
url: 'https://reveal-js-multiplex-ccjbegmaii.now.sh' // Location of socket.io server
},
// Don't forget to add the dependencies
dependencies: [
{ src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
{ src: 'plugin/multiplex/master.js', async: true },
// and if you want speaker notes
{ src: 'plugin/notes-server/client.js', async: true }
// other dependencies...
]
}); Client presentationServed from a publicly accessible static file server. Examples include: GitHub Pages, Amazon S3, Dreamhost, Akamai, etc. The more reliable, the better. Your audience can then access the client presentation via Example configuration: Reveal.initialize({
// other options...
multiplex: {
// Example values. To generate your own, see the socket.io server instructions.
secret: null, // null so the clients do not have control of the master presentation
id: '1ea875674b17ca76', // id, obtained from socket.io server
url: 'https://reveal-js-multiplex-ccjbegmaii.now.sh' // Location of socket.io server
},
// Don't forget to add the dependencies
dependencies: [
{ src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
{ src: 'plugin/multiplex/client.js', async: true }
// other dependencies...
]
}); Socket.io serverServer that receives the
Or you can use the socket.io server at https://reveal-js-multiplex-ccjbegmaii.now.sh/. You'll need to generate a unique secret and token pair for your master and client presentations. To do so, visit You are very welcome to point your presentations at the Socket.io server running at https://reveal-js-multiplex-ccjbegmaii.now.sh/, but availability and stability are not guaranteed. For anything mission critical I recommend you run your own server. The easiest way to do this is by installing now. With that installed, deploying your own Multiplex server is as easy running the following command from the reveal.js folder: socket.io server as file static serverThe socket.io server can play the role of static file server for your client presentation, as in the example at https://reveal-js-multiplex-ccjbegmaii.now.sh/. (Open https://reveal-js-multiplex-ccjbegmaii.now.sh/ in two browsers. Navigate through the slides on one, and the other will update to match.) Example configuration: Reveal.initialize({
// other options...
multiplex: {
// Example values. To generate your own, see the socket.io server instructions.
secret: null, // null so the clients do not have control of the master presentation
id: '1ea875674b17ca76', // id, obtained from socket.io server
url: 'example.com:80' // Location of your socket.io server
},
// Don't forget to add the dependencies
dependencies: [
{ src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
{ src: 'plugin/multiplex/client.js', async: true }
// other dependencies...
] It can also play the role of static file server for your master presentation and client presentations at the same time (as long as you don't want to use speaker notes). (Open https://reveal-js-multiplex-ccjbegmaii.now.sh/ in two browsers. Navigate through the slides on one, and the other will update to match. Navigate through the slides on the second, and the first will update to match.) This is probably not desirable, because you don't want your audience to mess with your slides while you're presenting. ;) Example configuration: Reveal.initialize({
// other options...
multiplex: {
// Example values. To generate your own, see the socket.io server instructions.
secret: '13652805320794272084', // Obtained from the socket.io server. Gives this (the master) control of the presentation
id: '1ea875674b17ca76', // Obtained from socket.io server
url: 'example.com:80' // Location of your socket.io server
},
// Don't forget to add the dependencies
dependencies: [
{ src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
{ src: 'plugin/multiplex/master.js', async: true },
{ src: 'plugin/multiplex/client.js', async: true }
// other dependencies...
]
}); MathJaxIf you want to display math equations in your presentation you can easily do so by including this plugin. The plugin is a very thin wrapper around the MathJax library. To use it you'll need to include it as a reveal.js dependency, find our more about dependencies here. The plugin defaults to using LaTeX but that can be adjusted through the Below is an example of how the plugin can be configured. If you don't intend to change these values you do not need to include the Reveal.initialize({
// other options ...
math: {
mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
},
dependencies: [
{ src: 'plugin/math/math.js', async: true }
]
}); Read MathJax's documentation if you need HTTPS delivery or serving of specific versions for stability. InstallationThe basic setup is for authoring presentations only. The full setup gives you access to all reveal.js features and plugins such as speaker notes as well as the development tasks needed to make changes to the source. Basic setupThe core of reveal.js is very easy to install. You'll simply need to download a copy of this repository and open the index.html file directly in your browser.
Full setupSome reveal.js features, like external Markdown and speaker notes, require that presentations run from a local web server. The following instructions will set up such a server as well as all of the development tasks needed to make edits to the reveal.js source code.
Folder Structure
LicenseMIT licensed Copyright (C) 2018 Hakim El Hattab, http://hakim.se |
已安装的附加组件被 Firefox 禁用,我该怎么办?如果一个未经签名的附加组件被禁用,您将不能继续使用它,并且附加组件管理器将显示信息: 未通过针对是否适用于 Firefox 的验证,现已被禁用。。如果它提供已签名的版本,您可以在 Firefox 中 移除此附加组件 ,然后通过 Mozilla 附加组件网站 重新安装它。 如果没有提供经过签名的版本,请联系附加组件的开发者或作者,询问他们是否能提供签名后的更新版附加组件。您也可以提醒他们给附加组件签名。 键值分为三种类型:整数型,键值为整数,例如5000、10000等;布尔型,键值为逻辑值,只有true和false两种;字符串型,键值一般为不属于以上两种的各种字符、字符串。 Firefox的延长支持版(ESR)、开发者版和Nightly版,将允许通过把偏好xpinstall.signatures.required改为false来屏蔽增强的扩展签名要求,该偏好可通过Firefox 配置编辑器(about:config 页)更改。 还有其它一些山寨版的 Firefox 也允许此项屏蔽。更多内容,参阅 MozillaWiki 文章 附加组件/扩展签名。 |
webRTChat——局域网中的聊天神器http://mozilla.com.cn/thread-59589-1-1.html
webRTChat预览图 webRTChat,提供同个局域网内用户间的文本聊天,语音/视频通话和文件传输。局域网内用户自动发现,无需注册账号即可使用,是您最方便轻巧的聊天工具。 |
IDE安装完成无法打开,报错Fail load JVM DLL 问题与解决方案https://blog.csdn.net/baddog_/article/details/80575178 安装完成pycharm
解决方案
32 bit: http://www.microsoft.com/download/en/details.aspx?id=5555 64 bit: http://www.microsoft.com/download/en/details.aspx?id=14632 然后再运行即可 其他编译器出现这个问题也可以用这个方案解决比如 Android studio |
windows xp 安装python 和 pippython对xp支持的最后版本为3.4.4 https://www.python.org/ftp/python/3.4.4/python-3.4.4.msi 安装过程一直下一步即可。 设置环境变量。在 Windows 设置环境变量 手动添加环境变量:鼠标右键我的电脑 -> 属性 -> 点击高级系统设置 -> 点击环境变量 -> 点击PATH -> 在最后面加上我们的Python安装路径 -> 点击确定。 找到系统环境变量的path 添加 C:\Python34; C:\Python34\Scripts; 即可。 安装pip下载 pip 到http://pypi.python.org/pypi/pip上下载pip-1.0.2.tar.gz 安装 pip 5.1 解压 pip-1.0.2.tar.gz 5.2 运行CMD,进入命令行 5.3 用CD命令进入 pip 解压目录(F:\ cd pip-1.0.2) 5.4 输入 "python setup.py install" 5.5 添加环境变量 path = C:\Python27\Scripts 安装 nose, virtualenv进入CMD命令行,输入 "pip install package",package为安装包名称。 程序会自动下载相应的安装包,并进行安装。 |
Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attribute 'xxx'"。这其实是.pyc文件存在问题。 问题定位: 查看import库的源文件,发现源文件存在且没有错误,同时存在源文件的.pyc文件 问题解决方法:
|
Tmux Plugin ManagerInstalls and loads Tested and working on Linux, OSX, and Cygwin. InstallationRequirements: Clone TPM: $ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm Put this at the bottom of # List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' Reload TMUX environment so TPM is sourced: # type this in terminal if tmux is already running
$ tmux source ~/.tmux.conf That's it! Installing plugins
You're good to go! The plugin was cloned to Uninstalling plugins
All the plugins are installed to Key bindings
More pluginsFor more plugins, check here. Docs
More advanced features and instructions, regular users probably do not need
TestsTests for this project run on Travis CI. When run locally, vagrant is required. # within project directory
$ ./run_tests Other goodies
You might want to follow @brunosutic on License |
tmux-continuumFeatures:
Together these features enable uninterrupted tmux usage. No matter the computer Tested and working on Linux, OSX and Cygwin. Continuous savingTmux environment will be saved at the interval of 15 minutes. All the saving This action starts automatically when the plugin is installed. Automatic tmux startTmux is automatically started after the computer/server is turned on. See the instructions how to enable this for your Automatic restoreLast saved environment is automatically restored when tmux is started. Put Note: automatic restore happens exclusively on tmux server start. No other Dependencies
Installation with Tmux Plugin Manager (recommended)Please make sure you have Add plugin to the list of TPM plugins in
Hit Manual InstallationPlease make sure you have Clone the repo:
Add this line to the bottom of
Reload TMUX environment with: The plugin will automatically start "working" in the background, no action Docs
Other goodies
You might want to follow @brunosutic on Reporting bugs and contributingBoth contributing and bug reports are welcome. Please check out License |
Xterm配置http://forum.ubuntu.org.cn/viewtopic.php?t=143221 参照他的xterm配置如下。 外观:重要点的就xterm-256color那行。 代码: 全选
修正Alt不能正常使用的问题。 代码: 全选
拷贝屏幕内容,包含所有颜色控制符。可以用来做ASCIIART,也可以用脚本转成html放到网上,就好像鸟哥的主页里面的代码段一样。附件里面的perl脚本可以把拷屏输出转成html。 代码: 全选
快捷键定义:鼠标选择自动复制,ctrl-v粘贴,ctrl-p拷屏。 代码: 全选
字体相关 代码: 全选
附上我的xterm和urxvt对比图。同样的字体,同样的窗口大小,同样的配色。 all:
axun 的配置(20180923):
xterm终端的配置文件是: |
tmux config
参考01:
|
Tmux Plugin ManagerInstalls and loads Tested and working on Linux, OSX, and Cygwin. InstallationRequirements: Clone TPM: $ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm Put this at the bottom of # List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' Reload TMUX environment so TPM is sourced: # type this in terminal if tmux is already running
$ tmux source ~/.tmux.conf That's it! Installing plugins
You're good to go! The plugin was cloned to Uninstalling plugins
All the plugins are installed to Key bindings
More pluginsFor more plugins, check here. Docs
More advanced features and instructions, regular users probably do not need
TestsTests for this project run on Travis CI. When run locally, vagrant is required. # within project directory
$ ./run_tests Other goodies
You might want to follow @brunosutic on License |
axun config20180923 gentoo pi1. tmux
修改的~/.tmux.conf配置文件有如下两种方式可以令其生效:
更为优雅的做法是新增一个加载配置文件的快捷指令 ,这样就可以随时随地load新的配置了,如下所示。
config(20180923):
2. xtermxterm终端的配置文件是:
保存上述内容后,然后执行命令: config(20180923):
|
sed 匹配行首 行末 添加字符
sed 's/kernal.*/\0aaaaa/' test
sed '/kernal.*/ s/$/aaaaa/' test
sed '/kernal.*/ s/^/aaaaa/' test
sed '/kernal.*/i abcd' test
sed '/kernal.*/a abcd' test |
vim技巧:20181113
比如我现在想把date的执行结果放到这个文件中:
:map 快捷键 触发命令 :map ^P I# 这个命令什么意思呢,就是把Ctrl+P快捷键定义为I#,I代表定位到行首并进入插入模式,然后插入#号,然后回到命令模式,定义了这个快捷键,后面再想加入注释#,直接Ctrl+P即可 删除#呢 :map ^B 0x 0代表移动到行首,x代表删除当前光标所在字符
:n1,n2s/^#//g
:n1,n2s/^/#/g ^代表行首 我们想把第一行和第二行注释掉
:ab donglu lixin ,比如以后我想输入donglu,自动变为lixin 好了,刚刚这几个快捷键或者是替换,在重启或者重新连接后就会失效,怎么办呢,需要在/home/当前用户下创建一个.vimrc的文件,然后在里面保存刚刚的设置,不需要开头的:即可,这样每次重启或者重新连接,配置的快捷键和替换都一直生效 |
No description provided.
The text was updated successfully, but these errors were encountered: