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 / nginx.conf
Last active August 29, 2015 14:10 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
var Browser = require('zombie'),
url = require('url'),
fs = require('fs'),
$q = require('Q'),
saveDir = __dirname + '/_snapshots';
var scriptTagRegex = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;
var stripScriptTags = function(html) {
//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);

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

{
"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"]
}
},
// 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!"
@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)

@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]