This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// Place the following in ~/Library/Application Support/Sublime Text 3/Packages/User/Default (OSX).sublime-mousemap | |
[ | |
{ | |
"button": "button1", | |
"count": 1, | |
"modifiers": ["ctrl"], | |
"press_command": "drag_select", | |
"command": "goto_definition" | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Query Facebook for all Brand Locations | |
*/ | |
//Graph API query - https://developers.facebook.com/tools/explorer/?method=GET | |
{page_id}/locations?fields=checkins,likes,location,were_here_count,link,talking_about_count | |
//Using Curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Require any additional compass plugins here. | |
require "susy" | |
require 'fileutils' | |
require 'sass-globbing' | |
# Set this to the root of your project when deployed: | |
http_path = "/wp-content/themes/YOUR_THEME/" | |
css_dir = "css" | |
sass_dir = "sass" | |
images_dir = "img" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GIT_WORK_TREE=/path/to/project/web_root git checkout -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function format_tweet($tweet_obj){ | |
//create an array of tweet entities | |
$entity_arr = array(); | |
$formatted_text = $tweet_obj['text']; | |
foreach($tweet_obj['entities'] as $entity){ | |
foreach($entity as $item){ | |
$entity_arr[] = $item; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var counterAnimation = function($num, to, from){ | |
var totalTime = 250, | |
direction = to - from, | |
counter = 0, | |
interval = 6, | |
iterator = (Math.abs(to-from)) / (Math.round(totalTime/interval)); | |
var _endCount = function(){ | |
clearInterval(counterInterval); | |
$num.html(Math.round(to)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*{ | |
position:relative; | |
z-index:1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Converts a directory of JSON files into YAML files! Cool! | |
# Requires json2yaml node package https://npmjs.org/package/json2yaml | |
# receive the directory or treat current directory as the base directory | |
DIR=$1 | |
if [ -d $DIR ]; then | |
cd $DIR; | |
echo $PWD; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Dan Wasilewski | |
* | |
* A simple function that formats a tweet's text to include linked entities (hashtag, mentions, and links) | |
* When fetching tweets, make sure to add include_entities=1 to your query string | |
* | |
*/ | |
var formatTweet = function(tweetObj){ | |
//create an array of tweet entities |