Skip to content

Instantly share code, notes, and snippets.

View jessepollak's full-sized avatar

Jesse Pollak jessepollak

View GitHub Profile
@jessepollak
jessepollak / final_proposal.md
Created October 1, 2012 06:41 — forked from dunvi/final_proposal.md
final proposal

Final Proposal

Our plan is to create a continuous integration server.

A variety of continuous integration server options already exist, such as Jenkins, CruiseControl, and Buildbot. These options, and many others, satisfy a variety of different user requirements; however, they all also suffer from problems. The largest problem is that most are massively complicated, built for the intricate needs of big, diverse teams that need an extremely customized set of needs. This means that they are massively configurable, but also means that it takes a serious chunk of time to set up any project. For small teams, testing is already a major hurdle, and setting up a continuous integration server takes so much time and expertise that it is difficult to justify.

We intend to build Rosie as a better option for small teams. Continuous integration is one of the best forms of testing feedback out there, and it should be easier to start using for any project. We are looking to shed much of the weight in current continuous

# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
sudo apt-get install nodejs
# install the Node package manager for later use
curl http://npmjs.org/install.sh | sudo sh
sudo npm install express
# clone the statsd project
git clone https://github.com/etsy/statsd.git
# download everything for graphite
var shown = false;
window.onload = function () {
window.addEventListener("keydown",keyDown);
window.addEventListener("keyup",keyUp);
document.body.innerHTML += '<div id="keylog" style="width: 100px; height: 100px; background-color: #ccc; opacity: 0.9; top: 30%; left: 45%; position: absolute; z-index: 5; display: none; font-size: 100px; line-height:100px; color: white; font-weight: bold; padding: 40px; text-align: center; border-radius: 10px; -moz-border-radius: 10px; font-family: Helvetica, sans-serif;"></div>';
};
function keyDown(e) {
@jessepollak
jessepollak / handleMessage.js
Last active December 24, 2015 21:59
Checking postMessage host
normalize = function(url) {
var parser;
parser = document.createElement('a');
parser.href = url;
return "" + parser.protocol + "//" + parser.host;
};
function handleMessage(e) {
// ...
<?php
$args = array(
'code' => $_REQUEST['code'],
'app_id' => self::setting( 'clef_settings_app_id' ),
'app_secret' => self::setting( 'clef_settings_app_secret' ),
);
$response = wp_remote_post(
CLEF_API_BASE . 'authorize',
@jessepollak
jessepollak / wordpress-plugin-git
Last active December 28, 2015 22:49
WordPress plugin on Github
# I do all development off of master and keep a branch "trunk," which has a fully linear history.
# starting on master
git add -p
git commit -m "finishes v1.1"
git push origin master
# we need to keep a linear history in trunk, so
# let's use the first merge --theirs strategy from here
# http://stackoverflow.com/questions/4911794/git-command-for-making-one-branch-like-another/4912267#4912267
@jessepollak
jessepollak / what_the_zip.txt
Created November 25, 2013 15:33
What is up with zip?
array_1 = [1, 2, 3, 4, 5, 6]
array_2 = [7, 8, 9, 10]
array_3 = zip(array_1, array_2)
array_3 = ?
@jessepollak
jessepollak / basic_zip.txt
Created November 25, 2013 15:42
What is zip?
array_1 = [1, 2, 3, 4, 5]
array_2 = [6, 7, 8, 9, 10]
zip(array_1, array_2)
=> [[1, 6], [2, 7], [3, 8], [4, 9], [5, 10]]
array_1 = [1, 2, 3, 4]
array_2 = [1, 2, 3]
zip(array_1, array_2)
# => [(1, 1), (2, 2), (3, 3)]
zip(array_1, array_2)
# => [(1, 1), (2, 2), (3, 3)]
var array_1 = [1, 2, 3, 4];
var array_2 = [1, 2, 3];
_.zip(array_1, array_2);
// => [[1, 1], [2, 2], [3, 3], [4, undefined]]
_.zip(array_2, array_1);
// => [[1, 1], [2, 2], [3, 3], [undefined, 4]]