Skip to content

Instantly share code, notes, and snippets.

View YourFriendCaspian's full-sized avatar
🙃
I'm sure I'll be slow to respond so don't be mad.

yourfriendcaspian YourFriendCaspian

🙃
I'm sure I'll be slow to respond so don't be mad.
View GitHub Profile
@YourFriendCaspian
YourFriendCaspian / autostart_service.txt
Created September 5, 2017 17:09
Configure services to start on boot.
# Configure services to start on boot.
update-rc.d <Service_Name> enable
update-rc.d <Service_Name> enable
@YourFriendCaspian
YourFriendCaspian / .profile
Created September 2, 2017 06:24 — forked from opt9/.profile
Linux Color Man Page config
export LESS_TERMCAP_mb=$'\e[1;34m' # begin bold
export LESS_TERMCAP_md=$'\e[1;32m' # begin blink
export LESS_TERMCAP_so=$'\e[01;44;37m' # begin reverse video
export LESS_TERMCAP_us=$'\e[01;36m' # begin underline
export LESS_TERMCAP_me=$'\e[0m' # reset bold/blink
export LESS_TERMCAP_se=$'\e[0m' # reset reverse video
export LESS_TERMCAP_ue=$'\e[0m' # reset underline
export GROFF_NO_SGR=1 # for konsole and gnome-terminal
export MANPAGER='less -s -M +Gg'
@YourFriendCaspian
YourFriendCaspian / rsync.sh
Created September 2, 2017 06:22 — forked from Seeker1911/rsync.sh
linux backup and rsync
“As a practical example, let’s consider the imaginary external hard drive that we used earlier with tar.
If we attach the drive to our system and, once again, it is mounted at /media/BigDisk, we can perform a useful system backup
by first creating a directory named /backup on the external drive and then using rsync to copy the most important stuff
from our system to the external drive:
[me@linuxbox ˜]$ mkdir /media/BigDisk/backup
[me@linuxbox ˜]$ sudo rsync -av --delete /etc /home /usr/local /media/BigDisk/backup
In this example, we copy the /etc, /home, and /usr/local directories from our system to our imaginary storage device.
We included the --delete option to remove files that may have existed on the backup device that no longer existed on the
source device (this is irrelevant the first time we make a backup but will be useful on subsequent copies). Repeating the
procedure of attaching the external drive and running this rsync command would be a useful (though not ideal) way of keeping
@YourFriendCaspian
YourFriendCaspian / set_env_var.sh
Created September 2, 2017 06:13 — forked from pykong/set_env_var.sh
Script to permanently set environment variables under Linux (Ubuntu 16.04 and later). Run as sudo.
#!/bin/bash
# run under sudo
# script for permanently setting environment variables, found here:
# https://stackoverflow.com/questions/13046624/how-to-permanently-export-a-variable-in-linux
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not sudo."
exit 1
fi
echo "Enter variable name: "
read variable_name

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@YourFriendCaspian
YourFriendCaspian / hosts
Created September 2, 2017 05:31
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@YourFriendCaspian
YourFriendCaspian / ubuntu_server_provision.txt
Created September 2, 2017 05:27
Provision Ubuntu 16.04 Server
- Postgres
sudo apt install postgresql
move databases
- Samba File Server
https://help.ubuntu.com/lts/serverguide/samba-fileserver.html
@YourFriendCaspian
YourFriendCaspian / ubuntu_unattended_install.md
Last active September 2, 2017 05:25
Unattended Ubuntu Install- Download a non graphical Ubuntu installation ISO
@YourFriendCaspian
YourFriendCaspian / mysql_python_on_debian.txt
Created September 2, 2017 05:15
Install Mysql with Python and Django Debian/Derivatives - Translated
#Install Mysql with Python and Django Debian/Derivatives
#To install we need to have some dependencies in the system for now we will show on
#Debian and Derivatives.
#But first install updates and MySQL
```
$ sudo apt-get update
$ sudo apt-get upgrade
@YourFriendCaspian
YourFriendCaspian / Mysql and Django.md
Created September 2, 2017 04:38 — forked from xtornasol512/Mysql and Django.md
Cómo instalar MySql en Debian/derivados, crear Bases de Datos y Usuarios para usarlos en Django

Instalar Mysql con Python y Django Debian/Derivados

Para instalar necesitamos tener unas dependencias en el sistema por ahora mostraremos en equipos Debian y Derivados. Pero primero instalares actualizaciones y MySQL


Actualizaciones y MySQL