Skip to content

Instantly share code, notes, and snippets.

View aerobless's full-sized avatar

Theo Winter aerobless

View GitHub Profile
#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'
#Angular2 with TypeScript .gitignore
typings
app/**/*.js
app/**/*.map
app/npm-debug.log
npm-debug.log
node_modules
jspm_packages
bower_components
<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>
@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"

@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 / pi_ultrahook.md
Last active March 27, 2017 17:38
Make Pi launch ultrahook right away

Make a Raspberry Pi (Raspbian) launch Ultrahook on boot

  1. sudo apt-get install screen
  2. The command we need to start a named screen with ultrahook and then detach it is: screen -S ultrahook -d -m ultrahook googlehome 8080 .
  3. Open /etc/rc.local in vim and add the command from above.
  4. Reboot to make sure it works: sudo reboot, when it's up again screen -X ultrahook
@aerobless
aerobless / SmartHome.md
Last active March 29, 2017 08:47
How I've setup my smart home with Google Home at it's center and various IFTTT enabled devices.

Google Home

These commands can be issued via Google Home. It is implied that Google Home is triggered with "Okay Google" before a command e.g. "What's the news on BBC" is issued.

  • Entertainment:

    • News:

      • What's the news on BBC
        Plays BBC Broadcast (Setup News Source in Google Home Config)
      • What's the news on CNN
        Play CNN Broadcast (Setup News Source in Google Home Config)
@aerobless
aerobless / Jenkinsfile.groovy
Last active January 8, 2024 03:52
An example Jenkinsfile for a build pipeline using gradle, junit, selenium, checkstyle
pipeline {
agent {
label 'agentId' //The id of the slave/agent where the build should be executed, if it doesn't matter use "agent any" instead.
}
triggers {
cron('H */8 * * *') //regular builds
pollSCM('* * * * *') //polling for changes, here once a minute
}
@aerobless
aerobless / Jenkinsfile_Angular_SpringBoot.groovy
Created January 29, 2018 12:08
A Jenkinsfile describing the build process of a Angular4 & Spring Boot application
pipeline {
agent {
label 'BUILD' //Executed on agents with this label
}
triggers {
pollSCM('* * * * *') //Polls every minute. If your git repo supports web-hooks this is not necessary.
}
@aerobless
aerobless / credentials.gradle
Last active February 23, 2018 14:11
Gradle script to access credentials stored in gnome-keyring
String getJFrogPasswordFromSystemKeyring() {
def stdout = new ByteArrayOutputStream()
def stderr = new ByteArrayOutputStream()
exec {
commandLine 'secret-tool', 'lookup', 'server', 'git.company.ch'
standardOutput = stdout
errorOutput = stderr
ignoreExitValue = true
}