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 / crunchbase-api-v1.md
Created September 19, 2011 14:01
CrunchBase API v1

UPDATE: CrunchBase have now restored their own documentation so you should now use the canonical information at http://developer.crunchbase.com/. I am leaving this here in case of existing links to it but it is of historical interest only.

NOTE: This documentation has been put here because I couldn't find it anywhere else. I am not associated with Crunchbase in any way. I cannot help you with your Crunchbase API problems. If you need help try here: https://groups.google.com/forum/#!forum/crunchbase-api

CrunchBase API v1 Documentation

Overview

@dominicsayers
dominicsayers / virtualbox.md
Last active October 10, 2022 19:18
Installing Virtualbox 4.3 on Ubuntu Server 13.10 64-bit

First install Virtualbox

  1. sudo pico /etc/apt/sources.list.d/virtualbox.list
  2. Add deb http://download.virtualbox.org/virtualbox/debian saucy contrib non-free
  3. wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
  4. sudo apt-get update
  5. sudo apt-get install dkms unzip
  6. sudo apt-get install virtualbox-4.3 --no-install-recommends
  7. wget http://download.virtualbox.org/virtualbox/4.3.6/Oracle_VM_VirtualBox_Extension_Pack-4.3.6.vbox-extpack
  8. sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.6.vbox-extpack
@dominicsayers
dominicsayers / gist:4217521
Last active October 13, 2015 15:37
Configuring BIND using Webmin
  1. I installed BIND during the Ubuntu setup process by selecting DNS Server when asked for package selections.
  2. Click Create Master Zone
  3. Enter al.gy for Domain Name/Network and click Create
  4. Add A-records
  5. Apply Zone
  6. Apply configuration
@dominicsayers
dominicsayers / gist:4510890
Created January 11, 2013 14:06
[FIXED] Problem installing pg gem: checking for PQconnectdb() in -lpq... no
dominicsayers$ sudo gem install pg
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
@dominicsayers
dominicsayers / Virtualbox_clone_Ubuntu_guest.md
Last active December 12, 2015 09:19
Cloning an Ubuntu guest machine in Virtualbox

Cloning an Ubuntu guest on Virtualbox

Cloning a VM is easy in theory but if you don't set up networking properly in the newly cloned machine it can kill all networking on the host.

In particular, Virtualbox gives your cloned machine a new NIC with a new MAC code. This is probably what you want since you don't want multiple machines on your network with the same MAC address. But Ubuntu still has the NIC from the original machine in one of its configuration files, so there's a clash between the hardware created by Virtualbox and the Ubuntu VM's own view of the world.*

Simple but tedious to fix. Here goes, on the Virtualbox host machine:

  1. su vbox
  2. VBoxManage clonevm original_vm_name --name new_vm_name --register
@dominicsayers
dominicsayers / s3cmd_install.md
Created March 6, 2013 16:36
Installing s3cmd on Ubuntu Server
  1. sudo apt-get install python-setuptools
  2. wget http://downloads.sourceforge.net/project/s3tools/s3cmd/1.5.0-alpha1/s3cmd-1.5.0-alpha1.tar.gz
  3. tar xvfz s3cmd-1.5.0-alpha1.tar.gz
  4. cd s3cmd-1.5.0-alpha1
  5. python setup.py install
  6. s3cmd --configure
@dominicsayers
dominicsayers / postfix-dovecot-subdomains.md
Last active April 10, 2023 17:39
Installing Postfix & Dovecot on a fresh Amazon EC2 Ubuntu Server 12.10 instance and setting it up so all mail to all subdomains goes to one local user with IMAP access.

Instance setup

  1. Make sure the security group is allowing through any ports you need for SMTP & IMAP. Also open port 10000 for Webmin.
  2. You'll want to give it an Elastic IP address so it doesn't wander aimlessly round the IPv4 address space.

Webmin setup

  1. sudo apt-get install ntp ntpdate dkms htop - optional: these are just my favourite things
  2. sudo pico /etc/apt/sources.list and add at the end:
@dominicsayers
dominicsayers / schema_syntax_error.md
Created March 18, 2013 14:59
Syntax errors in ActiveRecord schema.rb caused by $\ = ','

If you get schema.rb:16: syntax error, unexpected ',' when you do a rake environment db:setup it may be because the ActiveRecord task that builds this file happens to use the Ruby print statement.

So if you have a default separator set up by using

$\ = ','

somewhere in your code that gets executed before a rake task (e.g. in the header of a class) then schema.rb will end up with stray commas interspersed with the code that gets generated.

Obviously this effect will depend on the default delimiter you've configured but if it's not whitespace, prepare for trouble.

@dominicsayers
dominicsayers / HMRC-Basic-PAYE-Tools-1046.md
Created March 25, 2013 15:23
HMRC Basic PAYE Tools authentication error 1046

If you're getting an authentication error when trying to make a submission using the HMRC Basic PAYE Tools then check your password length. A password of more than 12 characters will not work.

The website lets you set up a longer password and use it to log in but it will not work for the Basic PAYE Tools.

Change your password on the website to 12 characters or less and you should be able to make your submission. Note that on the password change page it does tell you it should be 12 characters or less.

@dominicsayers
dominicsayers / mongodb-recovery.md
Created April 16, 2013 09:35
Recover Mongodb on Ubuntu after an unclean shutdown
sudo -u mongodb rm /var/lib/mongodb/mongod.lock
sudo -u mongodb mongod --dbpath /var/lib/mongodb --repair
sudo start mongodb