Skip to content

Instantly share code, notes, and snippets.

Avatar

crappyrules

View GitHub Profile
@crappyrules
crappyrules / docker.sh
Last active Oct 26, 2020
installation of docker & docker compose on ubuntu 20.04 minimal
View docker.sh
#!/bin/bash
# this script will setup docker and docker compose on Ubuntu 20
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install -y docker-ce
# now that we installed docker, we will move onto docker compose
@crappyrules
crappyrules / lemp.sh
Last active Sep 15, 2020
lemp development server install
View lemp.sh
#!/bin/bash
# This script will install all needed dependencies.
# Set repositories and update apt
mv /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb http://deb.debian.org/debian/ buster main contrib non-free
deb-src http://deb.debian.org/debian/ buster main contrib non-free
deb http://deb.debian.org/debian/ buster-backports main contrib non-free
deb http://security.debian.org/debian-security buster/updates main
@crappyrules
crappyrules / miner.sh
Created Mar 5, 2020
pizero bitcoin miner
View miner.sh
#!/bin/bash
apt-get install -y pkg-config libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev
wget http://ck.kolivas.org/apps/cgminer/4.9/cgminer-4.9.2.tar.bz2
tar xvf cgminer-4.9.2.tar.bz2
rm cgminer-4.9.2.tar.bz2
mv cgminer-4.9.2 cgminer
cd cgminer
./configure --enable-icarus --enable-blockeruptor
make
@crappyrules
crappyrules / init.sh
Last active Feb 20, 2020
initial server loading
View init.sh
#!/bin/bash
# This script will install all needed dependencies.
# Set repositories and update apt
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
apt update
apt install -y linux-headers-4.19.0-6-amd64
# Now we set up 2gb of swap space to ensure we do not run out of memory while compiling or running the daemon under normal load.
apt install -y dphys-swapfile
# Set size of swap file and setup swapfile
@crappyrules
crappyrules / default
Last active Sep 15, 2020
default nginx php
View default
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
@crappyrules
crappyrules / hosts
Created Feb 1, 2020
no youtube plz sirs
View hosts
0.0.0.0 www.youtube.com
0.0.0.0 host.youtube.com
0.0.0.0 mx.youtube.com
0.0.0.0 admin.youtube.com
0.0.0.0 devel.youtube.com
0.0.0.0 stats.youtube.com
0.0.0.0 http.youtube.com
0.0.0.0 mx0.youtube.com
0.0.0.0 administration.youtube.com
0.0.0.0 development.youtube.com
View trtlnode.sh
#!/bin/bash
# This script will install all needed dependencies to run the backend for a public node.
# The script is designed to work on Debian 9 stretch
# If you do not have a github account, create one to simplify the install process
# First fork this repo https://github.com/crappyrules/turtlecoind-ha/tree/script then edit index.js line 67 to add your wallet address and 68 for set your node fee
# Then fork this gist https://gist.github.com/crappyrules/5087dd1485064620dcc97420e7af8f84/forks. Edit line 21 to point to your github and not mine
# so it would be git clone -b script https://github.com/YOURGITHUBNAME/turtlecoind-ha.git
# after you've forked and edited the script on github, click the Raw button at the top of the code. copy that URL
# go to your bash prompt and type
# sudo apt update && sudo apt install -y wget && wget URL TO YOUR GIST GOES HERE