Skip to content

Instantly share code, notes, and snippets.

View keimoon's full-sized avatar

Tam. Nguyen Duc keimoon

View GitHub Profile
#!/usr/bin/env bash
flip() {
echo $1 | tr abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ɐqɔpǝɟɓɥıɾʞlɯuodbɹsʇnʌʍxʎz∀ðƆᗡƎℲ⅁HIſ⋊⅂WNOԀΌᴚS⊥∩ΛMX0⅄ | rev
}
test $# -lt 2 && echo 'Who to fuck?' && exit
test $1 != 'you' && echo 'Please be noble, call fuck you <process>' && exit
@keimoon
keimoon / fix_heartbleed.sh
Created April 10, 2014 03:57
OpenSSL Heartbleed patch
#!/usr/bin/env bash
DIR=`dirname $BASH_SOURCE`
test "x`whoami`" != "xroot" && echo "Please run as root" && exit
version=`openssl version`
version=${version:0:14}
test "x$version" == 'xOpenSSL 1.0.1g' && echo "OpenSSL version 1.0.1g is OK!!!" && exit
echo -n "Your OpenSSL version is $version. Are you sure to upgrade to 1.0.1g? [Y/n]: "
read confirm
test "x$confirm" != "xY" && echo "Bye" && exit
echo "Checking openssl in /usr/local/bin"
@keimoon
keimoon / nginx.sh
Created April 10, 2014 04:40
Compiling Nginx with NEW openssl (1.0.1g) on FREEBSD
# Make /usr/ports/security/openssl first
# Dont clean it
./configure --with-openssl=/usr/ports/security/openssl/work/openssl-1.0.1g
/usr/bin/env CC="cc" FREEBSDCC="cc" CFLAGS="-O2 -pipe -fno-strict-aliasing" PERL="/usr/local/bin/perl" PTHREAD_CFLAGS= PTHREAD_LIBS=-pthread make
make install
@keimoon
keimoon / hipchat.js
Created April 15, 2014 04:39
Tamper JS hipchat emo code =))
// ==UserScript==
// @name HipChat emo
// @namespace http://gottb.io/
// @version 0.1
// @description HipChat emo
// @match https://gottb.hipchat.com/chat*
// @copyright 2012+, You
// ==/UserScript==
$(document).ready(function(){
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) { val = x; }
* }
*/
import java.lang.reflect.Constructor;

Keybase proof

I hereby claim:

  • I am keimoon on github.
  • I am keimoon (https://keybase.io/keimoon) on keybase.
  • I have a public key ASBO1VkUkaEyKR6rOdIXg6UxysfxKSFHa9DNt0LSJl4bKwo

To claim this, I am signing this object: