Skip to content

Instantly share code, notes, and snippets.

View patrickomeara's full-sized avatar

Patrick O'Meara patrickomeara

View GitHub Profile
@patrickomeara
patrickomeara / content.md
Last active October 5, 2016 00:25
spotify vs apple music

Spotify vs Apple Music

Spotify

Pros

Friend's playlists

I never used these much, Jay had a good starred list that I listen to a couple times

Cons

Search

The search is slow and doesn't send the full string, but sends it in pieces so the response isn't always fresh. ie typing "queens of the ston" will return "queen", but won't return "queens of the stone age" until you edit the search string, I was finding myself always removing a letter and adding it again just to refine the search. Is my typing too fast for Spotify?

@patrickomeara
patrickomeara / .htaccess
Created January 1, 2015 20:39
Compression and caching
<ifModule mod_deflate.c>
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
@patrickomeara
patrickomeara / gist:9062379
Last active January 13, 2021 03:10
RMB - clean git repo
function rmb {
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
if [ "$current_branch" != "master" ]; then
echo "WARNING: You are on branch $current_branch, NOT master."
fi
echo "Fetching merged branches..."
git remote prune origin
remote_branches=$(git branch -r --merged | grep -v '/master$' | grep -v "/$current_branch$")
local_branches=$(git branch --merged | grep -v 'master$' | grep -v "$current_branch$")
if [ -z "$remote_branches" ] && [ -z "$local_branches" ]; then
/*
* long way
* "false" could be replaced with anything that returns false ie
* 10 < 5, 0, -1, 5-8
*/
if(false)
console.log("I am right");
else
console.log("I am wrong");