Skip to content

Instantly share code, notes, and snippets.

OSX

HomeBrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew update

RVM

@adrianotadao
adrianotadao / rails.rb
Last active August 29, 2015 14:16 — forked from benedikt/rails.rb
# encoding: UTF-8
Capistrano::Configuration.instance(:must_exist).load do
namespace :rails do
desc "Open the rails console on one of the remote servers"
task :console, :roles => :app do
hostname = find_servers_for_task(current_task).first
exec "ssh -l #{user} #{hostname} -t 'source ~/.profile && #{current_path}/script/rails c #{rails_env}'"
end
end
@adrianotadao
adrianotadao / gpg-import-and-export-instructions.md
Created June 4, 2016 00:24 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@adrianotadao
adrianotadao / gist:f7e8aedf2508d9c3cc2da0a0b11065eb
Created December 13, 2017 02:21 — forked from christofluethi/gist:646ae60d797a46a706a5
Convert m4a to mp3 on OS X command line using ffmpeg
brew update
brew link yasm
brew link x264
brew link lame
brew link xvid
brew install ffmpeg
ffmpeg wiki:
https://trac.ffmpeg.org/wiki/Encode/MP3

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@adrianotadao
adrianotadao / feeds.opml
Created December 16, 2021 00:27 — forked from stebennett/feeds.opml
The feeds I currently subscribe to.
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Stephen subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Companies" title="Companies">
<outline type="rss" text="Trello" title="Trello" xmlUrl="https://trello.engineering/feed.xml" htmlUrl="http://tech.trello.com/"/>
<outline type="rss" text="IMVU" title="IMVU" xmlUrl="http://engineering.imvu.com/feed/" htmlUrl="https://engineering.imvu.com"/>