Skip to content

Instantly share code, notes, and snippets.

@wakhub
wakhub / polyglot.pl.php.py.rb
Created April 28, 2012 16:32
PHP and Perl and Python/Ruby polyglot
#<?php eval('echo "PHP Code\n";'); __halt_compiler(); ?>
print ((("b" + "0" == 0) and eval('"Perl Code\n"')) or (0 and "Ruby Code\n" or "Python Code"));
__DATA__ = 1
"""""
__END__
===== This is comment of all. =====
@wakhub
wakhub / fib.c
Created April 26, 2012 15:16
C and konoha fibonacci
#include <stdio.h>
int fib(int n) {
if (n <= 1) {
return n;
}
return fib(n - 1) + fib(n - 2);
}
int main(){
@wakhub
wakhub / gist:2392872
Created April 15, 2012 13:44
Append jQuery & jQuery UI Bookmarklet
javascript:(function(){var u='https://ajax.googleapis.com/ajax/libs/',d=document,s=d.createElement('script'),s2=s.cloneNode();s.src=u+'jquery/1.7.2/jquery.min.js';s2.src=u+'jqueryui/1.8.18/jquery-ui.min.js';d.head.appendChild(s);d.head.appendChild(s2)})();