This file contains hidden or 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
(use-package gist | |
:ensure | |
:bind (("C-c a g l" . gist-list) | |
("C-c a g b" . gist-buffer) | |
("C-c a g B" . gist-buffer-private) | |
("C-c a g r" . gist-region) | |
("C-c a g R" . gist-region-private))) |
This file contains hidden or 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
for h in $list_of_es_hosts; do | |
echo -n "$h "; | |
curl -s http://$h:9200/_cluster/state/master_node,nodes | \ | |
jq '.master_node as $master | .nodes[$master].name'; | |
done |
This file contains hidden or 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
curl ... | \ | |
jq '[.hits.hits[]._source | {"bucket": .bucketStart, | |
"rate": .totalBitRate, "cnt": .bitRateCnt}]' | \ | |
in2csv --format=json | \ | |
csvlook |
This file contains hidden or 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 python | |
"""es-index-differ.py | |
Usage: | |
es-index-differ.py [options] <host> | |
Options: | |
-h --help show this | |
-v --version show version info |
This file contains hidden or 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
import re | |
board = [[0 for x in xrange(1000)] for x in xrange(1000)] | |
on_off = re.compile(r'(toggle|turn on|turn off) ([0-9]+),([0-9]+) through ([0-9]+),([0-9]+)') | |
def count_on(board): | |
return sum([sum(row) for row in board]) | |
def toggle(v): |
This file contains hidden or 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 python | |
"""Grab the books from the current year from goodreads and emit some HTML. | |
""" | |
import requests | |
from xml.dom import minidom | |
import datetime, time | |
from email.utils import parsedate | |
import sys |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
"""es-fielddata | |
Usage: | |
es-fielddata [options] | |
Options: | |
-h --help show this | |
-v --version show version info |
This file contains hidden or 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
export GIT_RADAR_FORMAT="%{$reset_color%} %{$fg[grey]%}git:(%{$reset_color%}%{remote: }%{branch}%{ :local}%{$fg[grey]%})%{$reset_color%}%{ :changes}" |
This file contains hidden or 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 python | |
# send github starred repos to pinboard | |
# Get the token here: | |
# https://api.pinboard.in/v1/user/api_token/info | |
from __future__ import print_function | |
import sys |
This file contains hidden or 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
// ==UserScript== | |
// @name TidyBZ2 | |
// @namespace http://www.sethmason.com/userscripts | |
// @description Provide some keyboard shortcuts and clean up the interface for | |
// bugzilla2 version of bugzilla. | |
// @include https://*/show_bug.cgi?id=* | |
// @include https://*process_bug.cgi* | |
// @author Seth Mason | |
// @version 0.1 | |
// @license Creative Commons public domain (http://creativecommons.org/licenses/publicdomain/) |