Skip to content

Instantly share code, notes, and snippets.

View whatrocks's full-sized avatar
💾
Create wonderful things, be good, have fun

Charlie Harrington whatrocks

💾
Create wonderful things, be good, have fun
View GitHub Profile
@markgoodyear
markgoodyear / 01-gulpfile.js
Last active May 5, 2023 03:21
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@robinsloan
robinsloan / unfave.rb
Last active November 6, 2024 14:29
Unfave script, because why not??
#!/usr/bin/env ruby
require "rubygems"
require "twitter"
require "json"
require "faraday"
# things you must configure
TWITTER_USER = "your_username"
# get these from dev.twitter.com
@jakeyr
jakeyr / safe.md
Created November 29, 2016 17:57 — forked from bryanrite/safe.md
Safe Postgres Operations on High Volume Tables

Originally taken from: Braintree Article and expanded on by me.

Safe

  • Add a new column
  • Drop a column
  • Rename a column
  • Add an index concurrently (Example), Note: it will still take a long time to run the migration, but it won't write-lock the table.
  • Drop a constraint (for example, non-nullable)
  • Add a default value to an existing column
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active September 4, 2025 01:33
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@veekram
veekram / get_workers.rb
Created May 3, 2018 12:20 — forked from kerlin/get_workers.rb
Calling the Workday API in Ruby with Savon
#!/usr/bin/env ruby
#
# Example Ruby CLI script to retrieve worker data from Workday
# Call on command line with worker id; prints worker name
# add "request" or "response" after worker id and prints the
# outgoing xml or received hash and exits.
#
# Using Savon version 2 for the SOAP client (2.11.2)
#
# Savon defaults to making the message tag the same as the operation name
@davidhughhenrymack
davidhughhenrymack / floydhub_hook.py
Created June 26, 2018 09:09
An easy way to graph your tensorflow metric ops in FloydHub
import tensorflow as tf
import numpy as np
class FloydHubMetricHook(tf.train.SessionRunHook):
"""An easy way to output your metric_ops to FloydHub's training metric graphs
This is designed to fit into TensorFlow's EstimatorSpec. Assuming you've
already defined some metric_ops for monitoring your training/evaluation,
this helper class will compute those operations then print them out in
@whatrocks
whatrocks / fling.md
Last active October 8, 2023 15:42
fling pattern on Farcaster

fling ⌆

The fling pattern is a constraint on the Farcaster protocol which allows you to keep a daily log of your work, while benefitting from all the great social features of Farcaster.

Inspiration

  • John Carmack's .plan files
  • OhLife.com (now defunct startup that emailed you 1x a day with "How did your day go?")

Constraints