This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $("#fileAddBtn").click(function(){ | |
| var newfile=$("<input type='file' name='file[]'>"); | |
| $(this).parent().append("<br/>").append(newfile); | |
| newfile.ajaxfileupload({ | |
| action: "/util/fileupload.json", | |
| onComplete: function(response){ | |
| if( response.result ){ | |
| console.log(newfile.val()); | |
| var filename = "<span>"+newfile.val().split('\\').pop()+"</span>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fullSearch($array){ | |
| $limit=intval($array['limit'])==0?100:intval($array['limit']); | |
| $address=$array['address']; | |
| // process for elegant searching - by `surplus` flrngel | |
| $na=array(); | |
| $split= explode(" ",$address); | |
| $newstr=null; | |
| foreach($split as $key=>$val){ | |
| preg_match_all('/./u',$val,$hangul_cut); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled # Or, --ruby=1.9.3 | |
| \curl -L https://get.rvm.io | sudo bash -s stable # multi-user | |
| gem install rails | |
| rvm user gemsets #every user | |
| sudo usermod -a -G rvm flrngel | |
| --multi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "pushTimeout": function pushTimeout(callback,time){ | |
| if(pushTimeout.timeHandler) | |
| clearTimeout(pushTimeout.timeHandler); | |
| pushTimeout.timeHandler=setTimeout(callback,time); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SVN CHEATSHEET by 휘철 | |
| ## checkout : 버젼관리되는 디렉토리를 다운받는다 | |
| svn co http://211.247.248.254/svn/trunk/<더 정확한주소> | |
| ## import : 업로드 | |
| svn import <폴더주소> http://211.247.248.254/svn/trunk/<업로드 하고싶은 주소> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sync | |
| sudo bash -c 'echo 3 > /proc/sys/vm/drop_caches' | |
| # swap memory reset | |
| sudo swapoff -a | |
| sudo swapon -a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for package in $(apt-get upgrade 2>&1 | grep "warning: files list file" | sed "s/.*'//; s/://"); do apt-get install --reinstall "$package"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grep -E -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+\b" filename.txt | |
| egrep -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+\b" filename.txt | |
| from | |
| http://www.putorius.net/2011/12/grep-all-email-addresses-from-text-file.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # backup all database | |
| mysqldump -u "USER" --all-databases -p > "FILE_NAME".sql | |
| # backup with single-transaction ( WHEN REPLICATE ) | |
| mysqldump -u "USER" -p "DATABASE_NAME" --master-data=2 --single-transaction > "FILE_NAME".sql |
OlderNewer