View redirect.html
<meta http-equiv="refresh" content="0; url=http://yousite.com/blog/2013/10/21/my-post/">
<link rel="canonical" href="http://yousite.com/blog/2013/10/21/my-post/" />
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
View ssl.sh
openssl req -newkey rsa:2048 -new -nodes -keyout key.pem -out csr.pem
###################
openssl genrsa 1024 > host.key
chmod 400 host.key
openssl req -new -x509 -nodes -sha1 -days 365 -key host.key -out host.cert
View json.py
import json
from datetime import date, datetime
def json_serial(obj):
"""JSON serializer for objects not serializable by default json code"""
if isinstance(obj, (datetime, date)):
serial = obj.isoformat()
return serial
raise TypeError ("Type %s not serializable" % type(obj))
View wipe.sh
diskUtil randomDisk 2 /dev/disk4
View ping.sh
ping -b -c 2 255.255.255.255 > /dev/null 2>&1; arp -an
View twitch.html
<script>
// Inspired by tiny-twitch
//var e,s=0,t=Date.now();function f(){((e = Date.now()-t)<15000)?a.style.margin=++s+e%300:alert(s)}
var e,
s = 0,
o = 15000,
t = Date.now();
function f() {
View reset.css
/************* Method #1 ***************/
html, body, h1, h2, h3, h4, h5, h6, p, ol, ul, li, dl, dt, dd, blockquote, address {
margin: 0;
padding: 0;
}
/************* Method #2 ***************/
html, body, div, span, applet, object, iframe,
View eco.js
var plan = ["############################",
"# # # o ##",
"# #",
"# ##### #",
"## # # ## #",
/* y */ "### ## # #",
"# ### # #",
"# #### #",
"# ## o #",
"# o # o ### #",
View Palindrome.js
var exampleStr = 'ja emmaj';
function isPalindrome (str) {
var re = /\W_/g;
var regStr = str.toLowerCase().replace(re, '');
var reverseStr = regStr.split('').reverse().join('');