Skip to content

Instantly share code, notes, and snippets.

@linkarys
linkarys / genymotionwithplay.txt
Created February 24, 2016 09:40 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
#ssh
ssh root@ip
# 1. 安装桌面系统
yum groupinstall "Desktop"
yum groupinstall "X Window System"
# 启动gnome
startx
# 然后按下Ctrl+Alt+F2
# nginx
$ sudo apt-get install nginx
$ sudo service nginx start # Doesn't start itself upon install
# I ran this as root You may need to curl <URL> | sudo tee /etc/nginx/mime.types
$ curl https://raw.github.com/h5bp/server-configs-nginx/master/mime.types > /etc/nginx/mime.types
# nginx laravel
server {
listen 80;
server_name sunshine.us;
-- get row number
select @n:=@n+1 as row_num, column_name from table, (select @n:=0) t2;
-- mysql
mysql -h host_name -p -u user_name;
-- tee
mysql --tee=tmp.out cookbook;
mysql> \T tmp.out -- Loggin to file 'tmp.out'
mysql> \t -- Outfile disabled.
@linkarys
linkarys / git-cheatsheet
Created November 29, 2013 04:48
git-cheatsheet
# store credentials
#keep your password cached in memory for (by default) 15 minutes.
git config --global credential.helper cache
# set a longer timeout
git config --global credential.helper "cache --timeout=3600"
#another way
git config remote.origin.url https://you:password@github.com/you/example.git
@linkarys
linkarys / svn-to-git
Last active December 28, 2015 15:29
svn-to-git
# get svn user list
svn log -q svn_repository | grep -e '^r' | awk 'BEGIN {FS = "|" }; {print $2}' | sort | uniq
svn log --xml svn_repository | grep author | sort -u | perl -pe 's/.>(.?)<./$1 = /'
# create file users.txt:
old_username = new_usename <user_email>
# svn to git
git svn clone svn_repository --authors-file=users.txt --no-metadata -s git_fold
# specify reversion
@linkarys
linkarys / git-config
Last active December 28, 2015 13:39
git configure
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[color]
ui = auto
[color "branch"]
@linkarys
linkarys / regular-expressions-summary
Created April 30, 2013 02:21
regular expressions: summary
regex{
negated character class:{
[^...]
}
word bundary:{
\b
\<
\>
}
wrod: {
@linkarys
linkarys / directives
Created April 19, 2013 06:39
coldfusion: directives
restart: {
cfusion8: sudo /etc/init.d/cfmx8-cfusion start
cfusion10:{
win: coldfusion.exe restart -console
linux: sudo /opt/coldfusion10/cfusion/bin/coldfusion restart
}
}
install: {
@linkarys
linkarys / ubuntu-directives
Last active December 15, 2015 15:09
ubuntu: directives
Commands:
1. pwd: print working directory
2. ls: list [ -s | -sh | -h]
3. cd {
root: cd /
home: cd or cd ~
up: cd..
back: cd -
}
4. cp: copy [-r]