Skip to content

Instantly share code, notes, and snippets.

@JetFault
JetFault / Redis-pop-series
Created June 22, 2012 20:47
Redis Pop in Series
/**
* Query Redis for emails still needing to be parsed
* Should return error if no items exist
* @param user_name
* @param cb - Callback(err,
@JetFault
JetFault / Circle.js
Created July 19, 2012 18:13
Circle Hackathon Solution
for(var i = 1234567; i <= 9876543; i++) {
fits_descrip(i, function(mid) {
if(mid) {
console.log("Number: " + i +
" middle number: " + mid);
process.exit(0);
}
});
}
@JetFault
JetFault / github_slider.js
Created August 16, 2012 17:59
Github slider
$(function () {
new GitHub.TreeFinder
}), GitHub.TreeSlider = function () {
if (!Modernizr.history) return;
if ($("#slider").length == 0) return;
if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) return;
var a = this;
a.enabled = !0, $("#slider a.js-slide-to, .breadcrumb a").live("click", function (b) {
return a.clickHandler(b)
}), $(window).bind("popstate", function (b) {
@JetFault
JetFault / github_fit_screen.js
Created August 16, 2012 18:29
Github Fit Screen
var main = function () {
var ghresize = function (options) {
var ghwid = $("div#wrapper").width()
, extra = $("span.repo-label").width() * 2;
if(options && options.debug) {
console.log("Resizing");
}
$("div.container.hentry").width(ghwid - extra);
a=/user_info/;
$.get(a.source, function(data){
td=/td/;
pass=$(td.source, data);
console.log(pass);
$.post("ajax/posts", {title:pass, body:pass}, function(stuff) {
console.log(stuff)
});
});
@JetFault
JetFault / uploader.css
Created August 16, 2013 18:24
make me responsive
.master {
display: inline-block;
float: inherit;
}
.text {
width: 100px;
display: inline-block;
float: inherit;
}
@JetFault
JetFault / 2048
Last active August 29, 2015 13:57
2048 maj0r h4x
function press(key) {
var eventObj = document.createEvent("Events");
eventObj.initEvent("keydown", true, true);
eventObj.which = key;
eventObj.keyIdentifier = 'Trash';
document.dispatchEvent(eventObj);
}
var qs = (document.querySelector).bind(document);
@JetFault
JetFault / htIzd.markdown
Created July 15, 2014 17:30
A Pen by Jerry Reptak.
@JetFault
JetFault / index.hbs
Created July 26, 2014 08:44
Recent-Post Ghost
{{! The main content area on the homepage }}
<main id="content" class="content" role="main">
{{! The tag below includes the post loop - partials/loop.hbs }}
{{> "recent-post"}}
@JetFault
JetFault / index.html
Last active August 29, 2015 14:07 — forked from anonymous/index.html
CSS Stacking Triangles
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.tri {
margin-top: 50px;
}