Skip to content

Instantly share code, notes, and snippets.

Avatar

Russell Brown russelldb

  • Ditto.live
  • Leeds
View GitHub Profile
@russelldb
russelldb / git-squashing.md
Created Jun 27, 2019 — forked from jlevon/git-squashing.md
Forcing git to squash without rebasing
View git-squashing.md

Let's say I have a particular commit (for example, a gerrit patchset), with a whole bunch of merging history. I want a single commit of all its changes against master, without having to walk through a huge rebase of the intermediate commits.

First let's get it as a branch:

~/src/grot/gerrit-pull 6225/9
git checkout -b gerrit
@russelldb
russelldb / README.md
Created May 3, 2018 — forked from obscurerichard/README.md
Simulates a low bandwidth, high-latency network connection
View README.md

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency
slow dsl -b 1mbps         # Simulate DSL with a slower speed than the default
slow modem-56k -d eth0    # Simulate a 56k modem on the eth1 device. eth0 is unchanged.
View gist:97565097e95add8b626ea4661b6b4952

#Riak Multi DC Repl Cheat Sheet


##Types There are two types of multi data center replication in Riak.

  1. Fullsync

    Operation is triggered by connection creation between clusters, running riak-repl start-fullsync on the listener leader, or every fullsync_interval minutes. Relevant app.config settings:

@russelldb
russelldb / client_eqc.erl
Created Apr 9, 2018 — forked from jlouis/client_eqc.erl
EQC Cluster example
View client_eqc.erl
-module(client_eqc).
-compile(export_all).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_component.hrl").
api_spec() ->
#api_spec {
language = erlang,
modules = [
@russelldb
russelldb / agenda
Created Feb 7, 2018
OTp20 riak3 meeting agenda
View agenda
Some possible agenda points:
- Starting point for work (ted branchen? Basho develop? 2.2???)
- existing work ( Ted got about 80% through this work once, and there exists riak_core_ng)
- backwards compatibility
- assigning work, processes and coordination (many hands make light work, but too many cooks etc)
- testing and coverage and confidence (are we sure this change has no semantic impact? Is this code even tested?)
- Riak_test or CT or wat? (related to above)
- Etc?
@russelldb
russelldb / cltools.sh
Created Oct 2, 2017 — forked from justinbellamy/cltools.sh
Install Autoconf and Automake on OS X El Capitan
View cltools.sh
#!/bin/sh
##
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
#
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build
View erlang-17.0-rc2-wx-osx.md

Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installing wxWidgets

@russelldb
russelldb / init.el
Created Aug 22, 2017 — forked from seancribbs/init.el
seancribbs.com/emacs.d
View init.el
;; Use org-babel to load config
(require 'org)
(org-babel-load-file (expand-file-name "seancribbs.org" user-emacs-directory))
@russelldb
russelldb / riak_metrics.escript
Created Aug 21, 2017 — forked from bsparrow435/riak_metrics.escript
Escript to query various in-VM metrics on a Riak node not currently available from stats.
View riak_metrics.escript
-module(riak_metrics).
-compile(export_all).
main([NodeName0, Cookie, Length, Command]) ->
LocalName = 'riak_metrics@127.0.0.1',
NodeName = list_to_atom(NodeName0),
case net_kernel:start([LocalName]) of
{ok, _} ->
erlang:set_cookie(node(), list_to_atom(Cookie)),
case net_kernel:hidden_connect_node(NodeName) of
@russelldb
russelldb / collectd.conf
Created Aug 10, 2017 — forked from lukebakken/collectd.conf
Riak monitoring setup with collectd + Graphite
View collectd.conf
Hostname "ubuntu-12"
FQDNLookup true
BaseDir "/var/lib/collectd"
PIDFile "/var/run/collectd.pid"
PluginDir "/usr/local/lib/collectd"
TypesDB "/usr/local/share/collectd/types.db"
# LoadPlugin syslog
# <Plugin syslog>
# LogLevel info
You can’t perform that action at this time.