Skip to content

Instantly share code, notes, and snippets.

View ilmsg's full-sized avatar
😍
love me love my bug

Eak Netpanya ilmsg

😍
love me love my bug
View GitHub Profile
var requirejs = require('requirejs');
requirejs.config({
nodeRequire: require
});
requirejs(['express', 'connect', 'connect-redis'], function(express, connect, ConnectRedis) {
var app = express.createServer();
var RedisStore = new ConnectRedis(express);
@ilmsg
ilmsg / xmas.pl
Created July 22, 2013 15:04 — forked from sugyan/xmas.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Encode 'encode_utf8';
my $s = ' ' . encode_utf8(pack 'U', 0x2605);
my $f = encode_utf8(pack 'U', 0xFF0F);
my $b = encode_utf8(pack 'U', 0xFF3C);
my $o = [ map { encode_utf8(pack 'U', $_) } (
0x0069, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
@ilmsg
ilmsg / app.js
Created July 24, 2013 02:25 — forked from arvis/app.js
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, http = require('http')
, mongoose = require('mongoose')
, path = require('path');
// Pikachu.js
// 테러범들에겐 백만볼트!
// 사용법__________________________
// 사용법은 간단하다. "var pikachu = require("Pikachu.js");"로 초기화 한 후 http.createServer에다가 붙여주면 된다.
// req와 res는 알다시피 request와 response. :)
// 특정 사이트에서 공격이 들어온다거나 할 때 http referer를 바탕으로 검열(?!) 쯤 해준다고 보면 된다.
// 차단하기 쉽도록 유명한 사이트들은 미리 정규표현식을 만들어놨다. 필요할 때 요긴하게 쓸 수 있다.
exports.dcinside = '/(.+?)dcinside.com/';
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
<html>
<head>
<title>jsonp test</title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function(){
$('#select_link').click(function(e){
e.preventDefault();
console.log('select_link clicked');
#!/bin/bash
# (Re)spawn the application
function spawn () {
local ps_name=$1
local spawn_cmd=$2
local pids=`ps -C $ps_name -o pid=`
if [ ${#pids} -ne 0 ]
then
echo "Sending TERM to $pids..."
var xmpp = require('node-xmpp'),
secret = require('./secret'),
util = require('util');
var creds = {
jid: '[email protected]',
password: secret.pw, //string
};
var GChat = function(creds) {
@ilmsg
ilmsg / README.md
Created September 7, 2013 03:34 — forked from domenic/README.md

Here's how this works:

  • Include a git_hooks/ directory in your project, with these two files (plus other hooks if you want, written in a similar style).
  • Add "npm" to your devDependencies in package.json, so that the pre-commit hook can do its magic.
  • Add test and lint scripts to your package.json, e.g.
    "scripts": {
        "test": "mocha",
 "lint": "jshint ./lib --show-non-errors"