Skip to content

Instantly share code, notes, and snippets.

View spinningD20's full-sized avatar

spinningD20 spinningD20

View GitHub Profile
@shmup
shmup / git_notes.md
Last active December 15, 2015 15:19
delete a remote branch

git push origin :fakebranch

to pull changes from master into my branch (maybe important code changes)

git pull origin

git merge master

push a local branch to a different remote branch

git push remote local_branch:remote_branch

@jbonney
jbonney / spotify_keybindings
Created June 9, 2013 13:22
Spotify - Linux key bindings. From XFCE / Ubuntu keyboard shortcuts configuration, assign the control command to their key. http://shkspr.mobi/blog/2011/12/linux-spotify-keybindings/
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" XF86AudioPlay
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop" XF86AudioStop
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" XF86AudioNext
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" XF86AudioPrevious
@gregkepler
gregkepler / lines.frag
Last active February 24, 2020 04:37
Starter fragment shader for basic repeatable lines
// ShaderToy Inputs
uniform vec3 iResolution; // viewport resolution (in pixels)
uniform float iGlobalTime; // shader playback time (in seconds)
const float PI=3.14159265358979323846;
float round( float x ) {
float val = mod( x, x );
if( val >= 0.5 ){
return ceil( x );
@app.route('/login/<provider_name>', methods=['GET', 'POST'])
@authomatic.login('g')
@requires_ssl
def login(provider_name):
if g.user is not None and g.user.is_authenticated():
return redirect(url_for('index'))
if authomatic.result:
if authomatic.result.error:
return 'Something went wrong: {0}'.format(authomatic.result.error.message)
if authomatic.result.user:
@depau
depau / collide.py
Created January 27, 2015 22:57
Kivy Polygon Intersection
class Polygon(EventDispatcher):
abs_vertices = ListProperty([])
x = NumericProperty(0)
y = NumericProperty(0)
scale = NumericProperty(1)
def __init__(self, **kwargs):
super(Polygon, self).__init__(**kwargs)
self.abs_vertices = []
@ghostbitmeta
ghostbitmeta / therm.py
Last active April 5, 2024 22:16
Python script to control Honeywell Thermostat's through My Total Connect
#!/usr/bin/python
# By Brad Goodman
# http://www.bradgoodman.com/
# brad@bradgoodman.com
####################### Fill in settings below #######################
USERNAME="your@emailaddress.com"
PASSWORD="your_total_comfort_password"
@AndreiRudenko
AndreiRudenko / SpatialHash.hx
Last active May 13, 2019 19:01
SpatialHash uniform-grid implementation
// SpatialHash uniform-grid implementation
// Broad-phase algorithm for collision detection
// Andrei Rudenko // SpatialHash.hx (24.07.2016)
import luxe.Vector;
import luxe.utils.Maths;
class SpatialHash {
public var min(default, null):Vector;
@martijnvermaat
martijnvermaat / nixos.md
Last active July 13, 2024 09:08
Installation of NixOS with encrypted root
from array import array
from kivy.app import App
from kivy.lang import Builder
from kivy.graphics.fbo import Fbo
from kivy.graphics.texture import Texture
from kivy.uix.widget import Widget
from kivy.properties import ListProperty, ObjectProperty
KV = '''