文字竖排
writing-mode: vertical-rl;
解决英文竖排问题
text-orientation:upright;
字间距
letter-spacing:8px;
writing-mode: vertical-rl;
text-orientation:upright;
letter-spacing:8px;
浏览$location的实例代码我们不难发现,每次的url中都会带一个#,这是因为angularjs默认使用的是标签模式,它和html5模式有什么区别?
标签模式使用的是内部链接的技巧,URL后面紧跟一个#,angularjs本身不会重写标签,也不需要服务器端的支持,链接后的URL样子基本是这样的:
http://example.com/#/some/path?foo=bar&baz=xoxo
标签模式的url看起来总是觉得不爽,html5模式可能比较适合咱们的请求格式(比如说REST),
http://example.com/some/path?foo=bar&baz=xoxo
在angularjs内部,可以通过$locationProvider.Html5Mode()(内部用的是html5 history api,如果浏览器不支持将自动降级到标签模式)方法来实现这样的路由要求,在该模式下,angularjs会重写标签。使用该模式时,永远都不要使用相对路径,如果你的应用是在根路径中加载的,这不会有什么问题,但如果是在其他路径中,AngularJS应用就无法正确处理路由了. 为了在应用程序各处使用相对链接,你将需要在你文档的里面设置一个.
history.pushState(data, title [, url]):往历史记录堆栈顶部添加一条记录;data会在onpopstate事件触发时作为参数传递过去;title为页面标题,当前所有浏览器都会忽略此参数;url为页面地址,可选,缺省为当前页地址。
history.replaceState(data, title [, url]) :更改当前的历史记录,参数同上。
history.state:用于存储以上方法的data数据,不同浏览器的读写权限不一样。
浏览器支持情况(完整的可以通过www.caniuse.com查询)
IE 10+, FF38+,chrome 31+,safari 7.1+, opera 30+
lsusb
可以看到显卡型号为RTL8188EUS。通过搜索查找到https://github.com/lwfinger/rtl8188eu这个驱动。
wget https://github.com/lwfinger/rtl8188eu/archive/master.zip
unzip master.zip
cd rtl8188eu-master
make all
sudo make install
sudo dkms add ./rtl8188eu
sudo dkms build 8188eu/1.0
sudo dkms install 8188eu/1.0
sudo dnf config-manager --add-repo=http://negativo17.org/repos/fedora-nvidia.repo
sudo dnf install kernel-devel dkms-nvidia -y
sudo dnf install vim git hg subversion -y
sudo visudo
%wheel ALL=(ALL) NOPASSWD: ALL
sudo setenforce 0
sudo vi /etc/selinux/config
SELINUX=disabled
sudo dnf install nautilus-open-terminal -y
sudo dnf groupinstall "Development tools" -y
sudo dnf install nginx php-cli php-devel php-mbstring php-opcache php-mysqlnd php-intl php-mcrypt php-pdo php-xml php-pecl-memcache php-pecl-redis php-pecl-sphinx php-pecl-zip php-pgsql php-xdebug php-gd php-pecl-redis php-pecl-imagick php-fpm -y
sudo dnf install mariadb mariadb-server -y
sudo systemctl enable php-fpm nginx mariadb
sudo service nginx stop
sudo vim /etc/nginx/nginx.conf
nginx.conf配置修改如下:
user ning;
error_log /data/log/nginx/error.log;
pid /data/run/nginx.pid;
access_log /data/log/nginx/access.log main;
include /data/phpcode/projectname/vagrant/nginx/app.conf;
测试nginx配置
sudo nginx -t
修改nginx service配置:
sudo vim /usr/lib/systemd/system/nginx.service
nginx.service修改内容如下:
[Service]
PIDFile=/data/run/nginx.pid
ExecStartPre=/usr/bin/rm -f /data/run/nginx.pid
重新加载service
sudo systemctl daemon-reload
sudo systemctl start nginx
sudo service php-fpm stop
sudo vim /etc/php-fpm.d/www.conf
配置内容
user = ning
group = ning
listen = 127.0.0.1:9000
listen.acl_users = ning
php_value[session.save_path] = /log/php/session
php_value[soap.wsdl_cache_dir] = /log/php/wsdlcache
;php_value[opcache.file_cache] = /log/php/opcache
重启
sudo service php-fpm stop
下载安装文件
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
安装
php composer-setup.php
删除安装文件
php -r "unlink('composer-setup.php');"
设置全局路径(windows请按参考文档设置)
sudo mv composer.phar ~/bin/composer
配置使用国内镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
由于fedora25,26开始使用wayland替代xorg所以原来的rpmfusion也不好用了,用negativo17源替代。
sudo dnf config-manager --add-repo=http://negativo17.org/repos/fedora-nvidia.repo
sudo dnf install kernel-devel dkms-nvidia
linux升级后,原来在/etc/init.d/下的文件,现在都改为通过service和systemctl来控制,配置文件文件路径也以移动到/usr/lib/systemd/system/了
sudo dnf install alien
Download url :https://github.com/getlantern/lantern/releases/tag/latest
sudo alien -r lantern-installer-64-bit.deb
sudo dnf install lantern-4.0.1-2.x86_64.rpm
Get Error:“conflicts with file from package filesystem”
sudo dnf install rpmrebuild
sudo rpmrebuild -pe lantern-4.0.1-2.x86_64.rpm
Comment lines in rebuild file
(Converted from a deb package by alien version 8.95.)
%files
#%dir %attr(0755, root, root) "/"
#%dir %attr(0755, root, root) "/usr"
#%dir %attr(0755, root, root) "/usr/bin"
%attr(0777, root, root) "/usr/bin/lantern"
#%dir %attr(0755, root, root) "/usr/lib"
%dir %attr(0755, root, root) "/usr/lib/lantern"
%attr(0644, root, root) "/usr/lib/lantern/.packaged-lantern.yaml"
%attr(0644, root, root) "/usr/lib/lantern/lantern-binary"
%attr(0755, root, root) "/usr/lib/lantern/lantern.sh"
%attr(0644, root, root) "/usr/lib/lantern/lantern.yaml"
#%dir %attr(0755, root, root) "/usr/share"
#%dir %attr(0755, root, root) "/usr/share/applications"
%attr(0644, root, root) "/usr/share/applications/lantern.desktop"
#%dir %attr(0755, root, root) "/usr/share/doc"
%dir %attr(0755, root, root) "/usr/share/doc/lantern"
%doc %attr(0644, root, root) "/usr/share/doc/lantern/changelog.gz"
%doc %attr(0644, root, root) "/usr/share/doc/lantern/copyright"
#%dir %attr(0755, root, root) "/usr/share/icons"
#%dir %attr(0755, root, root) "/usr/share/icons/hicolor"
#%dir %attr(0755, root, root) "/usr/share/icons/hicolor/128x128"
#%dir %attr(0755, root, root) "/usr/share/icons/hicolor/128x128/apps"
%attr(0644, root, root) "/usr/share/icons/hicolor/128x128/apps/lantern.png"
%changelog
sudo rpm -i /root/rpmbuild/RPMS/x86_64/lantern-4.0.1-2.x86_64.rpm
sudo dnf install libappindicator-gtk3
deb 与 rpm 是GNU/Linux 流行的软件包格式。我们“alien”可以在rpm\dpkg\slackware tgz\deb\slp 格式见进行转换。
Debian/Ubuntu 可使用下面命令安装alien:
sudo apt-get install alien
举例:假设在目录/tmp 有myprogram.rpm 文件,使用下面命令转换:
sudo alien /tmp/myprogram-1.10-2.i386.rpm
myprogram-1.10-3.i386.deb generated
这时,在/tmp 目录下就会发现有 myprogram.deb ,这时就可以使用dpkg安装:
dpkg -i /tmp/miprogramma.deb
直接添加参数-r进行转换即可:
sudo alien -r pytube_0.0.8.1-1_all.deb
pytube-0.0.8.1-2.noarch.rpm generated
输入alien可以查看帮助
Usage: alien [options] file [...]
file [...] Package file or files to convert.
-d, --to-deb Generate a Debian deb package (default).
Enables these options:
--patch=<patch> Specify patch file to use instead of automatically
looking for patch in /var/lib/alien.
--nopatch Do not use patches.
--anypatch Use even old version os patches.
-s, --single Like --generate, but do not create .orig
directory.
--fixperms Munge/fix permissions and owners.
--test Test generated packages with lintian.
-r, --to-rpm Generate a Red Hat rpm package.
--to-slp Generate a Stampede slp package.
-l, --to-lsb Generate a LSB package.
-t, --to-tgz Generate a Slackware tgz package.
Enables these options:
--description=<desc> Specify package description.
--version=<version> Specify package version.
-p, --to-pkg Generate a Solaris pkg package.
-i, --install Install generated package.
-g, --generate Generate build tree, but do not build package.
-c, --scripts Include scripts in package.
--target=<arch> Set architecture of the generated package.
-v, --verbose Display each command alien runs.
--veryverbose Be verbose, and also display output of run commands.
-k, --keep-version Do not change version of generated package.
--bump=number Increment package version by this number.
-h, --help Display this help message.
-V, --version Display alien's version number.
Extension of Yii 2 Framework, which is wrapper for bootstrap-gtreetable plugin, on the other hand it provides functionality which allows to save the nodes states into database. http://gtreetable2.gilek.net
The nested sets behavior for the Yii framework.
jQuery TreeGrid Extension for Yii 2
This is the jQuery TreeGrid extension for Yii 2. It encapsulates TreeGrid component in terms of Yii widgets, and thus makes using TreeGrid component in Yii applications extremely easy.
An enhanced tree management module from Krajee with inbuilt jQuery plugins and Yii widgets for tree node manipulation and management using nested sets. The module provides ability to manage hierarchical data stored using nested sets. It utilizes the yii2-nested-sets extension to manage the tree structure in your database. Refer the documentation for yii2-nested-sets extension before you start using this module. The yii2-tree-manager module includes two major widgets TreeView and TreeViewInput. In addition, it includes module level settings to easily configure your tree management preferences. It includes a Tree Model which includes inbuilt tree management flags and rules. The model implements and uses a TreeTrait. So one can choose to extend from the Tree Model or implement their own model that uses the TreeTrait. It also includes a NodeController that allows you to manage tree nodes easily via ajax. The tree view widgets and jQuery plugins are built from scratch by Krajee entirely without using any third party plugins. The TreeView is designed using HTML5, jQuery & CSS3 features to work along with the Yii 2 framework.
View a complete demo for TreeView or TreeViewInput.
可以根据业务调整随机长度
<?php
function makeOrderNo() {
return date('ymdHis').rand(100000,999999);
}