Skip to content

Instantly share code, notes, and snippets.

View stefanozanella's full-sized avatar

Stefano Zanella stefanozanella

View GitHub Profile
@ryanpato
ryanpato / XCUIElement+Wait.swift
Last active January 4, 2024 04:05
XCUIElement+Wait
//
// XCUIElement+Wait.swift
//
// Created by Ryan Paterson on 12/12/2020.
//
import XCTest
extension XCUIElement {
/// The period of time in seconds to wait explicitly for expectations.
@stantonk
stantonk / JDBIjOOQ.java
Last active July 8, 2022 15:06
JDBI + jOOQ. Combine SQL Builder of jOOQ with all the awesomeness of JDBI, but avoid using jOOQ's codegen, having to keep it up to date with schema changes (just update the single query that's changed) or overcomplicating your build process. jOOQ never touches the database.
// see:
// http://jdbi.org/fluent_queries/
// http://www.jooq.org/doc/3.7/manual/getting-started/use-cases/jooq-as-a-standalone-sql-builder/
// Your Java Bean
public static class Reminder {
private long id;
private long customerId;
public Reminder(long id, long customerId) {
@avleen
avleen / logstash-template.json
Created June 21, 2016 18:47
Elasticsearch template for Logstash, showing doc_values for specific fields and using notation on dynamic fields to declare type.
{
"template": "logstash-*",
"settings" : {
"number_of_shards" : 180,
"number_of_replicas" : 1,
"index.refresh_interval" : "5s",
"index.routing.allocation.total_shards_per_node" : 4,
"index.search.slowlog.threshold.query.warn": "100ms",
"index.search.slowlog.threshold.fetch.warn": "100ms",
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@bluemalkin
bluemalkin / terraform-2tier-vpc
Last active November 16, 2019 04:22
Terraform 2 tier VPC with nat
# define some variables
variable "aws_ubuntu_ami" {
default = "ami-972444ad"
}
variable "aws_keypair" {
default = "xxxx"
}
# AWS account details
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

The Network The Next Frontier for Devops http://www.slideshare.net/botchagalupe/sdn-and-devops

Cumulus Networks: A Sneak Preview of One of My Favorite Startups - James Hamilton Blog http://perspectives.mvdirona.com/2013/06/18/CumulusNetworksASneakPreviewOfOneOfMyFavoriteStartups.aspx

Stanford Seminar - Software-Defined Networking at the Crossroads http://www.youtube.com/watch?v=WabdXYzCAOU

NetworkStatic | Brent Salisbury Blog http://networkstatic.net/

Network World: A conversation with Kelly Wanser, CEO of Stateless Networks http://www.statelessnetworks.com/network-world-a-conversation-with-kelly-wanser-ceo-of-stateless-networks/

@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@steveklabnik
steveklabnik / test.txt
Created April 25, 2013 19:55
Lots of gems throw warnings!
$ rake test
/opt/rubies/2.0.0-p0/bin/ruby -I"lib:test" -w -I"/Users/steve/.gem/ruby/2.0.0/gems/rake-10.0.4/lib" "/Users/steve/.gem/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_test_loader.rb" "test/map_stream_test.rb" "test/map_test.rb" "test/merge_test.rb" "test/mvp_test.rb" "test/on_value_test.rb" "test/select_test.rb"
/Users/steve/.gem/ruby/2.0.0/gems/simplecov-html-0.7.1/lib/simplecov-html.rb:57: warning: assigned but unused variable - title_id
/Users/steve/.gem/ruby/2.0.0/gems/coveralls-0.6.7/lib/coveralls.rb:66: warning: `&' interpreted as argument prefix
/Users/steve/.gem/ruby/2.0.0/gems/coveralls-0.6.7/lib/coveralls.rb:72: warning: `&' interpreted as argument prefix
/Users/steve/.gem/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/exceptions.rb:157: warning: assigned but unused variable - message
/Users/steve/.gem/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/exceptions.rb:167: warning: assigned but unused variable - message
/Users/steve/.gem/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/response.
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: