Skip to content

Instantly share code, notes, and snippets.

View sn's full-sized avatar

ghstcode sn

View GitHub Profile

Keybase proof

I hereby claim:

  • I am seannieuwoudt on github.
  • I am seannieuwoudt (https://keybase.io/seannieuwoudt) on keybase.
  • I have a public key ASCZ5-t2SZCf4Vu9jjucZ-Z3SDmvbQ-VJQkhu7e9Giiqtgo

To claim this, I am signing this object:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo apt install apt-transport-https
echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
# Generate random passwords
# set user variables
# create user accounts
# set sudo etc
# /home/ubuntu/bin/ruby
# /home/ubuntu/bin/gem
echo "####################################"
echo "# Apollo Ruby VM Install #"
echo "####################################"
@sn
sn / gist:9b52dcbe692c722bfa6b3410ea4c04b9
Last active November 11, 2016 09:39
Fixing: Can't install RMagick
Step 1:
sudo apt-get install libmagickwand-dev
sudo apt-get install graphicsmagick-imagemagick-compat
Step 2:
sudo find / -name MagickWand.h
$> /usr/include/ImageMagick/wand/MagickWand.h (Take note of this path).
Step 3:
C_INCLUDE_PATH=/usr/include/ImageMagick/ gem install rmagick
@sn
sn / gist:c72e7a35a5471575fcf2
Created March 16, 2015 06:58
Fix for VBox kernel driver not installed (rc=-1908) error
sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart
@sn
sn / gist:2b9793aecb3a2d62a43c
Created March 7, 2015 19:01
List of countries to use in seeds.rb
Country.create([
{:name => "Afghanistan", :alpha2 => "AF"},
{:name => "Albania", :alpha2 => "AL"},
{:name => "Algeria", :alpha2 => "DZ"},
{:name => "American Samoa", :alpha2 => "AS"},
{:name => "Andorra", :alpha2 => "AD"},
{:name => "Angola", :alpha2 => "AO"},
{:name => "Anguilla", :alpha2 => "AI"},
{:name => "Antarctica", :alpha2 => "AQ"},
{:name => "Antigua and Barbuda", :alpha2 => "AG"},
@sn
sn / gist:6bac786fd175f471b64e
Last active August 29, 2015 14:11
Kirby Nginx configuration file for site running on PHP FastCGI
server {
listen 80;
listen [::]:80;
root /var/www/site;
index index.php index.html index.htm;
server_name _;
autoindex on;
access_log off;
# Kirby Specific Directories
@sn
sn / gist:5808571
Created June 18, 2013 19:38
Scaling IMG elements proportionally in responsive UI's
img {
width:auto;
max-width:100%;
height:auto;
}
@sn
sn / gist:2942076
Created June 16, 2012 17:50
Installing PHPUnit with MAMP PRO on OSX
1) Open up the terminal
2) Don't use version of PEAR that came with OS-X, use the one that came with MAMP (/Applications/MAMP/bin/php/php5.3.6/bin/pear)
3) Upgrade PEAR:
/Applications/MAMP/bin/php/php5.3.6/bin/pear channel-update pear.php.net
/Applications/MAMP/bin/php/php5.3.6/bin/pear channel-update upgrade pear
If you receive the following error: `Notice: unserialize(): Error at offset 276 of 1133 bytes in Config.php on line 1050`,
delete the PEAR config file found here: /Applications/MAMP/bin/php/php5.3.6/conf/pear.conf
4) Register the channels:
@sn
sn / gist:2006978
Created March 9, 2012 15:24
Create new product in Mooblr API
<?php
/**
* Add a new product to the system
*
* @param string $sku
* @param float $cost
* @param string $name
* @param string $desc
* @param float $markup
* @param int $categories_id