Skip to content

Instantly share code, notes, and snippets.

View flrngel's full-sized avatar
🥱

Derrick flrngel

🥱
View GitHub Profile
for package in $(apt-get upgrade 2>&1 | grep "warning: files list file" | sed "s/.*'//; s/://"); do apt-get install --reinstall "$package"; done
sync
sudo bash -c 'echo 3 > /proc/sys/vm/drop_caches'
# swap memory reset
sudo swapoff -a
sudo swapon -a
# SVN CHEATSHEET by 휘철
## checkout : 버젼관리되는 디렉토리를 다운받는다
svn co http://211.247.248.254/svn/trunk/<더 정확한주소>
## import : 업로드
svn import <폴더주소> http://211.247.248.254/svn/trunk/<업로드 하고싶은 주소>
@flrngel
flrngel / gist:9106099
Last active August 29, 2015 13:56
pushTimeout
"pushTimeout": function pushTimeout(callback,time){
if(pushTimeout.timeHandler)
clearTimeout(pushTimeout.timeHandler);
pushTimeout.timeHandler=setTimeout(callback,time);
}
@flrngel
flrngel / ruby 설치
Created December 4, 2013 11:16
루비루비룹히
\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
@flrngel
flrngel / gist:7575186
Created November 21, 2013 02:34
elegant full address search on UTF-8
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);
$("#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>";