Skip to content

Instantly share code, notes, and snippets.

@aGHz
aGHz / catee.sh
Created January 21, 2022 20:12
cat + tee = catee
#!/usr/bin/env bash
if [ -t 0 ]; then
cat "$@";
else
tee "$@" <&0
fi
@aGHz
aGHz / syntree.py
Created November 28, 2020 16:42
Parse vim syntax scripts
import json
import pprint
import re
import sys
TOK = re.compile(r'\s+')
SYN_ARGS = [
'conceal', 'concealends',

JavaScript Static Analysis Tools

Most people are familiar with these three tools:

  1. [JSHint][1]
  2. [JSLint][2]
  3. [Google Closure Linter][3]

The first one is more popular among developers because it is style-agnostic. The other two enforce rules of [Crockford Style][4] and [Google Code Style][5] respectively.

@aGHz
aGHz / google-sheets-dataclip-autoupdate.md
Last active October 6, 2021 18:24
Auto-updating importData of Heroku Dataclips in Google Sheets

Dataclips URLs

Dataclips has a reliable way to construct the URL of a clip's CSV version:

https://dataclips.heroku.com/<hash>-<description>.csv

Thankfully the description is irrelevant, so we can just get the hash from the web interface (looks like aujqawhjdmlbbwrqxutcpzzqyika) and add -1 at the end. Every time we change the

@aGHz
aGHz / kronolog.txt
Last active April 27, 2016 21:25
Kronolog syntax
+ generic item, sub-tasks track progress
- open task
~ in progress task
= completed task
* informational item, sub-tasks do not track progress
- generic sub-item (not necessarily task)
x n/a, wontfix, cancelled
/ n/a, wontfix, cancelled
> command
@aGHz
aGHz / jira.css
Created July 3, 2015 19:37
Jira skin
.ghx-issue-compact .ghx-end .ghx-statistic-badge {
margin-left: 34px;
}
.ghx-issue-compact .ghx-end .ghx-statistic-badge.ghx-spacer {
margin-left: 34px;
}
.ghx-issue-compact .ghx-end .ghx-avatar-img + .ghx-statistic-badge.ghx-spacer {
margin-left: 36px;
}
@aGHz
aGHz / jira.css
Last active August 29, 2015 14:15
JIRA custom CSS
.ghx-issue-compact .ghx-end .ghx-statistic-badge {
margin-left: 34px;
}
.ghx-issue-compact .ghx-end .ghx-statistic-badge.ghx-spacer {
margin-left: 34px;
}
.ghx-issue-compact .ghx-end .ghx-avatar-img + .ghx-statistic-badge.ghx-spacer {
margin-left: 36px;
}
var fs = require('fs'),
zmq_sockets = require('./zmq_sockets'),
log4js = require('log4js');
log4js.loadAppender('file');
log4js.addAppender(log4js.appenders.file('/tmp/INode.log'));
var logger = log4js.getLogger("app");
function startKernel(configFile) {
### Keybase proof
I hereby claim:
* I am aGHz on github.
* I am aghz (https://keybase.io/aghz) on keybase.
* I have a public key whose fingerprint is 766F 087E 98A6 0413 734D A526 7C11 DD4F 7836 4FC0
To claim this, I am signing this object:
@aGHz
aGHz / dothis.sh
Last active August 29, 2015 13:57
Install instructions for Python Text Analysis workshop
virtualenv --no-site-packages .
. bin/activate
pip install jinja2 tornado pyzmq ipython
pip install pattern
pip install numpy
sudo brew install gfortran
pip install scipy