Skip to content

Instantly share code, notes, and snippets.

View scarrillo's full-sized avatar
🎯
Focusing

Shawn Carrillo scarrillo

🎯
Focusing
View GitHub Profile
@gdavis
gdavis / xcode-vim.markdown
Last active April 12, 2024 13:41
Notes for working with Xcode VIM mode

Xcode VIM

Learning VIM in Xcode comes with its own set of challenges and limitations, but there is enough there for you to give your mousing hand a break and master the keyboard.

A limited set of commands are available in Xcode, and this document attempts help ease the learning curve of using VIM in Xcode by providing a handy reference as well as what I find works for me in practice.

NOTE: Commands are case-sensitive. A command of N means pressing shift + n on the keyboard.

This document is a work in progress! Leave a comment if you would like to see a change.

@HoraceShmorace
HoraceShmorace / auto-order-amazon-fresh.js
Last active April 14, 2020 19:52 — forked from scarrillo/amazon-delivery-slots.js
Amazon.com: Check for delivery slots for Fresh and Whole Foods
const ALLOW_AUTO_PURCHASE = false
const CHECKOUT_URL = 'https://www.amazon.com/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1'
const { pathname } = location
const isShipOptionPage = /buy\/shipoptionselect/.test(pathname)
const isPaySelectPage = /buy\/payselect/.test(pathname)
const isPurchasePage = /buy\/spc/.test(pathname)
const isThankYouPage = /buy\/thankyou/.test(pathname)
let attemptNum = 1
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@aearly
aearly / Gruntfile.js
Last active June 24, 2016 06:43
Annotated Browserify Gruntfile
/**
* Annotated Gruntfile.
* This builds a Backbone/Marionette application using Dust.js (Linkedin fork) as a
* templating system, as well as some helpers from Foundation, with Browserify.
* It also configures a watcher and static server with live reload.
*/
module.exports = function (grunt) {
// This automatically loads grunt tasks from node_modules
require("load-grunt-tasks")(grunt);
@paulirish
paulirish / gist:5558557
Last active April 18, 2024 14:32
a brief history of detecting local storage

A timeline of the last four years of detecting good old window.localStorage.


Jan Lenhart, bless his heart contributed the first patch for support:

October 2009: 5059daa

@halfmanhalfdonut
halfmanhalfdonut / sf2.coffee
Last active December 16, 2015 13:39
Super Street Fighter II stat extractor (2p)
fs = require 'fs'
class SF2
constructor: (file) ->
# Skeleton json response
@stats = {
"session": +new Date
"p1": {
"fighters": [],
"total": {}
@halfmanhalfdonut
halfmanhalfdonut / basketball-prototype.coffee
Last active September 29, 2015 17:17
Keanu Basketball module
Basketball = (keanu, opts, duration) ->
return if not keanu
@keanu = keanu
@ctx = @keanu.ctx
@origin = opts.origin or []
@originX = @origin[0] or 0
@originY = @origin[1] or 0
@originRadius = @origin[2] or 0
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];