Skip to content

Instantly share code, notes, and snippets.

View mgttt's full-sized avatar
deadbeef

datakk mgttt

deadbeef
View GitHub Profile
:; sh start_unix.sh; exit
call start_dos.bat
#install
brew install android-platform-tools
brew install php70 --with-fpm
brew install php70-opcache
brew install php70-swoole
brew unlink php70 && brew link php70
#uninstall / clean
sudo brew unlink php70
sudo brew remove php70*
export PS1='\u: \w\n$ '
alias subl='~/bin/subl -w'
alias ll='ls -al'
alias dk='docker'
alias di='docker images'
alias dp='docker ps'
alias svn=/usr/local/bin/svn
#alias gvim='open ~/macvim/src/MacVim/build/Release/MacVim.app/'
alias mvim='~/macvim/src/MacVim/mvim'
#Download PEAR
curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar
#Verify PEAR
#You should be able to type:
pear version
# install swoole (must sudo otherwise said no auth to write the folder)
sudo /usr/local/Cellar/php70/7.0.4/bin/pecl install swoole
# test loading time of php, and Result:
# php5.5/macos(come with apache bundle)/-opcache: around 120 ms
# php70/+opcache/macos(brew):
# case 1, php -r, around 15ms
# case 2, php test_php_launch_time.php, around 18-20ms
nano=`date +%N`
echo nano=$nano
if [ "$nano" == "N" ];
@echo off
@set copy_to_startup=copy /Y %0 "%USERPROFILE%\..\Default\Start Menu\Programs\Startup\"
echo %copy_to_startup%
%copy_to_startup%
echo taskkill vmtoolsd
taskkill /F /IM vmtoolsd.exe
echo runas vmtoolsd
runas /user:administrator /savecred "C:\Program Files\VMware\VMware Tools\vmtoolsd.exe -n vmusr"
hdiutil attach /path/to/dmg
{eval $html_title="login (".getConf("CONFIG_TYPE").")";
}{inc inc.common.header.htm}
<script>
{eval
//mini js page needed
print jsa_enc_txt(array(
"src.onerror.js",//page global error handling
"../weblib/src.mg_cookie.js",//my_cookie and my_trim
"../weblib/src.mg.miniajax2014.js",//mini ajax
"../weblib/src.common.js",//shtml_load_page_data and other funcs
front end web page loading flow best pratise
# JQ + UI
{ header}
{ body part one }
{ async get page data }
{ boot CSS }
{ boot JS }
{ page content template }
#mount smb
mount -t smbfs //$usre:$pass@$VM_NAME/$folder $mount_point
#mount ntfs rw
sudo mount -t rw,nobrowse /dev/disk2s1 ~/mnt