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
# To use this in your SASS project, simply load this module into | |
# your environment. | |
module Sass::Script::Functions | |
# Dynamically calls a variable by a string | |
# e.g. var("foo" + "bar") => $foobar | |
def var(name) | |
assert_type name, :String, :name | |
@environment.var(name.value) |
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
/* | |
* CSS Time to Milliseconds | |
* by Jake Bellacera (http://jakebellacera.com) | |
* ============================================ | |
* | |
* Converts CSS time into milliseconds. Useful for timing functions around CSS animations. | |
* It supports both seconds (s) and milliseconds (ms). | |
* | |
* Arguments: | |
* time_string - string representation of a CSS time unit (e.g. "1500ms" or "1.5s") |
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 | |
// Default scripts | |
$script_list = array( | |
'vendor/jquery.js', | |
'vendor/bootstrap.js', | |
'vendor/video.js', | |
'`videojs.options.flash.swf = "' . get_bloginfo('stylesheet_directory') . '/assets/swf/videojs.swf"', | |
'global.js' | |
); |
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 appName = "yourAppName", | |
keywords = encodeURI("my search term"), | |
url = "http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=" + appName + "&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&keywords=" + keywords; | |
$.get(url, function (response) { | |
console.log(response); | |
// response would be the parsed XML body. | |
// you could then work with this by treating it as an DOM | |
// node in jQuery. For example: | |
// response.find('elementName').html() |
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 "httparty" | |
require "json" | |
module Vine | |
# Public: The unofficial interface for the Vine API. Vine requires all | |
# requests to be authenticated when accessing the API. | |
# | |
# Examples | |
# | |
# vine = Vine::API.new("username", "password") |
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 | |
################################################################################ | |
# FOCUS | |
# ===== | |
# Blacklists certain websites. | |
# | |
# How to use: | |
# 1. Edit the DOMAINS variable with the domains you'd like to blacklist | |
# 2. run `/path/to/focus start` to start focusing |
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 | |
# BrowserStack Tunnel bash script | |
# By: Jake Bellacera (http://jakebellacera.com) | |
# | |
# Usage: | |
# browserstack | |
# browserstack start [opts=localhost,80,0] # starts a tunnel | |
TUNNEL_KEY="abcdefg12345" |
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
module Sass::Script::Functions | |
# Appends "_2x" to the end of a filename before the extension | |
# e.g. foobar.jpg => foobar_2x.jpg | |
def retinize(string) | |
assert_type string, :String | |
Sass::Script::String.new string.value.gsub(/\.(\w+)$/, '_2x.\\1') | |
end | |
declare :retinize, :args => [:string] |
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
// BikeShop | |
// | |
// Simple asynchronous template management for Handlebars.js. | |
// | |
// By Jake Bellacera (http://jakebellacera.com) | |
// | |
// Usage: | |
// 1. Include Handlebars in your project. | |
// 2. Include BikeShop in you project. | |
// 4. Initialize a new BikeShop instance with the path to the templates dir as |
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
<cross-domain-policy> | |
<allow-access-from domain="*" /> | |
</cross-domain-policy> |