Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥

DANGerous tommydangerous

🔥
View GitHub Profile
View gist:0d25ccf37b67b5e98e1f655043f16d4d
Cannot start service app: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused"
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
View gist:ceb38b66c1f8f6303c07d0d2730f0caf
# https://www.anaconda.com/download/#linux
$ ssh jpy
$ mkdir tmp
$ cd tmp
$ wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
$ bash Anaconda3-5.0.1-Linux-x86_64.sh
$ vi ~/.bashrc
# export PATH=~/anaconda3/bin:$PATH
View gist:faca580583db45c517e1f8a07437deab
# 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
@tommydangerous
tommydangerous / gist:3b5c71a8e3229b4610f378f0184f7a14
Created Jan 17, 2018
Install later versions of Go on Ubuntu
View gist:3b5c71a8e3229b4610f378f0184f7a14
$ sudo add-apt-repository ppa:longsleep/golang-backports
$ sudo apt-get update
$ sudo apt-get install golang-go
@tommydangerous
tommydangerous / gist:a8e2db140a15a8d3bb71027be8360a7e
Last active Jan 17, 2018
Run Jupyter Notebook and access locally
View gist:a8e2db140a15a8d3bb71027be8360a7e
# 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
View gist:1b6d96c2908749664b5b32fe215554f8
# 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
View gist:ddd00427aa33d8b93ffb
# 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)
View gist:9c376b774ab3988206a5
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
View gist:760db9411becab45a37f
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;
View digitalocean.md

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

You can’t perform that action at this time.