Skip to content

Instantly share code, notes, and snippets.

@rickmer
rickmer / naturalScrollinOn.sh
Last active March 24, 2017 08:03
natural scrolling
#!/bin/bash
device=`xinput list | grep Synaptics | grep -o -E id=[0-9]{2} | grep -o -E [0-9]{2}`;
prop=`xinput list-props $device | grep "Natural Scrolling Enabled (" | grep -o -E [0-9]{3}`
xinput --set-prop $device $prop 1
### Keybase proof
I hereby claim:
* I am rickmer on github.
* I am rickmer (https://keybase.io/rickmer) on keybase.
* I have a public key whose fingerprint is BE2D 8487 0658 F4CC E9FB E742 6847 E7E2 B407 AAE6
To claim this, I am signing this object:
@rickmer
rickmer / congstar.sh
Created December 6, 2013 16:45
a shell script that returns information on data plan usage for german telekom reseller congstar.
#!/bin/bash
HTML=`curl -s -A "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5" http://pass.telekom.de`
PERCENT=`echo $HTML|sed -l 's/</\\
</g'|grep "style=\"width:"|sed 's/[^0-9]//g'`
VOLUME=`echo $HTML|sed -l 's/</\\
</g'|grep "<span class=\"colored\">" | sed 's/[^0-9\.]//g'`
COMPLETE=`echo $HTML|sed -l 's/</\\
</g'|grep "MB verbraucht" | sed 's/[^0-9\.]//g'`
HOUR=`echo $HTML|sed -l 's/</\\
</g'|grep -B 1 "Std." |tr '\n' ' '| sed 's/[^0-9\]//g'`