Skip to content

Instantly share code, notes, and snippets.

View gr4y's full-sized avatar

Sascha Wessel gr4y

View GitHub Profile
@gr4y
gr4y / kasa-dashboard.json
Created June 21, 2021 19:46
TP-Link Kasa Grafana Dashboard
// TP-Link Kasa Dashboard
// based on https://grafana.com/grafana/dashboards/10957, but slightly modified
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
@gr4y
gr4y / style.css
Last active June 16, 2017 17:48
A User Style for twitter.com to make the profile images and buttons less round
.Avatar, .avatar,
.DashboardProfileCard-avatarImage,
.DashboardProfileCard-avatarLink,
.MomentUserByline-avatar,
.ProfileAvatar,
.ProfileAvatar-image,
.ProfileAvatar-placeholderImage,
.ProfileAvatarEditing,
.ProfileAvatarEditing-button,
.ProfileAvatarEditing-overlay,
@gr4y
gr4y / http_serve_stop.go
Created January 22, 2016 10:51
Stopping an http.Server via channel. I want to use this for OAuth2 in an command line application, I don't want to be an web application.
package main
import (
"fmt"
"net"
"net/http"
// "os"
)
func main() {
@gr4y
gr4y / wemo.go
Last active September 25, 2017 17:58
Toggle all WeMo switches. If it is on, it will turn off. If it is off, it will turn on. Just a quick little thing.
package main
import (
"fmt"
"github.com/huin/goupnp"
"github.com/huin/goupnp/soap"
)
func main() {
devices, err := goupnp.DiscoverDevices("urn:Belkin:device:controllee")
@gr4y
gr4y / ssdp-discovery.go
Last active October 21, 2015 16:30
Go-Utility to discover UPNP Services over SSDP. Uses: http://github.com/huin/goupnp
package main
import (
"fmt"
"github.com/huin/goupnp"
)
func main() {
devices, err := goupnp.DiscoverDevices("upnp:rootdevice")
if err != nil {
[11:02:52] [main/DEBUG] [FML/]: Injecting tracing printstreams for STDOUT/STDERR.
[11:02:52] [main/INFO] [FML/]: Forge Mod Loader version 8.99.114.1446 for Minecraft 1.8 loading
[11:02:52] [main/INFO] [FML/]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_45, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jdk1.8.0_45\jre
[11:02:52] [main/DEBUG] [FML/]: Java classpath at launch is C:\Program Files\Java\jdk1.8.0_45\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_45\jre\lib\rt.jar;C:\Program Files\Java\jdk
#!/bin/bash
DATE=`date "+%d.%m.%Y"`
DIR="$HOME/Dropbox/Documents/Journal"
FILE="$DATE.md"
# Change to Directory
cd $DIR
if [ ! -f $FILE ]; then
echo "# $DATE\r\n" > "$DATE.md"
task :deploy do
sh "rsync -rt _site #{USER}@#{SERVER}:~/blog"
end
@gr4y
gr4y / example.md
Last active February 11, 2018 10:46
Liquid-Tag for embedding Instagram into your Jekyll Posts
@gr4y
gr4y / .slate
Created October 27, 2013 15:29
my configuration file for the slate window manager
# Parts of this config is borrowed from
# https://gist.github.com/lmullen/4736568
# GLOBAL CONFIGURATIONS
# -------------------------------------------------------------------
# See https://github.com/jigish/slate/wiki/Global-Configs
config defaultToCurrentScreen true
config secondsBeforeRepeat 0.4
config secondsBetweenRepeat 0.1