Skip to content

Instantly share code, notes, and snippets.

View fractalbach's full-sized avatar
💭
🎈

Chris Achenbach fractalbach

💭
🎈
View GitHub Profile
@fractalbach
fractalbach / exampleServer.go
Last active August 3, 2018 23:21
example go server where paths that have no extensions are directed to "/index.html"
package main
import (
"os"
"flag"
"fmt"
"log"
"net/http"
"path"
)
@fractalbach
fractalbach / drag-and-drop.sh
Created November 8, 2017 21:16
Custom Keyboard shortcut shell script, drag and drop mouse clicking with a keyboard key!
#!/bin/bash
# xinput --list to identify the different input devices availiable to you.
# xinput query-state [device] where the device is a keyboard. Returns all the keys' states.
# xdotool mousedown 1 automates holding down the left mouse click.
# xdotool mouseup 1 automates releasing the left mouse click.
# This program begins by checking if the keyboard button is pressed at the time of its execution.
# If the keyboard button is in the DOWN position, then "press down" the mouse left click.
# wait for a bit (but not too long!), and then check the keyboard position again.