Skip to content

Instantly share code, notes, and snippets.

@notslang
notslang / html template.html
Created April 17, 2012 00:42
html template
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>HTML Template</title>
<link href="" rel="stylesheet" type="text/css" />
<style type="text/css"></style>
</head>
<body>
@notslang
notslang / path template.php
Created April 17, 2012 00:46
basic template for PATH page
<?php
require 'path.php';
$html = new path;
echo '<!DOCTYPE html>';
$html =
['html',
['head',
@notslang
notslang / arrows.less
Created April 17, 2012 03:11
code for arrows in pure LESS
//arrows
@arrowColor: gray;
@arrowSize: 10px;
.arrowUp, .arrowDown, .arrowRight, .arrowLeft {
width: 0;
height: 0;
}
.arrowUp, .arrowDown {
@notslang
notslang / gist:3905855
Created October 17, 2012 14:36
ZipPlease PHP API example
<?php
//this file would be at /demo/flickr.php
$zipPleaseAPIEndpoint = "http://www.zipplease.com/api/zips";
$uniqueZipName = "zipPleaseFlickrDemo_" . uniqid() . ".zip";
// Create the JSON payloy to send to ZipPlease
$zipRequest = json_encode(array(
'accountKey' => "6B5qClA0SG2er7x7PmZTK4QU", // Not real.
'accountSecret' => "jHxRb2y3CevJyROL96hYKcE0oAIQ", // Get your own.
@notslang
notslang / gist:3915084
Created October 18, 2012 22:13
Jquery Slider
<html>
<head>
<style>
html, body {
height:100%;
font-family: Arial, Verdana, Tahoma;
}
#nav {
width: 50px;
height:270px;
function isPalindrome(inputWord){
//split up string
var array = [];
for(i = 0; i < inputWord.length; i++){
array.push(inputWord.charAt(i));
}
if(array.compare(array.clone().reverse())){
return true;
} else {
http = require 'http'
url = 'http://xapi.snapapp.com/xapi/v2/promotions/528557c027ce261e6f000018/entries'
http.get(url, (res) ->
body = ''
res.on('data', (chunk) ->
body += chunk
)
@notslang
notslang / gist:7670196
Last active December 29, 2015 12:19
add this to the top of the main contact form 7 file to fix its lack of CORS
if (isset($_SERVER['HTTP_ORIGIN']) && in_array($_SERVER['HTTP_ORIGIN'], array('http://chazsouthard.com', 'http://localhost:1111'))) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Max-Age: 86400'); // cache for 1 day
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
}

Keybase proof

I hereby claim:

  • I am notslang on github.
  • I am slang (https://keybase.io/slang) on keybase.
  • I have a public key whose fingerprint is 9A7C 41E7 279F 8032 42FE AF31 F6D1 7F02 3968 6E16

To claim this, I am signing this object:

@notslang
notslang / firebase.js
Last active August 29, 2015 14:01
beautify
function g(a) {
throw a;
}
var j = void 0,
k = !0,
m = null,
o = !1;
function aa() {
return function () {}