Skip to content

Instantly share code, notes, and snippets.

View zain's full-sized avatar
💭
Livin' the dream.

Zain Memon zain

💭
Livin' the dream.
View GitHub Profile
[2014-02-19 18:46:14,396][ERROR][bootstrap ] {0.90.3}: Initialization Failed ...
1) NoSuchFieldError[BULK]
[2014-02-19 18:46:14,397][DEBUG][bootstrap ] Exception
org.elasticsearch.common.inject.CreationException: Guice creation errors:
1) Error injecting constructor, java.lang.NoSuchFieldError: BULK
at org.xbib.elasticsearch.action.ingest.TransportShardIngestAction.<init>(Unknown Source)
while locating org.xbib.elasticsearch.action.ingest.TransportShardIngestAction
for parameter 4 at org.xbib.elasticsearch.action.ingest.TransportIngestAction.<init>(Unknown Source)
while locating org.xbib.elasticsearch.action.ingest.TransportIngestAction
$ sudo docker pull lovely/python_base
Pulling repository lovely/python_base
a52f674bdef4: Error pulling image (latest) from lovely/python_base, endpoint: https://cdn-registry-1.docker.io/v1/, link /var/lib/docker/devicemapper/mnt/8e79ed9dbe6b41a8bceee16910ca2b2504a09fa2bbd4d8d8fe534496f193e085/rootfs/.wh..wh.plnk/54.3934997 /var/lib/docker/devicemapper/mnt/8e79ed9dbe6b41a8ba52f674bdef4: Error pulling image (latest) from lovely/python_base, link /var/lib/docker/devicemapper/mnt/8e79ed9dbe6b41a8bceee16910ca2b2504a09fa2bbd4d8d8fe534496f193e085/rootfs/.wh..wh.plnk/54.3934997 /var/lib/docker/devicemapper/mnt/8e79ed9dbe6b41a8bceee16910ca2b2504a09fa2bbd4d8d8fe534496f193e085/rootfs/var/lib/dpkg/diversions-old: no such file or directory
2014/01/28 21:11:47 Could not find repository on any of the indexed registries.
# aliases
alias ls='ls -GFh'
alias delpyc='find . -name "*.pyc" -exec rm -fv {} \;'
alias pgstart='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start'
alias pgstop='pg_ctl -D /usr/local/var/postgres stop -s -m fast'
alias lock='/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend'
# for homebrew, /usr/local/bin is first
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
{
"auto_complete": false,
"color_scheme": "Packages/Boron Color Scheme/Boron.tmTheme",
"fold_buttons": false,
"rulers": [120],
"translate_tabs_to_spaces": true,
"always_show_minimap_viewport": true,
"highlight_line": true,
"ensure_newline_at_eof_on_save": true,
"auto_close_tags": false,
import sys
def longest_common_substring(s1, s2):
m = [[0] * (1 + len(s2)) for i in xrange(1 + len(s1))]
longest, x_longest = 0, 0
for x in xrange(1, 1 + len(s1)):
for y in xrange(1, 1 + len(s2)):
if s1[x - 1] == s2[y - 1]:
m[x][y] = m[x - 1][y - 1] + 1
if m[x][y] > longest:
all: serve
serve:
make -j2 serve-spotweb serve-pearl
serve-spotweb:
cd SpotWeb; pserve development.ini
serve-pearl:
cd Pearl; paster serve development.ini
@zain
zain / gist:7191259
Last active December 26, 2015 17:59
{
"name":"Shopify",
"pricing_tiers":[
{
"price":"29",
"period":"month",
"features":{
"disabled":[
"Abandoned cart recovery",
"Professional reports",
# i added this test
def test_int_add_ovf_commutative(self):
ops = """
[i0, i1]
i2 = int_add_ovf(i0, i1)
i3 = int_add_ovf(i1, i0)
jump(i2, i3)
"""
expected = """
[i0, i1]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>
Google Visualization API Sample
</title>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['corechart']});
</script>
<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('number', 'price');