Skip to content

Instantly share code, notes, and snippets.

@alcedo
alcedo / 0_reuse_code.js
Created October 10, 2013 08:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Setup Mac OS X Mountain Lion or Mavericks

Edit: I few months ago I got a new laptop and did the same thing on Mavericks.

I just replaced the hard drive of my mbp and decided to do a clean install of Mountain Lion (10.8.5) since I was still using Snow Leopard (10.6.8).

I kinda regret for not using Boxen to automate the

@alcedo
alcedo / slack_delete.rb
Last active June 21, 2016 20:37 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
# tokens can be obtained from https://api.slack.com/docs/oauth-test-tokens
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {