Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
START_ID=2935172
LIMIT=1000
COMMAND=$1
PARALLEL=$2
TOTAL=$(( (PARALLEL - 1) * LIMIT ))
function gen() {
for offset in $(seq 0 $LIMIT $TOTAL); do
count = 9
for i in range(count * 2 - 1):
line = ''
maxNum = i + 1 if i < count else count * 2 - i - 1
for c in range(1, maxNum * 2): line += str(c) if c < maxNum else str(maxNum * 2 - c)
print((count - maxNum) * ' ' + line)
@likewinter
likewinter / scroll-to.js
Created May 22, 2016 16:06
ScrollTo and ScrollToElement functions (ES6 syntax)
/**
* ScrollTo utility
* © https://gist.github.com/james2doyle/5694700
*/
const easeInOutQuad = (t, b, c, d) => {
if ((t /= d / 2 ) < 1) return c / 2 * t * t + b;
return -c / 2 * ((--t) * (t - 2) - 1) + b;
};
@likewinter
likewinter / FreeCodeCamp Calculator.markdown
Last active April 22, 2016 14:52
FreeCodeCamp Calculator
@likewinter
likewinter / Facebook.icls
Created July 29, 2015 05:24
Facebook theme for PhpStorm
<scheme name="Facebook" version="141" parent_scheme="Default">
<option name="LINE_SPACING" value="1.2" />
<option name="EDITOR_FONT_SIZE" value="14" />
<option name="CONSOLE_FONT_NAME" value="Menlo" />
<option name="CONSOLE_LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_NAME" value="Monaco" />
<colors>
<option name="CARET_COLOR" value="979e86" />
<option name="CARET_ROW_COLOR" value="2f374d" />
<option name="CONSOLE_BACKGROUND_KEY" value="252b39" />
@likewinter
likewinter / isLaravel5Ready
Created February 3, 2015 15:34
Is Laravel 5 released or not
# using curl and jq (http://stedolan.github.io/jq/)
curl -s https://api.github.com/repos/laravel/framework/tags | jq '.[0].name | contains("v5")'