Skip to content

Instantly share code, notes, and snippets.

"productVariationsPart": {
"productVariations":{
"MHAK2AM/A": {
"productTitle": "Studio Wireless Over-Ear Headphones - Titanium",
"dimensionColor": "titanium"
},
"MH8K2AM/A": {
"productTitle": "Studio Wireless Over-Ear Headphones - Red",
"dimensionColor": "red"
},
@conspirator
conspirator / test.txt
Created September 16, 2014 17:42
Test
Hello world!
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis I'm over here exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Hello world again!
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@conspirator
conspirator / .gitignore
Last active August 29, 2015 14:05
Gitignore template
# Mac\n
.DS_Store\n\n
# Sass\n
.sass-cache/\n\n
# Node\n
node_modules\n
node_modules/\n
npm-debug.log
@conspirator
conspirator / yo.sh
Created July 28, 2014 07:35
Create numbered watermarked images via the command line ( ImageMagick )
for i in {1..25}; do convert original.jpg -font Helvetica -pointsize 200 -draw "gravity center fill white text 0,20 '$i'" water-marked-image-$i.jpg; done
jQuery(function(){
if (window.matchMedia) {
if (window.matchMedia("(max-device-width: 480px)").matches) {
jQuery('.mobile-src').each(function(){
var $el = jQuery(this),
newSrc = $el.attr('src').split('?')[0] + "-mobile?fmt=png-alpha&qlt=95";
jQuery('<img>', {
'src': newSrc,
'load': function(){
jQuery(function(){
if (window.matchMedia) {
if (window.matchMedia("(max-device-width: 480px)").matches) {
//
// Swaps in new mobile src for existing images
// Expects: <img class="mobile-src-overwrite-400" src="path/to/asset?parms=1" width="800">
// Returns: <img class="mobile-src-overwrite-400" src="path/to/asset-mobile?fmt=png-alpha&wid=400&qlt=95" width="400">
//
jQuery('[class*="mobile-src-overwrite-"]').each(function(){
@conspirator
conspirator / gist:8996839
Created February 14, 2014 06:55
AVSpeechUtterance
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"I'm watching you"];
[utterance setRate:0.1666];
[utterance setPitchMultiplier:0.55];
[[[AVSpeechSynthesizer alloc] init] speakUtterance:utterance];
@conspirator
conspirator / gif.sh
Last active December 31, 2015 19:49
#!/bin/sh
#
# Grab a random gif from giphy.com
#
# Example:
# $ gif // places a gif url on your clipboard
# $ gif -o // opens a gif url in your default browser
# $ gif chicago+bulls // places a Bulls-related gif url on your clipboard
# $ gif chicago+bulls -o // opens a Bulls-related gif url in your default browser
#
tweetbot:///search?query=[[draft]]%20lang%3Aen%20-filter%3Aretweet%20-%22RT%20%22
@conspirator
conspirator / a.js
Last active December 22, 2015 23:29
!function(b) {
var a = function(d, c, f) {
if (f) {
f.stopPropagation();
f.preventDefault()
}
this.$element = b(d);
this.$newElement = null;
this.button = null;
this.options = b.extend({}, b.fn.selectpicker.defaults, this.$element.data(), typeof c == "object" && c);