Skip to content

Instantly share code, notes, and snippets.

View ZackMattor's full-sized avatar

Zachary Mattor ZackMattor

View GitHub Profile
#!/usr/bin/ruby -w
# INSTALL (zsh)
# mkdir -p ~/Screenshots; defaults write com.apple.screencapture location ~/Screenshots
# echo 'alias share="~/share-last-screenshot.rb"' >> ~/.zprofile
filename = Dir.glob("#{ENV['HOME']}/Screenshots/*").max_by {|f| File.mtime(f)}
url = `curl -T '#{filename}' http://chunk.io 2> /dev/null`.chomp
@ZackMattor
ZackMattor / spread.js
Created April 30, 2016 19:37
Testing spread in node
console.log('Testing spread operator...');
var tests = {
spread(a, b, c, d, e, f) {
console.log(a);
console.log(b);
console.log(c);
console.log(d);
console.log(e);
console.log(f);
@ZackMattor
ZackMattor / nginx.conf
Created December 23, 2013 06:40
Unicorn, nginx, init.d
worker_processes 1;
user nobody nogroup; # for systems with a "nogroup"
pid /tmp/nginx.pid;
error_log /tmp/nginx.error.log;
events {
worker_connections 1024; # increase if you have lots of clients
accept_mutex off; # "on" if nginx worker_processes > 1
http://emberjs.jsbin.com/ohaXiFo/5/edit
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active May 2, 2024 23:15
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@haywoood
haywoood / gist:4540930
Created January 15, 2013 18:45
Command to load postgres .dump file to local development db
turn this into a script
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U rhaywood -d flp_development latest.dump