Skip to content

Instantly share code, notes, and snippets.

View 0xjjpa's full-sized avatar
🔒
Hiding encrypted secrets

Jose Aguinaga 0xjjpa

🔒
Hiding encrypted secrets
View GitHub Profile
@0xjjpa
0xjjpa / gist:3155012
Created July 21, 2012 07:44 — forked from anonymous/gist:2661058
Ziggurat for Firefox
var win = gBrowser.selectedBrowser.contentWindow;
var doc = win.document;
var output = doc.createElement("div");
output.id = "output";
doc.body.appendChild(output);
var style = doc.createElement("style");
style.innerHTML = "div#output { margin-top: 10em; white-space: pre; } div#output span { padding: 0.6em; margin: 0 0.6em; border: 1px solid rgba(0, 0, 0, 0.8); border-radius: 0.2em; box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4); position: relative; bottom: 1em; background-color: #ff5454; } div#output span > span { background-color: #ffa054; } div#output span > span > span { background-color: #ffff54; } div#output span > span > span > span { background-color: #8cd446; } div#output span > span > span > span > span { background-color: #45d2b0; } div#output span > span > span > span > span > span { background-color: #438ccb; } div#output span > span > span > span > span > span > span { background-color: #8c3fc0; } div#output span > span > span > span > span > span > span > span { background-color: #d145c1; } div#o
@0xjjpa
0xjjpa / install.md
Created October 21, 2012 01:33 — forked from svnlto/install.md
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, nvm

Setup new Mac with OSX Lion from scratch

Latest update 20-Oct-2012. [email protected]

Command Line Tools are required for Homebrew. Previously it was suggested to download Xcode 4, but since the new version doesn't ship the proper gcc compiler for rvm, the command line tools are a better option and then using homebrew to get the gcc compiler. If preferred, install Xcode 4, although this setup doesn't follow that set of instructions.

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

@0xjjpa
0xjjpa / html5boilerplate.jade
Created November 28, 2012 08:26
JADE: HTML5 Boilerplate (complete)
!!! 5
//if lt IE 7
<html class="no-js lt-ie9 lt-ie8 lt-ie7">
//if IE 7
<html class="no-js lt-ie9 lt-ie8">
//if IE 8
<html class="no-js lt-ie9">
//[if gt IE 8]><!
html(class='no-js')
//<![endif]
@0xjjpa
0xjjpa / icse2013-preprint.md
Created December 7, 2012 19:16 — forked from akuhn/icse2013-preprint.md
Preprints of ICSE 2013 papers

Preprints of ICSE 2013 papers

Found 21 preprints so far of the 85 papers listed here, http://2013.icse-conferences.org/content/accepted-papers-technical-research-track (most recent additions first)

If yours is missing, tweet or email me! The same if you find a false positive.

What Good Are Strong Specifications? Nadia Polikarpova, Carlo A. Furia, Yu Pei, Yi Wei, and Bertrand Meyer (ETH Zurich, Switzerland)

// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
{
"manifest_version": 2,
"name": "Chrome Socket API Server",
"description": "listen & accept for socket",
"version": "0.1",
"app": {
"background": {
"scripts": ["server.js"]
}
},
{
"manifest_version": 2,
"name": "Chrome Socket API Server",
"description": "listen & accept for socket",
"version": "0.1",
"app": {
"background": {
"scripts": ["server.js"]
}
},
{
"manifest_version": 2,
"name": "Chrome Socket API Server",
"description": "listen & accept for socket",
"version": "0.1",
"app": {
"background": {
"scripts": ["server.js"]
}
},

Using Yeoman and Jade

Getting started

  • Make sure you have yo installed: npm install -g yo
  • Run: yo webapp
  • Install grunt-contrib-jade: npm install grunt-contrib-jade --save-dev

Customization

//Add this at the bottom of your page right before </body>
//Will let the page content load before loading js
//Make sure you don't have critical js necessary for loading the page when using this because it will break it
function downloadJSOnload() {
var element = document.createElement('script');
element.setAttribute('src', 'a.js');
document.body.appendChild(element);
}
if (window.addEventListener) {
window.addEventListener('load', downloadJSOnload, false);