Skip to content

Instantly share code, notes, and snippets.

@raphiz
raphiz / config.yaml
Last active September 22, 2016 08:56
My openhsr connect config for HS2016
login:
username: rzimmerm
email: raphael.zimmermann@hsr.ch
sync:
global-exclude:
- .DS_Store
- Thumbs.db
conflict-handling:
### Keybase proof
I hereby claim:
* I am raphiz on github.
* I am raphiz (https://keybase.io/raphiz) on keybase.
* I have a public key whose fingerprint is E9C7 3898 CF7C 96D8 D321 37DF 522C C665 31B5 A199
To claim this, I am signing this object:
@raphiz
raphiz / sync.sh
Last active April 5, 2016 11:50
HSR Skripteserver Sync-Skript
#!/bin/bash
set -e
###################
## Konfiguration ##
###################
## Ersetze <your username> um nicht jedes mal nach deimem HSR Benutzername gefragt zu werden
# HSR_USERNAME="<your username>"
@raphiz
raphiz / README.md
Last active January 26, 2016 12:21
Moodle HSR Autologin Raw

Autologin for https://moodle.hsr.ch/ with the power of userscripts.

Please note that you should from a security point of view store the username and password using the browsers built-in password manager! To do so, store the before installing these scripts and remove the highlighted two lines from moodle_autologin_2.js. Otherwise, replace the and values with your credentials.

@raphiz
raphiz / euklid.py
Created January 24, 2016 14:10
A quick & dirty implementation of the Euclidean algorithm in python
#!/usr/bin/env python
# coding=utf-8
from tabulate import tabulate
a = 180
b = 101
def euklid(x_p, y_p, q_p=None, r_p=None, u_p=None, s_p=None, v_p=None, t_p=None, result=None):
@raphiz
raphiz / deploy.sh
Last active August 29, 2015 14:25
FTP Deplozment Script
#!/usr/bin/env bash
# Abort if a command fails!
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ ! -n "$HOST" ];then
echo "missing option \"HOST\", aborting"
exit 1
@raphiz
raphiz / deploy.sh
Created December 28, 2014 22:46
Easily deploy Composer Apps to a remote FTP server using curlftpfs, rsync and git
#!/usr/bin/env bash
# Requires: fuse, curlftpfs, rsync, git and composer
set -u
REPOSITORY="https://github.com/raphiz/php-raphael.li.git"
FTP_HOST="myhost.com"
FTP_USER="user"
FTP_PASS="secrit"
FTP_SUBFOLDER="httpdocs"
@raphiz
raphiz / synchronize_ftp.sh
Created November 12, 2014 22:24
Synchronize FTP server with a local directory (Linux)
#!/usr/bin/env bash
# Requires: curlftpfs, unison and fuse.
# Configuration:
MOUNTPOINT=/mnt/my_ftp_share/
LOCAL="/home/user/directory"
FTP_HOST="example.com"
FTP_USER="user"
FTP_PASS="secrit"