Skip to content

Instantly share code, notes, and snippets.

View seigel's full-sized avatar

James Seigel seigel

View GitHub Profile
@stefaneng
stefaneng / jq_group_by_count.sh
Created March 21, 2018 17:00
jq - Group by count
echo '[{"key": 1}, {"key": 2}, {"key": 1}]' | jq 'group_by (.key)[] | {key: .[0].key, length: length}'

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@korayal
korayal / nodejs-udpclient.js
Created December 7, 2012 12:34
Node.js: UDP client (that should wait for a response before closing)
var dgram = require('dgram');
sendUDPMessage("10.1.2.3", 1234, Buffer("Release The Kraken!"));
function sendUDPMessage(targetIP, targetPORT, message){
var client = dgram.createSocket("udp4");
client.on('error', function(e) {
throw e;
@mshafrir
mshafrir / states_hash.json
Created May 9, 2012 17:05
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@nicolasblanco
nicolasblanco / nginx_site
Created August 23, 2011 15:44
My Sprinkle script to setup a Continuous Integration server with Ruby 1.9/Jenkins/nginx/PostgreSQL
# Sprinkle setup script for our CI server (Ruby 1.9/Git/PostgreSQL/nginx reverse proxy)
#
package :build_essential do
description 'Build tools'
apt 'build-essential' do
# Update the sources and upgrade the lists before we build essentials
pre :install, ['aptitude update', 'aptitude safe-upgrade', 'aptitude full-upgrade']
end
end