Skip to content

Instantly share code, notes, and snippets.

View tommydangerous's full-sized avatar
🧙
Fire!

DANGerous tommydangerous

🧙
Fire!
View GitHub Profile
FIXME:
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
or
ERROR -: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2
@tommydangerous
tommydangerous / fix_conflicted_files
Created July 31, 2014 18:53
Fix Dropbox conflicted files
#!/bin/bash
folder=/users/tommydangerous/dropbox/rails_projects/ombrb
clear
echo "This script will climb through the $folder tree and repair conflict files"
echo "Press a key to continue..."
read -n 1
echo "------------------------------"

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh root@123.123.123.123

Add ssh fingerprint and enter password provided in email

@tommydangerous
tommydangerous / gist:760db9411becab45a37f
Created March 17, 2015 22:40
Belly's Stack v2 Nginx
upstream api {
least_conn;
server 10.0.0.101:8080;
server 10.0.0.102:8080;
server 10.0.0.103:8080;
server 10.0.0.104:8080;
}
upstream homepage {
least_conn;
FROM ruby
ENV RAILS_ENV production
ENV ROOT_DIR /var/www/app
RUN mkdir -p $ROOT_DIR/tmp
WORKDIR $ROOT_DIR
# Mount volume for Nginx to serve static files from public folder
VOLUME $ROOT_DIR
# Mupen64Plus Configuration File
# This file is automatically read and written by the Mupen64Plus Core library
[Core]
# Draw on-screen display if True, otherwise don't draw OSD
OnScreenDisplay = True
# Use Pure Interpreter if 0, Cached Interpreter if 1, or Dynamic Recompiler if 2 or more
R4300Emulator = 2
# Disable compiled jump commands in dynamic recompiler (should be set to False)
@tommydangerous
tommydangerous / gist:1b6d96c2908749664b5b32fe215554f8
Created January 17, 2018 01:24
Install Jupyter Notebook on Ubuntu
# https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-ubuntu-16-04
$ sudo pip3 install -vU setuptools = 3
$ sudo pip3 install jupyter = 3
@tommydangerous
tommydangerous / gist:a8e2db140a15a8d3bb71027be8360a7e
Last active January 17, 2018 02:39
Run Jupyter Notebook and access locally
# SSH into instance
$ jupyter notebook --no-browser
# Open local terminal and create tunnel
$ ssh -i ~/Documents/keys/aws/airbnb-macbook.pem -L 8157:127.0.0.1:8888 \
ubuntu@ec2-13-57-14-25.us-west-1.compute.amazonaws.com
# Kill any running notebooks
$ jupyter notebook list
$ netstat -tulpn
@tommydangerous
tommydangerous / gist:3b5c71a8e3229b4610f378f0184f7a14
Created January 17, 2018 03:39
Install later versions of Go on Ubuntu
$ sudo add-apt-repository ppa:longsleep/golang-backports
$ sudo apt-get update
$ sudo apt-get install golang-go
@tommydangerous
tommydangerous / gist:faca580583db45c517e1f8a07437deab
Created January 17, 2018 04:11
Install RVM & Ruby on Ubuntu
# https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rvm-on-ubuntu-16-04
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
$ cd /tmp
$ curl -sSL https://get.rvm.io -o rvm.sh
$ ./rvm.sh
$ cat /tmp/rvm.sh | bash -s stable --rails
$ source /home/ubuntu/.rvm/scripts/rvm
$ rvm list known
$ rvm install 2.5