Skip to content

Instantly share code, notes, and snippets.

View baxang's full-sized avatar

Sanghyun Park baxang

  • Jora
  • Sydney, Australia
View GitHub Profile
@baxang
baxang / cp.bat
Created August 14, 2012 18:46
A Windows batch file that conveniently uninstalls known malware. From the original post http://goo.gl/NrhST
"%APPDATA%\RapidGet\RPGUnist.exe"
"%PROGRAMFILES%\1410002\unins000.exe"
"%PROGRAMFILES%\365boan\uninst_365boan.exe"
"%PROGRAMFILES%\4shared.com\UNWISE.exe"
"%PROGRAMFILES%\4shared Desktop\uninstall.exe"
"%PROGRAMFILES%\동키호테\uninstall.exe"
"%PROGRAMFILES%\디팝매니저V3\unins000.exe"
"%PROGRAMFILES%\사이트 바로가기\uninst.exe"
"%PROGRAMFILES%\스마트튠\uninst.exe"
"%PROGRAMFILES%\11STshoppingIcon\uninstall.exe"
@baxang
baxang / unicode-key-symbols.rb
Created August 3, 2012 10:29
This script produces a comma separated list of special key symbols in Unicode for WP-Table Reloaded.
#!/usr/bin/env ruby
# coding: utf-8
# Raw data : http://unicode.org/Public/UNIDATA/UnicodeData.txt
# Format : http://www.ksu.ru/eng/departments/ktk/test/perl/lib/unicode/UCDFF301.html
require 'csv'
require 'htmlentities'
options = {
$view = new view;
$view->name = 'advocacy_db';
$view->description = 'Advocacy Database';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
@baxang
baxang / rvm2rbenv.txt
Created May 16, 2012 12:50 — forked from brentertz/rvm2rbenv.txt
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@baxang
baxang / smi2srt.py
Created April 3, 2012 17:42
convert script in SMI to SRT format
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@package smi2srt
@brief this module is for convert .smi subtitle file into .srt subtitle
(Request by Alfred Chae)
Started : 2011/08/08
license: GPL
@baxang
baxang / fastcgi_params
Created March 22, 2012 18:01
Nginx configuration for Wordpress 3.3.1
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
@baxang
baxang / gist:1395787
Created November 26, 2011 14:39
nginx init.d script
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
@baxang
baxang / gist:1308662
Created October 24, 2011 09:27 — forked from dipolesource/gist:1265576
Log Juggernaut via Monit
check host juggernaut with address 127.0.0.1
start program = "/bin/bash -c '2>&1 1>>/home/deploy/juggernaut.log /usr/local/bin/node /usr/local/lib/node_modules/juggernaut/server.js'"
stop program = "/bin/kill -9 $(pidof node);/bin/kill -9 $(pgrep -f 'bash -c 2>&1 1>>/home/deploy/juggernaut.log')"
if failed port 8080 protocol HTTP
request /application.js
with timeout 10 seconds
then restart
@baxang
baxang / gist:1308661
Created October 24, 2011 09:27 — forked from Aslan/gist:536379
set daemon 30 # with start delay 30
set mailserver localhost # sudo apt-get install postfix
set mail-format { from: monit@mydomain.com }
set alert my@email.com
set logfile /var/log/monit.log
check process redis-server with pidfile /var/run/redis.pid
start program = "/usr/local/bin/redis-server /data/redis/redis.conf"
stop program = "/usr/bin/killall -9 redis-server"
if totalmem is greater than 500.0 MB for 5 cycles then alert
if cpu is greater than 80% for 5 cycles then alert