Skip to content

Instantly share code, notes, and snippets.

View theand's full-sized avatar

Heesang Chae theand

  • South Korea
View GitHub Profile
@theand
theand / kill_inca.bat
Last active August 29, 2015 13:56
Kill all Inca process. (Windows) (this scripts is got from a community board)
taskkill /f /im nPStarterSVC.exe
taskkill /f /im npnj5Agent.exe
taskkill /f /im npmonz.exe
taskkill /f /im CKAgent.exe
taskkill /f /im I3GEX.exe
taskkill /f /im npenkMain5.npn
taskkill /f /im npkcmsvc.exe
taskkill /f /im npenksvc5.exe
sc config nPStarterSVC start= disabled
sc config npkcsvc start= disabled
@theand
theand / take_all.py
Last active August 29, 2015 13:56
walks in to directory from cwd, then move all files to parent directory. also check name duplication.
#-*- coding: utf-8 -*-
import os
import os.path
import shutil
for dirpath, dirnames, filenames in os.walk('.'):
for filename in filenames:
if filename == "extract.py" or filename.startswith('.'):
continue
@theand
theand / main.php
Created February 12, 2014 09:38
Post/Redirect/Get example
<?php
if( $_POST["key"] ){
var_dump($_POST["key"]);
header("Location: " . $_SERVER['REQUEST_URI']);
exit();
}
?>
<form method="post" action="">
@theand
theand / gulpfile.js
Created January 28, 2014 10:49
gulp setting for my laravel app assets.
var gulp = require('gulp');
var minifycss = require('gulp-minify-css');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
gulp.task('css-compress', function(){
gulp.src(
[
'assets/stylesheets/vendor/colorbox.css',
@theand
theand / multiple_ln.sh
Created July 31, 2013 09:30
ln multiple files in current directory.
for file in /vagrant/*.conf; do sudo ln -s $file $(basename $file); done
for file in ../sites-available/*.conf; do sudo ln -s $file $(basename $file); done
@theand
theand / wire_dhcp.bat
Created June 1, 2013 22:18
[Windows BAT] setting DHCP/STATIC IP address for network adapter. Before running this script, must set device name in Control Panel.
@echo off
@echo "### Dynamic(DHCP) IP 설정 중.."
netsh -c int ip set address name="유선" source=dhcp
@echo "### Auto DNS 설정 중.."
netsh -c int ip set dns name="유선" source=dhcp register=PRIMARY
@theand
theand / .bashrc
Created January 18, 2013 13:41
basic .bashrc
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias vi='vim'
SVN_EDITOR="vim"
@theand
theand / crontab
Created January 18, 2013 13:40
crontab entry for backup script
0 3 * * * /root/remote_sql_backup.sh >& /root/log_db.log
30 3 * * * /root/remote_rawdb_backup.sh >& /root/log_raw.log
00 4 * * 0,2,4,6 /root/remote_home_backup.sh >& /root/log_home.log
@theand
theand / remote_sql_backup.sh
Created January 18, 2013 13:34
#BASH execute remote script, fetch archive, delete old archive
#!/bin/bash
eval `ssh-agent`
keychain id_dsa
. /root/.keychain/localhost-sh
remote_dir="/backup/mysql_sql_backup"
local_dir="/backup/mysql_sql_backup"
@theand
theand / remote_rawdb_backup.sh
Created January 18, 2013 13:30
#BASH execute remote script, fetch archive, delete old archive
#!/bin/bash
eval `ssh-agent`
keychain id_dsa
. /root/.keychain/localhost-sh
remote_dir="/backup/mysql_raw_backup/latest_mysql_raw_backup"
local_dir="/backup/mysql_raw_backup"