Skip to content

Instantly share code, notes, and snippets.

View cdl's full-sized avatar
💭
I may be slow to respond.

Colby Ludwig cdl

💭
I may be slow to respond.
View GitHub Profile

rvm install guide

  1. Run curl -sSL https://get.rvm.io | bash -s stable
  2. Close and re-open your Terminal window. If running rvm returns a Help window, you're good. If not, let me know so we can fix it before continuing.
  3. Go ahead and run rvm install 2.1.
  4. Once installed, go ahead and run rvm use 2.1 --default to have the newly-installed Ruby used by default in new Terminal sessions.
<!-- From line 343 of the raw email -->
<img src="http://newsletter.namecheap.com/open.php?M=5661704&L=182&N=701&F=H&image=.jpg" height="1" width="10">
consumer_key = 'XXX'
consumer_secret = 'XXX'
access_token_key = 'XXX'
access_token_secret = 'XXX'
import tweepy
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token_key, access_token_secret)
api = tweepy.API(auth)
@cdl
cdl / flac-to-m4a.sh
Created November 7, 2014 21:25
Instructions on converting a folder of FLAC files to ALAC M4A.
# install ffmpeg via homebrew - visit brew.sh if you don't have Homebrew
brew install ffmpeg
# cd to directory of FLAC files
cd /path/to/flacs/
# run the magic one-liner
for i in *.flac; do ffmpeg -i "$i" -acodec alac "`basename "$i" .flac`.m4a"; done;
require 'twitter_ebooks'
# eva_gbooks (v1.0)
# written by @cdl for @evagiselle
class EvaBot < Ebooks::Bot
attr_accessor :original, :model, :model_path
# Configuration here applies to all EvaBots
def configure
Process: Telegram [59581]
Path: /Applications/Telegram.app/Contents/MacOS/Telegram
Identifier: ru.keepcoder.Telegram
Version: 1.40 (15960)
App Item ID: 747648890
App External ID: 812067011
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Telegram [59581]
User ID: 501
/**
* This is super janky, but it works. Head to:
* https://twitter.com/followers
* in Chrome, and bring up the web console with Command + Option + J.
*
* Scroll as far down as you want the script to block (it'll block every
* profile card that's visible on the page when you run it), scroll back
* to the top (for the hell of it), and then paste in this script into
* the web inspector and run it.
*
// view contains a label and a button - curious about lines 11 through 14
class ViewController: UIViewController {
@IBOutlet weak var label: UILabel!
// ...
@IBAction func didPressButton(sender: AnyObject) {
let date = NSDate()
@cdl
cdl / no-reddit.sh
Created July 4, 2015 01:31
Block all of Reddit via your /etc/hosts file.
# Simply curl -s this and pipe it into sh.
# This script uses root privileges, be careful!
# Appends a list of known Reddit subdomains to your /etc/hosts file, and points them to localhost.
# Should work totally fine, but I take no responsibility if it messes up your machine.
# Made by Colby Ludwig (twitter.com/cdl)
sudo bash -c "echo -e '\n\n# -- Block all of Reddit --\n127.0.0.1\t\treddit.com\n127.0.0.1\t\twww.reddit.com\n127.0.0.1\t\tnp.reddit.com\n127.0.0.1\t\tssl.reddit.com\n127.0.0.1\t\tblog.reddit.com\n127.0.0.1\t\tfr.reddit.com\n127.0.0.1\t\tpay.reddit.com\n127.0.0.1\t\tes.reddit.com\n127.0.0.1\t\ten-us.reddit.com\n127.0.0.1\t\ten.reddit.com\n127.0.0.1\t\tru.reddit.com\n127.0.0.1\t\tus.reddit.com\n127.0.0.1\t\tde.reddit.com\n127.0.0.1\t\tdd.reddit.com\n127.0.0.1\t\tno.reddit.com\n127.0.0.1\t\tpt.reddit.com\n127.0.0.1\t\tww.reddit.com\n127.0.0.1\t\tss.reddit.com\n127.0.0.1\t\t4x.reddit.com\n127.0.0.1\t\tsv.reddit.com\n127.0.0.1\t\tnl.reddit.com\n127.0.0.1\t\thw.reddit.com\n127.0.0.1\t\thr.reddit.com