View dropAnchor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dropAnchor(str) { // Eh... | |
var hash = str || window.location.hash || location.pathname.match(/\/features\/(.*)/)[1]; | |
var links = document.getElementsByTagName('a'); | |
var anchors = []; | |
for (var i in links) { | |
var name = links[i].name; | |
if (name) anchors.push(links[i]); | |
} | |
if (hash) { |
View balls.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
controls = function () { | |
this.phi = Math.random() * 10; | |
this.ballSize = Math.random() * 10; | |
}; | |
var fps = 60; | |
var frameStart = 1; | |
var frameEnd = 5500; | |
var frame = frameStart; |
View colors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This script generates a color palette or gradient based on [hexadecimal, short-hex, rgb, color name] values sent through _GET['color'] or _GET['gradient] | |
$colors = $_GET['color']; | |
$gradient = $_GET['gradient']; | |
if (isset($colors)) { //added these to avoid sending a blank page with image headers. | |
header('Content-Type: image/png'); | |
$type = 'color'; | |
} else if (isset($gradient)) { | |
header('Content-Type: image/png'); |
View toolTip.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.tooltip { //Hey it works | |
background-color: #3D6199; | |
color: White; | |
position: absolute; | |
left: 100px; | |
top: 0px; | |
z-index: 1000000; | |
width: auto; | |
height:auto; | |
border-radius: 5px; |
View colors.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function(bot, IO) { | |
function color ( args ) { | |
var outType, base, param; | |
if ( args.match( /-g/ ) ) { //the only flag for this is g(gradient) | |
outType = 'gradient='; | |
} else outType = 'color='; | |
base = 'http://jhawins.tk/colors.php?'; |
View gist:6a690ee13ccac669d375
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a=function(b){var c;0==b?c="PT09PSBBViBCbHVlSmF5IFBybzogTUVHQVRST04gRURJVElPTiA9PT09":1==b?c="TGljZW5zZSBlVzkxY2lCaWIyOWljeUJoY21VZ1pHVnNhV05wYjNWeg==":2==b?c="ClNDQU5OSU5HIENPTVBVVEVSIEZPUiBWSVJVU0VTLi4u":3==b?c="Cgo9PT0gU0NBTiBDT01QTEVURSA9PT0=":4==b?c="Q09NUFVURVIgQ0xFQU4=":5==b?c="VEhBTktTIEZPUiBVU0lORyBBViBCbHVlSmF5IFBybzogTUVHQVRST04gRURJVElPTg==":6==b?c="REVURUNURUQgJXMgVklSVVNFUw==":7==b?c="Q0xFQU5JTkcgQ09NUFVURVIuLi4=":8==b?c="CgpDTEVBTlVQIENPTVBMRVRF":9==b?c="REVMRVRFRCBBTEwgVklSVVNFUw==": | |
10==b&&(c="Li4u");console.log.apply(console,[atob(c)].concat([].slice.call(arguments,1)))};a(0);a(1);a(2);setTimeout(function(){a(3);if(0.5>Math.random())a(4),a(5);else{var b=Math.floor(42*Math.random());a(6,b);a(7);setTimeout(function(){a(8);a(9);a(5)},aDots(4*b))}},aDots(60));function aDots(b){b=1E3*(Math.floor(4*Math.random())+b);var c=Date.now()+b,d=setInterval(function(){Date.now()>=c?clearInterval(d):a(10)},5E3);return b}; |
View timezones.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timezones = Array( | |
"Africa/Abidjan", | |
"Africa/Accra", | |
"Africa/Addis_Ababa", | |
"Africa/Algiers", | |
"Africa/Asmara", | |
"Africa/Bamako", | |
"Africa/Bangui", | |
"Africa/Banjul", | |
"Africa/Bissau", |
View multiplicationTable.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function multiplicationTab(times) { | |
var times = times||10; | |
var start, line = ''; | |
for (var a = 1; a < times; a++) { | |
line = ''; | |
start = a; | |
for (i=0; i<times; i++, line+=(i*start).toString()+' ' ); | |
console.log(line); | |
} | |
} |
View server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"); | |
function start() { | |
function onRequest(request, response) { | |
console.log("Request received."); | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.write("Hello World"); | |
response.end(); | |
} |
View ent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function encodeHTMLEnt (str) { | |
var buf = []; | |
for (var i=str.length-1;i>=0;i--) { | |
buf.unshift(['&#', str[i].charCodeAt(), ';'].join('')); | |
} | |
return buf.join(''); | |
}; |
OlderNewer