Skip to content

Instantly share code, notes, and snippets.

View dominicsayers's full-sized avatar
☣️
I'm back

Dominic Sayers dominicsayers

☣️
I'm back
View GitHub Profile
@dominicsayers
dominicsayers / gist:83bca1974457faa71fb5
Created March 11, 2015 09:38
OneName verification
Verifying that +dominicsayers is my openname (Bitcoin username). https://onename.com/dominicsayers
@dominicsayers
dominicsayers / gist:75878d76c0aa6f4a3c15
Created December 21, 2014 10:58
Add a "dev" command to go to the correct project folder
# At the end of .bashrc
dev () {
cd "$HOME/Development/$1"
}
@dominicsayers
dominicsayers / gist:9746698
Created March 24, 2014 18:54
Keybase proof of identity
### Keybase proof
I hereby claim:
* I am dominicsayers on github.
* I am dominicsayers (https://keybase.io/dominicsayers) on keybase.
* I have a public key whose fingerprint is CF56 1682 3C17 C7F2 58E0 85BC D60F 652E ADD7 362A
To claim this, I am signing this object:
This file has been truncated, but you can view the full file.
You are using WebMock 1.16.1. VCR 2.8.0 has been tested against WebMock >= 1.8.0, < 1.16, and you are using a newer version. If you experience VCR issues, consider downgrading WebMock as it may fix it.
/home/build/.rvm/gems/ruby-2.1.0@xendata/gems/rspec-core-2.14.7/lib/rspec/core/memoized_helpers.rb:199: [BUG] Segmentation fault at 0x007ffffe0abff8
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:9336 p:---- s:32697 e:002696 CFUNC :fetch
c:9335 p:0011 s:32693 e:002692 LAMBDA /home/build/.rvm/gems/ruby-2.1.0@xendata/gems/rspec-core-2.14.7/lib/rspec/core/memoized_helpers.rb:199 [FINISH]
c:9334 p:0007 s:32691 e:002690 LAMBDA /home/build/Development/Xenapto/xendata/spec/jobs/angel_list_spec.rb:64 [FINISH]
c:9333 p:0015 s:32689 e:002685 BLOCK /home/build/.rvm/gems/ruby-2.1.0@xendata/gems/rspec-core-2.14.7/lib/rspec/core/memoized_helpers.rb:199 [FINISH]
c:9332 p:---- s:32683 e:002682 CFUNC :fetch
@dominicsayers
dominicsayers / elasticsearch.md
Last active March 2, 2024 15:52
Configuring ElasticSearch to use less memory

What I actually did

/etc/security/limits.conf

elasticsearch hard memlock 100000

/etc/default/elasticsearch

@dominicsayers
dominicsayers / server-config.md
Last active January 2, 2016 08:09
Post-install server configuration Ubuntu Server 13.10 64-bit
  1. sudo su
  2. apt-get install ssh openssh-server
  3. pico /etc/network/interfaces
iface eth0 inet static
	address		192.168.1.99
	netmask		255.255.255.0
	network		192.168.1.0
	broadcast	192.168.1.255
@dominicsayers
dominicsayers / ubuntu-server-setup.md
Last active December 27, 2015 18:19
Basic setup of Ubuntu server

This is my personal memo for setting up new Ubuntu servers in my environment. It may not be appropriate for your environment but feel free to use it as a starting point.

During setup

  1. Accept all defaults except as listed here.
  2. For the machine name use the full name including the local domain, e.g. new-server.local.domain
  3. Add a user for all build tasks, name is Build, username is build
  4. Do not encrypt the home directory.
  5. Do not use LVM
@dominicsayers
dominicsayers / gist:6185585
Last active December 20, 2015 19:48
Checking for double quotes in output strings using Aruba
Feature: Config
In order to configure Foreplay
As a CLI
I want to be as usable as possible
Scenario: Check configuration parameters - invalid parameter
When I run `foreplay check --invalid xyz`
Then the output should contain:
"""
ERROR: foreplay check was called with arguments ["--invalid", "xyz"]
@dominicsayers
dominicsayers / relationships.md
Last active December 19, 2015 06:09
Storing relationships in a relational database

Storing relationships in a relational database

Approach 1: least data, simplest schema

The simplest way to store bilateral relationships is in a relationships table, with the subject (party_a) of the relationship in one column and the counterparty (party_b) of the relationship in another.

Schema

Column Type Description
@dominicsayers
dominicsayers / phantomjs.md
Last active November 21, 2016 01:59
Installing PhantomJS on Ubuntu

(updated version of http://www.joyceleong.com/log/installing-phantomjs-on-ubuntu/)

  1. export P=phantomjs-2.1.1-linux-x86_64
  2. cd /usr/local/share
  3. sudo curl -L -o $P.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/$P.tar.bz2
  4. sudo tar xvf $P.tar.bz2
  5. sudo ln --force -s /usr/local/share/$P /usr/local/share/phantomjs
  6. sudo ln --force -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
  7. phantomjs --version