Skip to content

Instantly share code, notes, and snippets.

@sascha-andres
sascha-andres / get-gitlab-runner.ps1
Last active April 30, 2018 06:52
Download and install latest gitlab-runner
##########################################################################
# Script to install/update GitLab runner
##########################################################################
# Download latest release to Gitlab-Runner and register as
# System service
#
# Your execution policy needs to allow running scripts, see
# https:/go.microsoft.com/fwlink/?LinkID=135170
# It has to be RemoteSigned, Set it using
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
@sascha-andres
sascha-andres / .gitattribute
Last active November 24, 2017 13:07
GIT LFS conversion
*.mp4 filter=lfs diff=lfs merge=lfs -text
@sascha-andres
sascha-andres / lxshare
Created September 5, 2017 13:23
lxshare
#! /bin/bash
LX_USER=`id -un`
USER_ID=`id -u`
## check options
while getopts "u:i:s:f:" opt; do
case $opt in
u)
@sascha-andres
sascha-andres / keybase.md
Created September 4, 2017 19:09
keybase.md

Keybase proof

I hereby claim:

  • I am sascha-andres on github.
  • I am saschaandres (https://keybase.io/saschaandres) on keybase.
  • I have a public key ASC933beRh5NbZuSDwoVDkL2K99eIrmDCo7pNiDV3X_LfQo

To claim this, I am signing this object:

package main
const (
// Database connection properties
dbType = "mysql"
dbUser = "test"
dbPassword = "test"
dbAddr = "localhost:3306"
dbName = "example-app"
@sascha-andres
sascha-andres / winshare
Created September 4, 2017 13:46
winshare
#! /bin/bash
WIN_USER=`id -un`
USER_ID=`id -u`
## check options
while getopts "u:i:s:f:" opt; do
case $opt in
u)
func init() {
rand.Seed(time.Now().UnixNano())
}
func retry(attempts int, sleep time.Duration, f func() error) error {
if err := f(); err != nil {
if s, ok := err.(stop); ok {
// Return the original error for later checking
return s.error
}
curl -s https://api.github.com/repos/sascha-andres/devenv/releases | grep browser_download_url | grep Linux | head -n 1 | cut -d '"' -f 4