Skip to content

Instantly share code, notes, and snippets.

View jerodsanto's full-sized avatar
:shipit:
Always be shipping

Jerod Santo jerodsanto

:shipit:
Always be shipping
View GitHub Profile
@jerodsanto
jerodsanto / Rakefile
Created January 10, 2015 16:51
A code dump showing how we generate "The Changelog Weekly" using the Trello API
require "rubygems"
require "bundler"
require_relative "lib/importer"
Bundler.setup
desc "Import from Trello board"
task :import do
Importer.new(File.dirname(__FILE__)).import ENV["ISSUE"]
end
#!/usr/bin/env ruby
#--
# Name : git_watch.rb
# Author : Jerod Santo
# Contact : "moc.liamg@otnas.dorej".reverse
# Date : 2008 October 14
# About : Checks a git repository for changes and emails provided email
# address if changes have been made. Schedule with cron.
#--
@jerodsanto
jerodsanto / giveaway.js
Created March 11, 2021 15:19
Deno/js code to pick 3 random winners from a channel using the Slack API
// connect to the Slack API
let slack = "https://changelog.slack.com/api"
let token = Deno.env.get("SLACK_TOKEN")
let channel = "C1YNE3WUX"
let url = new URL(`${slack}/conversations.members`)
url.searchParams.set("token", token)
url.searchParams.set("channel", channel)
@jerodsanto
jerodsanto / principles.md
Created October 23, 2019 16:10
The 12 principles behind the Agile Manifesto
  1. Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.
  2. Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage.
  3. Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale.
  4. Business people and developers must work together daily throughout the project.
  5. Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done.
  6. The most efficient and effective method of conveying information to and within a development team is face-to-face conversation.
  7. Working software is the primary measure of progress. Agile processes promote sustainable development.
  8. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.
  9. Continuous attention to technical excellence and good design enhances agility.
  10. Simplicity--the
@jerodsanto
jerodsanto / helloword_tensorflow.py
Created February 14, 2019 18:19
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),
tf.keras.layers.Dropout(0.2),
@jerodsanto
jerodsanto / poor_mans_ping_test.rb
Created June 15, 2010 20:06
A poor man's replacement for Ruby's Ping.pingecho method
# 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"
end
@jerodsanto
jerodsanto / add-images-by-url-spec.md
Last active January 21, 2018 14:48
Changelog Admin Feature: Add Images by URL

Description

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.

@jerodsanto
jerodsanto / wire-for-podcasters.md
Created December 18, 2017 15:34
Wire for Podcasters

Wire for Podcasters

Why

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
jerodsanto / gist:1137337
Created August 10, 2011 16:31
Bookmarklet to uncripple Kindle Cloud Reader
(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
jerodsanto / gravatar_url.ex
Created December 30, 2015 16:27
Elixir's pipeline operator makes FP joyous. Here it is transforming an email address for Gravatar'ing
def gravatar_url(email, size) do
hash = email
|> String.strip
|> String.downcase
|> :erlang.md5
|> Base.encode16(case: :lower)
"https://secure.gravatar.com/avatar/#{hash}.jpg?s=#{size}&d=mm"
end