Skip to content

Instantly share code, notes, and snippets.

View tleen's full-sized avatar
🚀
Making things.

Tom Leen tleen

🚀
Making things.
View GitHub Profile
@tleen
tleen / gist:96004505138651b21e30d0e1170a5014
Created April 5, 2018 16:03
JavaScript reserved words in an array friendly format
"abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "let", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super", "switch", "synchronized", "this", "throw", "throws", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with"
### Keybase proof
I hereby claim:
* I am tleen on github.
* I am tleen (https://keybase.io/tleen) on keybase.
* I have a public key ASAALO9O17-dJR4bZNAZtX1u3cIiRDoawu92fFVK8VEJ8wo
To claim this, I am signing this object:
@tleen
tleen / html-email-button.html
Created October 17, 2016 20:59
html for mail buttons
<div><!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://peerlessnetwork.com" style="height:36px;v-text-anchor:middle;width:150px;" arcsize="5%" strokecolor="#F7BE68" fillcolor="#F7BE68">
<w:anchorlock/>
<center style="color:#ffffff;font-family:Helvetica, Arial,sans-serif;font-size:16px;">I am a button &rarr;</center>
</v:roundrect>
<![endif]--><a href="http://peerlessnetwork.com" style="background-color:#F7BE68;border:1px solid #F7BE68;border-radius:3px;color:#000;display:inline-block;font-family:sans-serif;font-size:16px;line-height:44px;text-align:center;text-decoration:none;width:150px;-webkit-text-size-adjust:none;mso-hide:all;">Use this button</a></div>
@tleen
tleen / schemes.json
Created August 22, 2016 22:30
Popular colorschemer schemes in json
[
{
"name": "oceanside",
"source": "http://www.colorschemer.com/schemes/viewscheme.php?id=210",
"colors": ["99CC66", "E5F2D9", "F1F7D4", "D9EEF2", "66B9CC"]
},
{
"name": "splash",
"source": "http://www.colorschemer.com/schemes/viewscheme.php?id=193",
"colors": ["3399CC", "70B7DB", "FF9B00","FFBA4F", "FFFF92", "555555"]
@tleen
tleen / social.scss
Created May 10, 2016 13:52
scss social media list
$social-media-colors: facebook #3b5998, instagram #517fa4, twitter #00aced, tumblr #32506d, youtube #bb0000, linkedin #007bb6;
.social{
@each $pair in $social-media-colors {
$key: nth($pair, 1);
$value: nth($pair, 2);
.#{$key}{
color: $value;
&:hover{
@tleen
tleen / gist:2ea9e563195d64a191fc601a86401e7a
Created May 10, 2016 13:50
social media colors in sass
/* SASS / Social Media Brand Colors */
// via - https://www.competethemes.com/blog/social-media-colors/
$twitter: #00aced;
$facebook: #3b5998;
$googleplus: #dd4b39;
$pinterest: #cb2027;
$linkedin: #007bb6;
$youtube: #bb0000;
$vimeo: #aad450;
@tleen
tleen / short-google-url-regex.js
Created April 8, 2016 18:47
Google url shorterner output Regex (javascript)
/^https?:\/\/goo\.gl\/\w{6,}$/
@tleen
tleen / marvel-api-client.js
Created March 12, 2016 21:21
Example call to the Marvel API from js client (w/ JQuery)
// you will also have to setup the referring domains on your marvel developer portal
var PRIV_KEY = "this-should-be-a-long-hash";
var PUBLIC_KEY = "so-should-this";
function getMarvelResponse() {
// you need a new ts every request
var ts = new Date().getTime();
var hash = CryptoJS.MD5(ts + PRIV_KEY + PUBLIC_KEY).toString();
@tleen
tleen / gist:3c8fb99ad5873d8af549
Created October 18, 2015 19:36
AWS EC2 instance info url
http://169.254.169.254/latest/
var images_to_captions = {
"pic1.jpg" : "This is pic one",
"pic2.jpg" : "second pic is here",
"pic3.jpg" : "blargh",
}
$.BgSwitcher.defineEffect("fadeAndSwitchText", function($el) {
$el.animate({opacity: 0}, this.config.duration, this.config.easing, function(){
// new slide so switch text here
var currentimage = '?';// get this from the css or the context or something