Skip to content

Instantly share code, notes, and snippets.

View simshanith's full-sized avatar
p̟̖̹h̯͎͙̺̤̤ͅi̜l͓͖̟͎̬̺̰o̧̻̝͖͍̻̥s̝̪̪̣͕o͍̮͖r̛̦̲̫̱̞̜̞a̸͎p͇͙̪̀t͇͖ò̙̦͈̘̣ṛ̟͕

Shane Daniel simshanith

p̟̖̹h̯͎͙̺̤̤ͅi̜l͓͖̟͎̬̺̰o̧̻̝͖͍̻̥s̝̪̪̣͕o͍̮͖r̛̦̲̫̱̞̜̞a̸͎p͇͙̪̀t͇͖ò̙̦͈̘̣ṛ̟͕
View GitHub Profile
@simshanith
simshanith / sim-momentum-futura-bookmarklet.html
Last active September 19, 2018 20:10
Custom stylesheet for Momentum Dash
<a href="javascript:(()=>{const a=`
html > body {
font-family: Futura-CondensedMedium, sans-serif;
}
html > body * {
font-family: inherit;
}
.clock .time {
@simshanith
simshanith / the_monad_fear.js
Created January 27, 2017 08:28
The Monad Fear: javascript response
// https://e.xtendo.org/monad#55
['10', '10', '10'].map(parseInt);
//> [10, NaN, 2]
// parseInt('10', 0, [...]) === 10 // base 0 is falsey, thus default (?) guessing
// parseInt('10', 1, [...]) === NaN // base 1 does not compute
// parseInt('10', 2, [...]) === 2 // base 2
// third parameter ignored; second parameter passed as index from map to functor
// higher-order functor to the rescue!
@simshanith
simshanith / bubblesortone.js
Created July 21, 2016 07:45
paragonica challenges
// http://www.paragonica.com/
// ---
// # Bubble Sort One
/*
Bubble sort algorithms repeatedly step through a list of items to be sorted. Adjacent items are compared and swapped if they are in the wrong order. You repeat going through the list until no swaps are needed, indicating the list is sorted. Bubble sort is named for the way elements 'bubble' to the top of the list.
Challenge - create a function that takes an array as a parameter and performs a bubble sort to sort the following array of fruits in alphabetical order:
@simshanith
simshanith / example-malformed-json.json
Last active April 25, 2016 19:34
trap / event-elk
{
"host": "bear-i-089c37b8-trap",
"pname": "nginx",
"time": "25/Apr/2016:19:31:42 +0000",
"sev": "6",
"bytes_transferred": "3415",
"referer": "http://www.swagbucks.com/watch/video/923343/www.swagbucks.com/?cmd=co-get-watch-iframe&playlistid=1280&videoid=923343&type=5",
"request_method": "POST",
"remote_ip": "96.41.76.6",
"response_code": "200",
@simshanith
simshanith / subl-build.js
Last active August 29, 2015 14:06
Runs list of sublime build variants from command line.
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var util = require('util');
var buildOrder = [
'Locator Models',
'WCM Services',
'MCCOM Services',
@simshanith
simshanith / svn-update.js
Last active August 29, 2015 14:06
mc-repo-updater
#!/usr/bin/env node
var path = require('path');
var repos = [
'MasterCard_MCCOM',
'MasterCard_MCCOMServices',
"MasterCard_WCM",
"MasterCard_WCMServices",
'aem',
@simshanith
simshanith / fb-setup.js
Last active August 29, 2015 13:56
Facebook JS SDK Wrapper Module for a Simple Photo Selector App
// Wrap `FB` from SDK with utility & application methods.
// Dependencies
// ---
// facebook: Facebook's Provided JS SDK, loaded from Facebook's servers.
// https://developers.facebook.com/docs/javascript/
// ---
// underscore: lodash.underscore provides AMD wrapper (among other benefits)
// http://lodash.com/
// ---
@simshanith
simshanith / poy-facebook.md
Created February 7, 2014 18:30
poy-facebook.md

Project Overview

On a recent Gatorade project, we built out individual profile pages for new Gatorade Players of the Year. With 600+ winners each year, content curation requires scalability. So we built a nifty form for the winners to use themselves.

Winners upload two photos, from either their computer or their social channels, along with some information about their athletic background.

Development Considerations

From a development perspective, uploading an image directly from a user's computer is a lot more straightforward than leveraging social channels. However, many users have photos in Facebook and Instagram, and if we can simplify the upload process from manually finding the image, saving it, then uploading it (tedious and requires some page hopping), to login and click on your picture (doesn't leave the page), by all means we should.

@simshanith
simshanith / git-friendly
Created January 31, 2014 03:23
git-friendly
# git-friendly is on [Github](https://github.com/jamiew/git-friendly)
git-friendly provides four extra helpful sugar methods around git's functionality. After installing the collection bash shell scripts, your `git` workflow will suddenly make more sense and Do the Right Thing. Paul Irish talked about them a while back in [this video](http://www.youtube.com/watch?v=f7AU2Ozu8eo).
----------
From the README:
> A collection of shell scripts for making pulling, branching, and merging > with git fast and painless.
@simshanith
simshanith / font-respond.styl
Created January 9, 2014 17:14
mixin for creating font size breakpoints
textRespond($minWidth, fontSize)
mq = "only screen and (min-width: "+$minWidth+")"
@media mq
html.app>body
font-size fontSize