Skip to content

Instantly share code, notes, and snippets.

@woolfie
woolfie / GitHub-Forking.md
Created November 4, 2020 22:11 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@woolfie
woolfie / gist:b591120b1ba93090fbd7
Last active November 4, 2015 20:36
Mapping for geopoint location - SOLVED NOW
curl -XPUT 'http://localhost:9200/crime' -d '
index :
number_of_shards : 1
number_of_replicas : 1
'
curl -XPUT 'http://localhost:9200/crime/_mapping/ukcrimestat' -d '
{
"ukcrimestat" : {
"properties" : {
@woolfie
woolfie / Results
Created October 31, 2014 17:56
Using split and multiline to handle weird cases of munged multiline logs
]$ /opt/logstash/bin/logstash -f logstash-split-multiline.conf
Using milestone 2 filter plugin 'split'. This plugin should be stable, but if you see strange behavior, please let us know! For more information on plugin milestones, see http://logstash.net/docs/1.4.2-modified/plugin-milestones {:level=>:warn}
{
"message" => "First line blah2",
"@version" => "1",
"@timestamp" => "2014-10-31T17:55:38.237Z",
"type" => "trace",
"host" => "LRC1-RNC1-1-LMU-0",
"sequence" => 0
}
@woolfie
woolfie / logstash config
Last active August 29, 2015 14:05
Trouble matching multiline data
if [type] == "fieldtrace" {
multiline {
patterns_dir => "./patterns"
pattern => "^Start here"
what => "previous"
negate => true
# NOTE: Documentation says not to use the following in production (why?)
enable_flush => true
}
grok {
@woolfie
woolfie / gist:41c470b0e896e3a29251
Created July 13, 2014 22:43
Date parsing failure in elasticsearch
# csv contents:
5/12/14,80.00%
5/14/14,66.67%
5/16/14,60.00%
5/20/14,57.58%
# logstash config:
input {
file {
path => "/data/in/google-bounce-rate.csv"