Skip to content

Instantly share code, notes, and snippets.

Always be shipping

Jerod Santo jerodsanto

Always be shipping
Block or report user

Report or block jerodsanto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jerodsanto /
Created Feb 14, 2019
Provided by Paige Bailey on JS Party
import tensorflow as tf
mnist = tf.keras.datasets.mnist
(x_train, y_train),(x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0
model = tf.keras.models.Sequential([
tf.keras.layers.Flatten(input_shape=(28, 28)),
tf.keras.layers.Dense(512, activation=tf.nn.relu),
jerodsanto / poor_mans_ping_test.rb
Created Jun 15, 2010
A poor man's replacement for Ruby's Ping.pingecho method
View poor_mans_ping_test.rb
# Ping.pingecho uses TCP echo requests, which sucks when you really want
# to know if the machine is pingable, ie - it answers ICMP requests
# Here's a poor man's replacement for use in a pinch:
def pingable?(host, timeout=5)
system "ping -c 1 -t #{timeout} #{host} >/dev/null"
jerodsanto / Rakefile
Created Jan 10, 2015
A code dump showing how we generate "The Changelog Weekly" using the Trello API
View Rakefile
require "rubygems"
require "bundler"
require_relative "lib/importer"
desc "Import from Trello board"
task :import do ENV["ISSUE"]
jerodsanto /
Last active Jan 21, 2018
Changelog Admin Feature: Add Images by URL


Many objects in Changelog's system have attachable images. People have avatars. Sponsors have logos. Topics have icons. Etc.

Currently, we attach images by downloading them to our machines and then uploading them via a file input on the forms. An example form:

This is fine, but many times the images already exist on the web somewhere.


Wire for Podcasters


Most podcasters (ourselves included) begrudgingly use Skype to record our shows for two reasons:

  1. Most reliable call quality/lacency
  2. Network effect (guests usually have an account already)
jerodsanto / gist:1137337
Created Aug 10, 2011
Bookmarklet to uncripple Kindle Cloud Reader
View gist:1137337
(function() {
function uncrippleFrame() {
var body = this.contentWindow.document.getElementsByTagName('body')[0];
this.contentWindow.onclick = null;
body._frame = this;
body.onmousemove = function() {
this._frame.contentWindow.onclick = null;
this.setAttribute('style', '-webkit-user-select: auto;');
jerodsanto / gravatar_url.ex
Created Dec 30, 2015
Elixir's pipeline operator makes FP joyous. Here it is transforming an email address for Gravatar'ing
View gravatar_url.ex
def gravatar_url(email, size) do
hash = email
|> String.strip
|> String.downcase
|> :erlang.md5
|> Base.encode16(case: :lower)
jerodsanto / httperf_big_cookies.rb
Created Aug 5, 2013
Httperf only allows cookies of 256 bytes or less. Rails sets cookies that are bigger than that. This will result in output such as `httperf.sess_cookie: truncating cookie to 245 bytes` and failed Rails sessions. This brew adds the `--big-cookies` option to the `httperf` formula so you can use it with Rails.
View httperf_big_cookies.rb
require 'formula'
class Httperf < Formula
homepage ''
url ''
sha1 '2aa885c0c143d809c0e50a6eca5063090bddee35'
option 'enable-debug', 'Build with debugging support'
option 'big-cookies', 'Allow cookies larger than 256 bytes'
jerodsanto / firehol.conf
Last active Dec 19, 2015
various Debian-related scripts & configs
View firehol.conf
version 5
interface any world
policy drop
server "ssh icmp http https" accept
client all accept
View development.searchd.query.log
[ext2/1/ext 1 (0,20)] [straight_topics_core`, `infix_topics_core] apple @sphinx_internal_class_name (Topic)
You can’t perform that action at this time.