Skip to content

Instantly share code, notes, and snippets.

Avatar

Sascha Wessel gr4y

View GitHub Profile
@gr4y
gr4y / style.css
Last active Jun 16, 2017
A User Style for twitter.com to make the profile images and buttons less round
View style.css
.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 Jan 22, 2016
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.
View http_serve_stop.go
package main
import (
"fmt"
"net"
"net/http"
// "os"
)
func main() {
@gr4y
gr4y / wemo.go
Last active Sep 25, 2017
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.
View wemo.go
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 Oct 21, 2015
Go-Utility to discover UPNP Services over SSDP. Uses: http://github.com/huin/goupnp
View ssdp-discovery.go
package main
import (
"fmt"
"github.com/huin/goupnp"
)
func main() {
devices, err := goupnp.DiscoverDevices("upnp:rootdevice")
if err != nil {
View fml-server-latest.log
[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
View create_daily_journal.sh
#!/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"
View deploy.rake
task :deploy do
sh "rsync -rt _site #{USER}@#{SERVER}:~/blog"
end
@gr4y
gr4y / example.md
Last active Feb 11, 2018
Liquid-Tag for embedding Instagram into your Jekyll Posts
View example.md
@gr4y
gr4y / .slate
Created Oct 27, 2013
my configuration file for the slate window manager
View .slate
# 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
@gr4y
gr4y / gist:5517010
Created May 4, 2013
How I setup my ruby environment:
View gist:5517010
#
# This is the way I configured my ruby environment on ArchLinux.
#
# I don't like the overhead of rvm, so I use chruby to switch between ruby versions.
# So first you need to install chruby from source:
#
# https://github.com/postmodern/chruby#install
#
# To build ruby from source I use ruby-build, so after chruby we install ruby-build:
#
You can’t perform that action at this time.