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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' |
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/sh | |
exec >/home/dreamer/udev.out 2>&1 | |
# wait for the dock state to change | |
sleep 0.5 | |
DOCKED=$(cat /sys/devices/platform/dock.2/docked) | |
export XAUTHORITY=/home/dreamer/.Xauthority | |
export DISPLAY=:0 | |
case "$DOCKED" in | |
"0") | |
#undocked event - lets remove all connected outputs apart from LVDS |
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
KERNEL=="dock.2", ACTION=="change", RUN+="/usr/local/sbin/thinkpad-dock.sh" |
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
import time | |
import willie | |
import re | |
from willie.module import commands, interval | |
INTERVAL = 5 | |
SPACESTATE = "unknown" | |
CHANNEL = "#lag" | |
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
if ((mpdcommand == 'playing') or (mpdcommand == 'state')) : | |
currentsong = client.currentsong() | |
currentstatus = client.status() | |
if 'artist' in currentsong and 'title' in currentsong: | |
nowplaying = currentsong['artist'] + ' - ' + currentsong['title'] | |
elif 'artist' in currentsong: | |
nowplaying = currentsong['artist'] | |
elif 'title' in currentsong: | |
nowplaying = currentsong['title'] |
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
#include <LiquidCrystal.h> | |
#include <Firmata.h> | |
byte pin; | |
int analogValue; | |
int previousAnalogValues[TOTAL_ANALOG_PINS]; | |
byte portStatus[TOTAL_PORTS]; // each bit: 1=pin is digital input, 0=other/ignore |
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
<?php | |
$thekey = "PASSWORDGOESHERE"; | |
function displaystate(){ | |
$file = "spaceapi.json"; | |
$json = json_decode(file_get_contents($file), true); | |
$nowstate = $json['state']['open']; | |
echo "<div align=center style='color:#BDBDBD'>"; |
NewerOlder