Skip to content

Instantly share code, notes, and snippets.

@dedene
dedene / spotify.applescript
Created July 10, 2012 19:12 — forked from elliottkember/spotify.applescript
Spotify Applescript
property baseURL : "http://statusboard.dev/song?"
if application "Spotify" is running then
tell application "Spotify"
set theTrack to name of the current track
set theArtist to artist of the current track
set theAlbum to album of the current track
set theurl to spotify url of the current track
try
do shell script "/usr/local/bin/wget --delete-after \"" & baseURL & "&t=" & theTrack & "&a=" & theArtist & "&al=" & theAlbum & "\""
@dedene
dedene / Install HTTPie.md
Created October 12, 2016 12:29 — forked from BlakeGardner/Install HTTPie.md
Install HTTPie Mac OS X

This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip. An installed copy of Homebrew is a prerequisite.

HTTPie

# install the python package provided with homebrew
brew install python

# install HTTPie with the pip utility
pip install httpie
@dedene
dedene / gist:bca562c871cc2fc46927ee7029fe4f5b
Created October 11, 2016 07:59 — forked from wikimatze/gist:9790374
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication

#
# Proof of concept for a HAProxy maintenance mode
#
#
# Relevant docs:
# http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-errorfile
# http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#add%20acl
# Control the maintenance page during runtime using the stats socket
#
# To put the whole site in maintenance mode (for all IPs):
@dedene
dedene / countCSSRules.js
Created August 19, 2016 12:55 — forked from psebborn/countCSSRules.js
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
06/2016 OR 08/2018 737 7373

Welcome!

For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.

Starring this gist will give me an idea of how many people consider this list useful.

TODO
  • Organize resources into sections
  • More detailed sections (perhaps sections & subsections)
@dedene
dedene / 0_README.md
Last active December 17, 2015 23:59 — forked from nilcolor/0_README.md

ruby-1.9.3-p429 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p429 with the railsexpress patchsets from https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.