README is empty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script shows how to authenticate with OAuth2 with a backend application | |
# The token is saved to disk in $HOME/.osmapi/token.json and can be reused until it's revoked or expired. | |
# install oauthlib for requests: pip install oauthlib requests-oauthlib | |
from requests_oauthlib import OAuth2Session | |
import json | |
import webbrowser | |
import osmapi | |
from dotenv import load_dotenv, find_dotenv | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name E3 Improver | |
// @namespace https://metaodi.ch | |
// @version 0.28 | |
// @description Make E3 even better :) | |
// @author Stefan Oderbolz | |
// @match https://e3online.prd.szh.loc/ | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=szh.loc | |
// @grant GM_setValue | |
// @grant GM_getValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Caluculate quartiles to get limits */ | |
proc univariate data=work.ZaehlstelleZeit_&num. noprint; | |
var AnzFahrzeuge; | |
output out=work.ZaehlstelleStat_&num. p25=q1 p75=q3; | |
run; | |
data work.ZaehlstelleStat_&num.; | |
set work.ZaehlstelleStat_# | |
ZSID = "&name"; | |
iqr = q3 - q1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Named regex groups | |
import re | |
sentence = "\"The Hitchhiker's Guide to the Galaxy\" was published in 1979" | |
regex = "\"([\w ']+)\" was published in (\S+)" | |
print "find_all: %s"%(re.findall(regex, sentence)) | |
match = re.search("\"(?P<book>[\w ']+)\" was published in (?P<year>\S+)", sentence) | |
print "match groups: %s"%(str(match.groups())) | |
print "match group1: %s"%(str(match.group(1))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a new DB dump | |
mysqldump -u USERNAME -p --skip-extended-insert --skip-quick DB_NAME > dump.sql | |
# replace the domain name in the dump, this is needed if you plan to use the dump on another domain | |
sed 's/www\.example\.com/stage.example.com/g' < dump.sql > updated_dump.sql | |
# optional: re-create the database | |
mysql -u root -e"show databases;" | grep DB_NAME && mysql -u root -e"drop database DB_NAME;" | |
mysql -u root -e"create database DB_NAME;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove text-rending to fix Chromium 45 bug | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://gitlab.liip.ch | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Tabs to spaces for GitLab | |
// @namespace http://liip.ch/ | |
// @version 0.1 | |
// @description Fix tab bug of GitLab/Chromium 45 (https://gitlab.com/gitlab-org/gitlab-ce/issues/3220) | |
// @author Odi | |
// @match https://gitlab.liip.ch/* | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="count-1"></div> | |
<script> | |
window.setTimeout(function() { | |
var sum = 0; | |
$('table:eq(0) tr[class^="row"]').each(function() { | |
storyPoint = jQuery(this).find("td:eq(4)"); | |
value = parseInt(storyPoint.text()); | |
if (! isNaN(value)) { | |
sum += value; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
root_dir="$HOME" | |
if [ -n "$1" ] ; then | |
root_dir=$1 | |
fi | |
for vdir in `find $root_dir -name .vagrant -type d 2>/dev/null`; do | |
cd $vdir | |
cd .. | |
vtext=`vagrant status 2>/dev/null | awk '{$1=""; print $0}' | sed 's/^ //g' | grep 'virtualbox' | GREP_COLOR="2;32" egrep --color=always "(not created|poweroff)"` | |
if [ -z "$vtext" ] ; then |
NewerOlder