Skip to content

Instantly share code, notes, and snippets.

View tebriel's full-sized avatar

Chris M tebriel

View GitHub Profile
#!/usr/bin/env python3
# Find 5 friday (4) the 12th's
# python3 fridays_of.py 12 4 5
import datetime
import sys
def make_get_specified_date(start, day_of_month, day_of_week):
@tebriel
tebriel / downloadtransactions
Created August 11, 2014 16:20
Bookmarklet to download the last week's transactions on capital one's crappy, crappy site. Add this as a bookmark, then go to the transactions download page, click the bookmark, wait for the .qfx to get generated.
javascript:(function(){setDate = function(id, date) {$(id).val([date.getMonth()+1, date.getDate(), date.getFullYear()].join('/'))}; setDate('#txtFromDate_TextBox', new Date((new Date()).setDate((new Date()).getDate()-7))); setDate('#txtToDate_TextBox', new Date());$('#ctlStatementFilter_1').prop('checked', true);$('#btnDownload').click();})()

Keybase proof

I hereby claim:

  • I am tebriel on github.
  • I am cmoultrie (https://keybase.io/cmoultrie) on keybase.
  • I have a public key whose fingerprint is 6753 5CAE A733 8F24 F8BF 2C31 9F00 71E8 0918 D64E

To claim this, I am signing this object:

> myarr = Array(20)
[ , , , , , , , , , , , , , , , , , , , ]
> for (var i=0; i<20; i+=3) {
... myarr[i] = 'taco';
... }
'taco'
> myarr
[ 'taco',
,
,
@tebriel
tebriel / README.md
Last active August 29, 2015 13:59 — forked from visualmotive/README.md

Sticky gravity is explained in depth here: http://tetrisconcept.net/wiki/Line_clear#Sticky

The playfield is divided into connected segments using flood fill. Any blocks that are adjacent horizontally or vertically are marked as one segment, that is, they are treated as having "stuck" together. Each segment falls independently until it meets the floor or another block. Additional line clears may result.

Sample input and expected output are included in this Gist.

<html><head><title>Hello, world!</title></head><body>Tacotacotaco!</body></html>
We couldn’t find that file to show.
var insert = "INSERT OR IGNORE INTO searchIndex(name, type, path) VALUES ";
var docs = "polymaps.org/docs/";
var type='Method'
var sections = []
$('a', $('ul', $('.sidebar'))).each(function(index, link) {
atag = $(link)
var path=docs+atag.attr('href')
var name=atag.text()
sections.push("('"+name+"', 'Section', '"+path+"')");
@tebriel
tebriel / example.coffee
Created August 28, 2013 17:04
Assigning things to window to help them understand stuff.
myFunc = ->
console.log "No one knows how to call me, this makes me sad"
@myFunc2 = ->
console.log "I'm on the window scope"
window.myFunc3 = ->
console.log "I'm on the window scope, as well."