Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@notslang
notslang / twitter-verified-icon.svg
Last active March 22, 2023 14:01
The blue verified icon, extracted from Twitter's icon font & resized using Inkscape
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@notslang
notslang / offerpop-photo-contest-desktop.css
Created November 21, 2014 02:29
How not to write CSS
/* ----------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
Offerpop Photo Contest
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------------------------------
@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 () {}

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 / 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';
}
http = require 'http'
url = 'http://xapi.snapapp.com/xapi/v2/promotions/528557c027ce261e6f000018/entries'
http.get(url, (res) ->
body = ''
res.on('data', (chunk) ->
body += chunk
)
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 {
@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;
@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.