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
#!/usr/bin/env python | |
import sys | |
print "".join([chr(int(c,2)) for c in sys.stdin.read().strip().split()]) |
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
RS="\033[0m" # reset | |
HC="\033[1m" # hicolor | |
INV="\033[7m" # inverse background and foreground | |
function git_dirty() { | |
if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then | |
echo -n "\[$INV\]*" | |
else | |
echo -n "\[$HC\]" | |
fi |
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
It threw an exception from hell, | |
You ask me, trace wouldn't tell, | |
I know JS really well, | |
Events are in my way. | |
I trade my sleep for a fix, | |
time and more time trying tricks, | |
I wasn't looking for this, | |
Callbacks are in my way. |
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/sh | |
# | |
# Small script for enabling/disabling the touchpad | |
# reliably even if it is "hotplugged" with every | |
# wakeup from standy. Tested on Lenovo X230 with | |
# Ubuntu 12.04. | |
# | |
# Author: | |
# Stefan Hacker <[email protected]> |
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
#include <iostream> | |
#include <chrono> | |
#include <thread> | |
using namespace std; | |
using namespace chrono; | |
int main() | |
{ | |
cout << "Measurement resolution: " << |
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
Automatic updates and restarts for an rotc server | |
================================================= | |
1) Create an rotc user on your server (home: /home/rotc/) | |
2) Checkout rotc using git to /home/rotc/rotc/ | |
3) Place these two scripts into the /home/rotc/rotc/ folder (and adjust them) | |
4) Adjust runme.sh: | |
* Make the -srv variable point to your server configuration. | |
* If you don't intend to run the script as root remove the sudo's inside. | |
If you run as root make sure the runme.sh script isn't editable by anyone else). |
NewerOlder