Skip to content

Instantly share code, notes, and snippets.

View davewalk's full-sized avatar
💭
test

Dave Walk davewalk

💭
test
  • Philadelphia, PA
View GitHub Profile
@tmaiaroto
tmaiaroto / pre-commit
Last active July 30, 2016 22:29
A Go Commit Hook for Less Future Headaches
#!/bin/bash
#
# Check a "few" things to help write more maintainable Go code.
#
# OK, it's fairly comprehensive. So simply remove or comment out
# anything you don't want.
#
# Don't forget to install (go get) each of these tools.
# More info at the URLs provided.
#
@beauzeaux
beauzeaux / sqlite2parquet.py
Created April 23, 2015 19:58
sqlite2parquet
import sqlite3
import os
import argparse
try:
import pyspark
import pyspark.sql
except ImportError:
import sys
import os
@EliseWei
EliseWei / PTW15.js
Last active November 19, 2015 22:07
Script snippets used for Dev Day talk on 4/23/15 (updated 11/19/15)
// Placekittens http://www.houzz.com/photos/products
// Example 1
var target = document.getElementsByClassName('shop-landing-top-promotions')[0];
target.innerHTML = '<img src="http://placekitten.com/g/800/120" alt="" />';
// Example 2
var target = document.getElementsByClassName('shop-landing-top-promotions')[0];
var targetInner = target.getElementsByClassName('shop-landing-top-promotions-content')[0];
targetInner.style.visibility='hidden';
target.style.background = 'url("http://placekitten.com/g/800/120") 0 0 repeat';
@timelyportfolio
timelyportfolio / Readme.md
Last active August 29, 2015 14:15
R tests Javascript simple-statistics with V8

With V8 from Jeroen Ooms, we can do things like use R totest this Javascript stats library simple-statistics from Tom McWright.

@hcurotta
hcurotta / post-merge
Created October 17, 2014 14:34
Post Merge git hook to trigger codeship deployment when using BitBucket
#!/bin/bash
branch_name=$(git symbolic-ref --short HEAD)
if [ "$branch_name" == 'dev' ] || [ "$branch_name" == 'staging' ]
then
git commit --allow-empty -m 'empty commit to trigger deployment'
fi
@kachayev
kachayev / concurrency-in-go.md
Last active May 31, 2024 09:34
Channels Are Not Enough or Why Pipelining Is Not That Easy
@mxriverlynn
mxriverlynn / browserify.js
Created June 17, 2014 20:21
unit testing browserify modules in a (headless) browser
module.exports = function(grunt){
grunt.initConfig({
// ...
browserify: {
specs: {
src: ["web/specs/**/*Specs.js"],
dest: "web/public/build/specs.js",
options: {
@0xjjpa
0xjjpa / chrome.md
Created December 9, 2012 04:37
Understanding Google Chrome Extensions

#Introduction

Developing Chrome Extensions is REALLY fun if you are a Front End engineer. If you, however, struggle with visualizing the architecture of an application, then developing a Chrome Extension is going to bite your butt multiple times due the amount of excessive components the extension works with. Here are some pointers in how to start, what problems I encounter and how to avoid them.

Note: I'm not covering chrome package apps, which although similar, work in a different way. I also won't cover the page options api neither the new brand event pages. What I explain covers most basic chrome applications and should be enough to get you started.

Table of Contents

  1. Understand the Chrome Architecture
  2. Understand the Tabs-Extension Relationship
  3. Picking the right interface for the job
# Usage: cas-get.sh {url} {username} {password} # If you have any errors try removing the redirects to get more information
# The service to be called, and a url-encoded version (the url encoding isn't perfect, if you're encoding complex stuff you may wish to replace with a different method)
DEST="$1"
ENCODED_DEST=`echo "$DEST" | perl -p -e 's/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg' | sed 's/%2E/./g' | sed 's/%0A//g'`
#IP Addresses or hostnames are fine here
CAS_HOSTNAME=team.eea.sk
#Authentication details. This script only supports username/password login, but curl can handle certificate login if required
USERNAME=$2
@michaelcox
michaelcox / SpecRunner.js
Last active January 11, 2024 06:05
Browser Unit Testing with Backbone Mocha Chai and RequireJS
require.config({
baseUrl: '/backbone-tests/',
paths: {
'jquery' : '/app/libs/jquery',
'underscore' : '/app/libs/underscore',
'backbone' : '/app/libs/backbone',
'mocha' : 'libs/mocha',
'chai' : 'libs/chai',
'chai-jquery' : 'libs/chai-jquery',
'models' : '/app/models'