Instantly share code, notes, and snippets.

View serverless_rss_validity.js
const fetch = require('node-fetch');
const parseString = require('xml2js').parseString;
const util = require('util');
const hostnames = ["", "", ""];
function checkValidity(url) {
return fetch(url)
.then(res => res.text())
.then(resultText => promisify(parseString)(resultText))
import json
import requests
import os
import sys
from xml.dom.minidom import parse, parseString
hostnames = ["", "", ""]
def checkValidity(url):
response = requests.get(url)
View notes.txt
- royal wedding, michael curry
- move fast, take notes
- i am..
- send newsletters 410k
- spammer?
- 2 letters (un)solicited vs solicited
- things in common to get emails delivered
- ton of data of what devs engage with
- experience of what doesn't matter
View audio_messages_to_mp3.rb
require 'dotenv'
require 'telegram/bot'
require 'json'
require 'open-uri'
files = [] do |bot|
View get_remote_mp3_length.rb
require 'uri'
require 'net/http'
require 'mp3info'
# This works, but is flawed and needs work.
# Why? An ID3v2 tag is not always going to
# be within the first 8K of a file! It can
# be up to 256MB in length apparently.. so
# we need to flexibly scale. But this works
# 99% of the time..
View random_giveaway.rb
# Given a list of items in the 'entries' array, it'll spin through
# some random ones before settling on a "winner" which flashes.
# Yes, the code is terrible, I threw it together on the fly for a Twitter giveaway!
# See for example
# Only dependency is curses, via "gem install curses"
require 'curses'
View youtube.rb
require 'google/apis/youtube_v3'
require 'googleauth'
require 'googleauth/stores/file_token_store'
require 'fileutils'
require 'json'
require 'redd'
require 'dotenv'
SUBREDDIT = ARGV[0] || 'hiphopheads'
View jobs.csv
Most commonly mentioned relevant terms in 0
engineer 267
software 226
data 156
software engineer 100
remote 82
platform 81
engineering 77
web 76
stack 74
View list.txt
* (Jeff Atwood)
* (Pete Krumins)
* (Mike Fogus)
* (Russ Cox)
* (Fred Lundh)
* (Adam Wiggins)
Podcasts in no particular order:
View websocket_backend.rb
# This file's job is to accept WebSocket connections
# and pass along Redis messages to them
require 'faye/websocket'
class WebSocketBackend
def initialize(app)
@app = app
@clients = []
@running = false