Skip to content

Instantly share code, notes, and snippets.

Pod::Spec.new do |s|
s.name = 'CocoaSoundCloudAPI'
s.version = '1.0.2'
s.summary = 'A simple way to interact with the SoundCloud CocoaSoundCloudAPI.'
s.homepage = 'https://github.com/soundcloud/CocoaSoundCloudAPI'
s.author = { 'Ullrich Schäfer' => '[email protected]',
'Robert Böhnke' => '[email protected]',
'Tobias Kräntzer' => '[email protected]',
'Rob Siwek' => '[email protected]' }
@RobertAudi
RobertAudi / gist:6813340
Created October 3, 2013 17:09
Function to get the track URL for a SoundCloud track and copy it to the clipboard on OS X. Requires `jq` (`brew install jq`)
scurl() {
curl "http://api.soundcloud.com/resolve.json?url=$1&client_id=[SOUNDCLOUD_API_CLIENT_ID]" 2> /dev/null | jq '.location' | awk -F '\?' '{print $1}' | sed 's/\.json$//' | sed 's/^"//' | tr -d '\n' | pbcopy
}
@RobertAudi
RobertAudi / gist:6808146
Created October 3, 2013 11:14
My MOC keymap
# This is the example kepmap file for MOC. You can define your own key
# mappings for MOC commands by creating your own keymap file and setting
# the 'Keymap' option in ~/.moc/config.
#
# The format of this file is:
#
# - Lines beginning with # are comments.
# - Blank lines are ignored.
# - Every other line is expected to be in format:
#
@RobertAudi
RobertAudi / rss.rb
Created July 22, 2013 15:01
Only show Tweets with links in them
# Only show Tweets with links in them
Earthquake.init do
output_filter do |item|
if item["_stream"] && item["text"]
item["text"] =~ /https?:\/\//i
else
true
end
end
end
@RobertAudi
RobertAudi / moc-on-osx.md
Last active February 18, 2025 03:52
This is a walkthrough on how to install the MOC command-line music player on OS X. The procedure was tested in Mountain Lion.

MOC on OS X

I waited for years for a Homebrew formula for MOC. I finally found one today, but it didn't work for me. So I decided to try to compile it from source.

Requirements

Here is a list of requirements, taken directly from the MOC README:

# Thank you Gutterslob & pvsage from #! forums!
# Example color theme for MOC.
# You can use a theme by copying it to ~/.moc/themes directory and using
# Theme config option or -T command line option.
#
# Fill free to make your own themes and send me them. It will be included in
# official MOC releases or on the MOC web site.
#
# The format of this file is:
# Lines beginning with # are comments.
@RobertAudi
RobertAudi / mail_functions.sh
Last active December 19, 2015 22:49
Open one iTerm tab per vmail account
mail() {
local option=""
if [[ ! -z "$2" ]]; then
option=$2
fi
if [[ $1 = "account1" ]]; then
VMAIL_HOME=~/.vmail/account1 vmail $option
elif [[ $1 = "account2" ]]; then
VMAIL_HOME=~/.vmail/account2 vmail $option
@RobertAudi
RobertAudi / Install imagemagick
Created July 15, 2013 17:42
Automatically Create Icons for iOS Apps. Full credits to Yuya Kitajima (aka @yuyak on Github) for this rake task, shared as a Coderwall tip. https://coderwall.com/p/otmx2g
brew install imagemagick
KEYWORDS="FIXME:|\?\?\?:|\!\!\!:"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/"
@RobertAudi
RobertAudi / NSString+RAInflections.h
Last active December 29, 2015 12:22
NSString category containing an Objective-C port of @henrik's slugalize helper method: https://github.com/henrik/slugalizer?source=c
//
// Created by Robert Audi on 07/04/13.
// Updated on 08/21/14
//
#import <Foundation/Foundation.h>
@interface NSString (RAInflections)
- (NSString *)slugalize;