This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><head><title>Hello, world!</title></head><body>Tacotacotaco!</body></html> |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> myarr = Array(20) | |
[ , , , , , , , , , , , , , , , , , , , ] | |
> for (var i=0; i<20; i+=3) { | |
... myarr[i] = 'taco'; | |
... } | |
'taco' | |
> myarr | |
[ 'taco', | |
, | |
, |
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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();})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
import urllib.request | |
import json | |
import sys | |
import os | |
URL = 'http://0.0.0.0:9200/_stats' | |
# COUNT_FILE = os.environ['HOME'] + '/tmp/es_count.tmp' | |
# COUNT_OUTPUT = os.environ['HOME'] + '/tmp/es_output.tmp' | |
COUNT_FILE = '/Users/cmoultrie/tmp/es_count.tmp' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
stdin {} | |
} | |
filter { | |
grok { | |
# Ex: I AM SOME DATA | |
match => ["message", "^%{DATA}$"] | |
} | |
if [data][info][score][value] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /pindrop/_search HTTP/1.1 | |
Content-Type: application/json | |
Host: logstash.local:9200 | |
Connection: close | |
User-Agent: Paw/2.1.1 (Macintosh; OS X/10.10.2) GCDHTTPRequest | |
Content-Length: 209 | |
{ | |
size: 0, | |
"aggregations" : { |
OlderNewer