Skip to content

Instantly share code, notes, and snippets.

@JetFault
JetFault / aws-cfn-bootstrap-centos7.sh
Last active March 27, 2021 07:07
aws-cfn-bootstrap for Centos7
yum install -y epel-release
yum install -y python-pip
cd /usr/bin
pip install pystache
pip install argparse
pip install python-daemon
pip install requests
cd /opt
@JetFault
JetFault / bookmarklet.js
Created May 12, 2015 18:02
Bookmarklet to show Twitter Bootstrap Breakpoints
javascript:(function()%7Bvar%20div%20%3D%20document.createElement('div')%3Bdiv.style.position%20%3D%20'fixed'%3Bdiv.style%5B'z-index'%5D%20%3D%209999999%3Bdiv.style%5B'background-color'%5D%20%3D%20'%23fff'%3Bdiv.style.padding%20%3D%20'5px'%3Bdiv.innerHTML%20%3D%20'%3Cdiv%20class%3D%22visible-xs-inline%22%3EXS%20tablet%20mobile%3C%2Fdiv%3E'%20%2B%20'%3Cdiv%20class%3D%22visible-sm-inline%22%3ESM%20tablet%3C%2Fdiv%3E'%20%2B%20'%3Cdiv%20class%3D%22visible-md-inline%22%3EMD%20desktop%3C%2Fdiv%3E'%20%2B%20'%3Cdiv%20class%3D%22visible-lg-inline%22%3ELG%20desktop-lg%3C%2Fdiv%3E'%3Bdocument.body.insertBefore(div%2C%20document.body.firstChild)%7D)()
@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;
}
@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 / htIzd.markdown
Created July 15, 2014 17:30
A Pen by Jerry Reptak.
@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 / 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;
}
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 / 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);
@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) {