Skip to content

Instantly share code, notes, and snippets.

View mschewe's full-sized avatar

Mark Schewe mschewe

  • snabble.io
  • Bonn, Germany
  • 05:20 (UTC +01:00)
View GitHub Profile
@mschewe
mschewe / springer-free-maths-books.md
Created December 29, 2015 12:24 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@mschewe
mschewe / app.js
Created May 18, 2015 22:20
Sample application of gorilla/websocket and labstack/echo
$(function(){
connect = function() {
ws = new WebSocket("ws://" + window.location.host + "/ws");
ws.onopen = function(e) {
console.log("onopen", arguments);
};
ws.onclose = function(e) {
@mschewe
mschewe / brightness.sh
Last active December 12, 2015 06:39
Helper script to set the screen brightness on a Lenovo T530
#!/bin/bash
BRIGHTNESS=/sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness
CURRENT_VALUE=$(cat $BRIGHTNESS)
value=$(echo $1 | grep -E -o '[[:digit:]]+')
if [[ $# -ne 1 ]]
then
echo "$0 +VALUE | -VALUE | VALUE"