Skip to content

Instantly share code, notes, and snippets.

View aerobless's full-sized avatar

Theo Winter aerobless

View GitHub Profile
@aerobless
aerobless / digital-ocean-new-lamp-site-setup.md
Last active March 4, 2017 16:28
Digital Ocean: Setup a new LAMP site

Setting up a new LAMP site on Digital Ocean

1. Database

1.1 Connect via SSH. Mysql root password is shown on login. Run mysql.
1.2 Create a new database with CREATE DATABASE db_name;.
1.3 Create a new user with CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'.
1.4 Grant permissions to user with GRANT ALL PRIVILEGES ON db_name.* TO 'username'@'localhost';.
1.5 When finished run FLUSH PRIVILEGES;.

@aerobless
aerobless / headles-wifi-raspbian.md
Last active April 3, 2017 15:57
Raspberry Pi: Headless Wifi Configuration for the first boot

Raspberry Pi: Headless Wifi Configuration for the first boot

  1. Download the latest Raspbian. Get the "lite" image if you don't require a GUI.

  2. Burn the image to your SD card as you normally would depending on your OS. Etcher is a good tool for all systems.

  3. Open the boot volume in finder and create a new file called "wpa_supplicant.conf".

  4. Write your network config like this: (That's for WPA2 Personal with AES)

    network={
    

ssid="YOUR_SSID"

<VirtualHost *:80>
#Redirect http://yourDomain.com to https://yourDomain.com
ServerName yourDomain.com
Redirect permanent / https://yourDomain.com/
</VirtualHost>
<VirtualHost *:80>
#Redirect http://www.yourDomain.com to https://yourDomain.com
ServerName www.yourDomain.com
Redirect permanent / https://yourDomain.com/
</VirtualHost>
#Angular2 with TypeScript .gitignore
typings
app/**/*.js
app/**/*.map
app/npm-debug.log
npm-debug.log
node_modules
jspm_packages
bower_components
#Activates the animated wallpaper temporarily
alias playWP='/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background'
#Activates the animated wallpaper until it's stopped. You can close the terminal window.
alias startWP='nohup /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background > /dev/null &'
#Stops the animated wallpaper by killing the screensaver engine.
alias stopWP='killall ScreenSaverEngine'