Skip to content

Instantly share code, notes, and snippets.

@ceocoder
ceocoder / gist:df1b54c33f9ebdefc67766c0e7ed4b4a
Created September 14, 2017 08:21
Git Log with author name
git log --pretty=format:"%h,%s,'%ai','%an','%ae'"
### Keybase proof
I hereby claim:
* I am ceocoder on github.
* I am ceocoder (https://keybase.io/ceocoder) on keybase.
* I have a public key whose fingerprint is E8B6 BEAB D437 A2F4 A222 1C88 E1B3 B848 31A6 3CD8
To claim this, I am signing this object:
@ceocoder
ceocoder / countries.json
Created April 9, 2015 23:14
Countries JSON
{
"AF": "Afghanistan",
"AX": "Åland Islands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "AndorrA",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",
@ceocoder
ceocoder / flake8.xml
Created January 8, 2015 00:54 — forked from jsmits/flake8.xml
<?xml version="1.0" encoding="UTF-8"?>
<toolSet name="Code Checking">
<tool name="Flake8" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="/usr/local/bin/flake8" />
<option name="PARAMETERS" value="--max-complexity=10 --max-line-length=100 $FilePath$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
<filter>
<option name="NAME" value="Filter 1" />
@ceocoder
ceocoder / haproxy.conf
Created November 29, 2012 00:06 — forked from gburd/haproxy.conf
Recommended haproxy settings to balance Riak protobuf and http interfaces (note: WORK IN PROGRESS)
# Documentation for HAProxy
# http://code.google.com/p/haproxy-docs/w/list
# http://haproxy.1wt.eu/download/1.2/doc/architecture.txt
# NOTES:
# open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems)
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
@ceocoder
ceocoder / config
Created November 11, 2011 04:01
unicast node restart on MacOS X -
config
elasticsearch.yml
Config
==========================
elasticsearch.yml
-----------------------
index.number_of_shards: 1
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.timeout: 30s
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["192.168.1.10"]
With 0.18.2 - and unicast disovery
start ES on one machine with unicast, create an index, index one document or even create a single mapping - then shutdown ES, start again - it won't recover the index,
but if you start another *fresh* node with first node as unicast discovery host
it will recover
@ceocoder
ceocoder / elasticsearch.yml
Created November 8, 2011 01:14
ElasticSearch Unicast Bug
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.timeout: 30s
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: "172.21.120.91:9200"
[2011-09-21 23:44:51,822][WARN ][cluster.action.shard ] [Hulk] sending failed shard for [lomaxml][5], node[zS3MiGZRS7uBYW-_nFsImg], [P], s[INITIALIZING], reason [Failed to start shard, message [IndexShardGatewayRecoveryException[[lomaxml][5] failed recovery]; nested: EngineCreationFailureException[[lomaxml][5] Failed to create engine]; nested: CorruptIndexException[Corrupt fieldinfos, OMIT_POSITIONS set but format=-1]; ]]
[2011-09-21 23:44:51,846][DEBUG][index.merge.scheduler ] [Hulk] [lomaxml][0] using [concurrent] merge scheduler with max_thread_count[3]
[2011-09-21 23:44:51,850][WARN ][indices.cluster ] [Hulk] [lomaxml][0] failed to start shard
org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException: [lomaxml][0] failed recovery
at org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:229)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPool