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
// Author: Stephen King | |
// Contact: stephen.curtis.k@gmail.com | |
// Credits: http://www.gmap3.net | |
// Created using Google maps and the "gmap3" framework. | |
/* ========================================================================================= | |
AUTHOR NOTES | |
========================================================================================= | |
//LOAD initMap(); function at the end of your HTML document before the closing "body" tag. | |
LOAD destination(); function through a button's onclick="distance();" |
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
// Some common IE shims... indexOf, startsWith, trim | |
/* | |
Really? IE8 Doesn't have .indexOf | |
*/ | |
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { | |
"use strict"; | |
if (this === null) { | |
throw new TypeError(); |
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
{ | |
"scope": "source.css", | |
"completions": | |
[ | |
{ "trigger": "l|left", "contents": "left:$1;$0" }, | |
{ "trigger": "r|right", "contents": "right:$1;$0" }, | |
{ "trigger": "t|top", "contents": "top:$1;$0" }, | |
{ "trigger": "b|bottom", "contents": "bottom:$1;$0" }, | |
{ "trigger": "z|z-index", "contents": "z-index:$1;$0" }, |
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 | |
// this is a single page that can access and write any data to a file | |
// on a clients computer when they click a link using only HTML and PHP | |
// | |
// this will keep the data between page loads | |
session_start(); | |
// download file if $_GET['download_file'] is set to true |
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
// PhantomJS Cheatsheet | |
$ brew update && brew install phantomjs // install PhantomJS with brew | |
phantom.exit(); | |
var page = require('webpage').create(); | |
page.open('http://example.com', function() {}); | |
page.evaluate(function() { return document.title; }); |
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
@function gray($intensity, $alpha: 1) { | |
@return rgba($intensity, $intensity, $intensity, $alpha); | |
} | |
/* Thanks Chris Eppstein for simplifying my code! */ | |
/* Testing our new function */ | |
body { | |
background: gray(50%); | |
background: gray(255, .2); |
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 request = require ("request"); | |
var urlWebHook = "https://hooks.slack.com/services/abcdef"; //the URL you get on your "incoming web hooks" page. | |
function sendToSlack (s, theUsername, theIconUrl, theIconEmoji, theChannel) { | |
var payload = { | |
text: s | |
}; | |
if (theUsername !== undefined) { | |
payload.username = theUsername; |
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 | |
$mime_types = array( | |
'.3dm' => 'x-world/x-3dmf', | |
'.3dmf' => 'x-world/x-3dmf', | |
'.a' => 'application/octet-stream', | |
'.aab' => 'application/x-authorware-bin', | |
'.aam' => 'application/x-authorware-map', | |
'.aas' => 'application/x-authorware-seg', | |
'.abc' => 'text/vnd.abc', | |
'.acgi' => 'text/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
Drop in replace functions for setTimeout() & setInterval() that | |
make use of requestAnimationFrame() for performance where available | |
http://www.joelambert.co.uk | |
Copyright 2011, Joe Lambert. | |
Free to use under the MIT license. | |
http://www.opensource.org/licenses/mit-license.php |
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
# File Transfer for Pythonista | |
# ============================ | |
# This script allows you to transfer Python files from | |
# and to Pythonista via local Wifi. | |
# It starts a basic HTTP server that you can access | |
# as a web page from your browser. | |
# When you upload a file that already exists, it is | |
# renamed automatically. | |
# From Pythonista's settings, you can add this script | |
# to the actions menu of the editor for quick access. |
OlderNewer