Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
i3status | while :
do
read line
playerstatus=`playerctl status`
artist=`playerctl metadata artist`
title=`playerctl metadata title`
np=""
if [[ "$playerstatus" == "Playing" ]]; then
<Printer Peage>
UUID urn:uuid:zo'n-uuid
Info Peage
Location Overal
MakeModel KONICA MINOLTA C754SeriesPS(P)
# Als ergens hier een Auth-iets staat, die weghalen
DeviceURI smb://ru\sXXXXXX:[email protected]/RU-Print
# DeviceURI-regel specifiek aanpassen voor je s-nummer en wachtwoord
State Idle
StateTime 1474022434
#!/bin/bash
echo "Date,Payee,Category,Memo,Outflow,Inflow"
while IFS='' read -r line; do
line=`echo "$line" | sed -e 's/\r//g'| tr -d \"`
DATE=`echo "$line" | cut -d ';' -f 1 | tr - /`
#DATE=`echo "$line" | cut -d ';' -f 1`
PAYEE="OV-Chipkaart"
#CATEGORY
AMOUNT=`echo "$line" | cut -d ';' -f 6 | tr , .`
@mrngm
mrngm / eduroam.md
Last active February 24, 2016 14:39
network={
        ssid="eduroam"
        scan_ssid=1
        key_mgmt=WPA-EAP
        eap=PEAP
        anonymous_identity="[email protected]"
        identity="[email protected]"
        password="mijn epische wachtwoord"
 ca_cert="/etc/ssl/certs/DigiCert_Assured_ID_Root_CA.pem"
/*
Schrijf een functie vervang2 () die hetzelfde doet als bij onderdeel a.
Maak bij het schrijven van deze functie gebruik van de functies find() en
replace() uit de klasse string.
Prototype:
void vervang2( string& s, char bron, char doel );
*/
#include <iostream>
#include <string>

Keybase proof

I hereby claim:

  • I am mrngm on github.
  • I am mrngm (https://keybase.io/mrngm) on keybase.
  • I have a public key whose fingerprint is 7E10 279C 04BB DBB4 C82E 57A5 298C FCE2 518B FC29

To claim this, I am signing this object:

@mrngm
mrngm / boom.sh
Last active December 31, 2015 08:19
Kerstboomscraper voor http://www.ru.nl/vm/kerstboom/
#!/bin/bash
set +H
GETIT='/usr/bin/wget -qO- http://communicatie.ruhosting.nl/kerstboom/active-entry2.php'
LASTMSG=`$GETIT | recode html..ascii`
while true; do
CMD=`$GETIT | recode html..ascii`
### GIT stuffs
function parse_git_dirty {
### git 1.8
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*"
### git 1.7
# [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
# cat sciencevpn.sh
#!/bin/bash
ARGC=$#
if [[ "$ARGC" -lt "1" ]]; then
echo "Usage: $0 [on|off]"
exit 0;
fi
@mrngm
mrngm / coftainer.py
Created March 23, 2013 20:35
Dirty implementation for coffee container
import tweepy
cons_key=""
cons_sec=""
acc_token=""
acc_sec_t=""
auth = tweepy.OAuthHandler(cons_key, cons_sec)
auth.set_access_token(acc_token, acc_sec_t)