Skip to content

Instantly share code, notes, and snippets.

View tzellman's full-sized avatar

Tom Zellman tzellman

  • Knowbl
  • Michigan
View GitHub Profile
@reznor244
reznor244 / playlist-stitch.sh
Last active January 30, 2024 15:06
playlist-stitch: Downloads all files in an m3u playlist and stitches them together into a single .mpg file
#!/bin/bash
declare -a req=("wget" "basename" "rm" "cat" "echo")
for cmd in "${req[@]}"
do
command -v $cmd >/dev/null 2>&1 || { echo "Required command not found: $cmd"; exit 1; }
done
[ $1 ] || { echo "Usage: $0 file1 [file2] [file3...]"; }
@meain
meain / loading_messages.js
Last active May 22, 2024 17:59
Funny loading messages
export default [
"Reticulating splines...",
"Generating witty dialog...",
"Swapping time and space...",
"Spinning violently around the y-axis...",
"Tokenizing real life...",
"Bending the spoon...",
"Filtering morale...",
"Don't think of purple hippos...",
"We need a new fuse...",
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod

Minimum Viable Async with Node 6

With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.

This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async + await.

The promise

@gnippy
gnippy / gist:14884146fe25efc426d1
Last active August 29, 2015 14:17
Tweet tagged with Foursquare powered geodata
{
"created_at": "Sun Feb 22 15:32:35 +0000 2015",
"id": 569520133850452000,
"id_str": "569520133850451968",
"text": "NYC doing its best @KarlTheFog impression at the Empire State Building last night. http://t.co/TS1vQySWdM",
"source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter for iPhone</a>",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
// Highcharts CheatSheet Part 1.
// Create interactive charts easily for your web projects.
// Download: http://www.highcharts.com/download
// More: http://api.highcharts.com/highcharts
// 1. Installation.
// Highcharts requires two files to run, highcharts.js and either jQuery, MooTools or Prototype or the Highcharts Standalone Framework which are used for some common JavaScript tasks.
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
// <script src="https://code.highcharts.com/highcharts.js"></script>
anonymous
anonymous / manifest.json
Created March 2, 2014 18:39
{
"manifest_version": 2,
"name": "Hacker News styles",
"version": "0.1",
"content_scripts": [{
"matches": ["https://news.ycombinator.com/*"],
"css": ["style.css"]
}]
}
@jeffschwartz
jeffschwartz / ProxyJS.js
Last active June 19, 2021 14:48
ProxyJS is a small JavaScript library that provides the ability to proxy any function or object property method. It includes an API and you can extend it with additional functionality to fit your particular use case. Enjoy!
function proxy(){
var proxyFactory = function(){
//The wrapped function to call.
var fnToCall = arguments.length === 2 ? arguments[0][arguments[1]] : arguments[0];
//A counter used to note how many times proxy has been called.
var xCalled = 0;
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696