Skip to content

Instantly share code, notes, and snippets.

View danielnegri's full-sized avatar
Coffee first.

Daniel Negri danielnegri

Coffee first.
View GitHub Profile
@danielnegri
danielnegri / plot.p
Created May 20, 2019 14:57 — forked from garethrees/plot.p
Graphing apache benchmark results with gnuplot
# Output to a jpeg file
set terminal jpeg size 1280,720
# Set the aspect ratio of the graph
set size 1, 1
# The file to write to
set output "timeseries.jpg"
# The graph title
@danielnegri
danielnegri / consumer.sh
Created April 28, 2019 03:42 — forked from dongjinleekr/consumer.sh
Kafka benchmark commands
## Consumer Throughput: Single consumer thread, no compression
## Consumer Throughput: 3 consumer thread, no compression
bin/kafka-consumer-perf-test.sh --topic benchmark-3-3-none \
--zookeeper kafka-zk-1:2181,kafka-zk-2:2181,kafka-zk-3:2181 \
--messages 15000000 \
--threads 1
@danielnegri
danielnegri / settings.json
Created April 15, 2019 23:18
Visual Studio Code
// Place your settings in this file to overwrite the default settings
{
"terminal.integrated.shellArgs.osx": [
"-l"
]
,
"window.zoomLevel": 0,
"workbench.iconTheme": "material-icon-theme",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
@danielnegri
danielnegri / .gitignore_global
Created January 22, 2019 18:19
Git Ignore Global
#System Files
*~
.DS_Store
Thumbs.db
# NodeJS
npm-debug.log
node_modules/
bower_components/
@danielnegri
danielnegri / .gitconfig
Created January 22, 2019 18:19
Git Config
[user]
name = Username
email = [email protected]
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = auto
@danielnegri
danielnegri / upload.js
Created January 6, 2019 19:10 — forked from virolea/upload.js
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round( (progressEvent.loaded * 100) / progressEvent.total )
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])

INCIDENT DATE - INCIDENT TYPE

Meeting

Waiving meetings

In some cases the IC might determine that a PM meeting for the incident isn't needed. If the IC decides to waive the meeting please replace the Meeting section with a note indicating the meeting has been waived (example: Meeting waived: Paul Mooring)

@danielnegri
danielnegri / fetch_tree.adoc
Created May 7, 2018 16:32 — forked from jexp/fetch_tree.adoc
Fetch a Tree with Neo4j

Fetch a Tree with Neo4j

Today I came across a really interesting StackOverflow question:

Given a forest of trees in a Neo4j REST server, I`m trying to return a single tree given the root vertex. Being each tree quite large, I need a de-duplicated list of all vertices and edges in order to be able to reconstruct the full tree on the client side.

@danielnegri
danielnegri / fetch_tree.adoc
Created May 7, 2018 16:32 — forked from jexp/fetch_tree.adoc
Fetch a Tree with Neo4j

Fetch a Tree with Neo4j

Today I came across a really interesting StackOverflow question:

Given a forest of trees in a Neo4j REST server, I`m trying to return a single tree given the root vertex. Being each tree quite large, I need a de-duplicated list of all vertices and edges in order to be able to reconstruct the full tree on the client side.

def trapBOM(fileBytes []byte) []byte{
trimmedBytes := bytes.Trim(fileBytes, "\xef\xbb\xbf")
return trimmedBytes
}