This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sink_name="bluez_sink.00_42_1B_AD_FA_CE" | |
if [ -z "$1" ]; then | |
dbus-monitor --system "path=/org/bluez/777/hci0/dev_00_42_1B_AD_FA_CE, interface=org.bluez.AudioSink, member=Connected" | while read line; do | |
echo $line | |
$0 1 | |
done | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bind this to a hotkey in your window manager. This will allow you to select | |
# a rectangle on your screen to store as a PNG file and then puts the path to | |
# that PNG file into your clipboard. It assumes you want to store the file in | |
# ~/Pictures/Screenshots, but you can change that yourself in the FILENAME var. | |
# Requires: | |
# - imagemagick (provides /usr/bin/import) | |
# - xclip (provides /usr/bin/xclip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"sync" | |
"time" | |
"github.com/satori/go.uuid" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
// An Adder adds two ints and returns an int | |
type Adder func(a int, b int) int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@localhost:~# git clone https://go.googlesource.com/go go1.4 | |
Cloning into 'go1.4'... | |
remote: Sending approximately 105.10 MiB ... | |
remote: Counting objects: 10095, done | |
remote: Finding sources: 100% (789/789) | |
remote: Total 254455 (delta 204262), reused 254270 (delta 204262) | |
Receiving objects: 100% (254455/254455), 100.71 MiB | 6.12 MiB/s, done. | |
Resolving deltas: 100% (204262/204262), done. | |
Checking connectivity... done. | |
Checking out files: 100% (5464/5464), done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hammerfall RPG Helper | |
// @namespace http://hammerfallhelper.dustywilson.com | |
// @include http://apps.facebook.com/hammerfall/* | |
// ==/UserScript== | |
// THIS CODE IS LICENSED GPL. Copyright 2009 Dusty Wilson, http://www.dustywilson.com/ | |
try | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TOUCHPADDEVICE=$(($(xinput list | grep -i touchpad | cut -d= -f2 | cut -d[ -f1)+0)) | |
TOUCHPADON=$(($(xinput list-props $TOUCHPADDEVICE | grep -i enable | cut -d: -f2)+0)) | |
if [ $TOUCHPADON -eq 1 ]; then | |
xinput disable $TOUCHPADDEVICE | |
else | |
xinput enable $TOUCHPADDEVICE | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
bob := NewHuman("Bob") | |
jim := NewHuman("Jim") | |
joe := NewHuman("Joe") | |
bob.Greet(jim) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to make the LED attributes writable by all users (for example, if writing to them via LXC container non-root users) | |
chmod 666 /sys/class/leds/omnia-led\:*/{autonomous,brightness,color} | |
# to make the LEDs controlled via attributes directly: | |
echo 0 > /sys/class/leds/omnia-led\:user1/autonomous | |
# replace "user1" with whatever specific LED you're wanting to control | |
# to set the color: (it's RGB in decimal, not hex) | |
echo "0 255 0" > /sys/class/leds/omnia-led\:user1/color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dwps_start_fg=0 | |
dwps_start_bg=0 | |
dwps_user_fg=82 | |
dwps_user_bg=235 | |
dwps_usersep_fg=2 | |
dwps_usersep_bg=${dwps_user_bg} | |
dwps_dir_fg=190 | |
dwps_dir_bg=19 | |
dwps_dirsep_fg=99 | |
dwps_dirsep_fg=9 |
OlderNewer