This file contains hidden or 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 | |
iwconfig eth2 2>&1 | grep -q no\ wireless\ extensions\. && { | |
echo wired | |
exit 0 | |
} | |
essid=`nmcli -t -f active,ssid dev wifi | egrep '^yes' | cut -d\' -f2` | |
stngth=`nmcli -t -f active,ssid,signal dev wifi|grep yes|cut -d':' -f3` | |
bars=`expr $stngth / 10` |
This file contains hidden or 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 XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig(additionalKeys) | |
import System.IO | |
main = do | |
xmproc <- spawnPipe "/usr/bin/xmobar /home/pimeys/.xmobarrc" | |
xmonad $ defaultConfig |
This file contains hidden or 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
# encoding: utf-8 | |
require 'json' | |
require 'net/http' | |
def styled_temp(temp) | |
if temp < 15.0 | |
"<fc=#AAC0FF>#{temp}</fc>" | |
elsif temp < 20.0 | |
"<fc=#FFFF00>#{temp}</fc>" |
This file contains hidden or 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 XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig(additionalKeys) | |
import System.IO | |
main = do | |
xmproc <- spawnPipe "/usr/bin/xmobar /home/pimeys/.xmobarrc" | |
xmonad $ defaultConfig |
This file contains hidden or 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
Config { font = "xft:Inconsolata:size=10:antialias=true" | |
, bgColor = "#002B36" | |
, fgColor = "grey" | |
, position = Top | |
, lowerOnStart = True | |
, commands = [ Run Com "/home/pimeys/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /home/pimeys/.bin/weather.rb" [] "weather" 1000 | |
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 | |
, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
, Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10 | |
, Run Com "sh /home/pimeys/.bin/wireless.sh" [] "wifi" 10 |
This file contains hidden or 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 | |
iwconfig eth2 2>&1 | grep -q no\ wireless\ extensions\. && { | |
echo wired | |
exit 0 | |
} | |
essid=`nmcli -t -f active,ssid dev wifi | egrep '^yes' | cut -d\' -f2` | |
stngth=`nmcli -t -f active,ssid,signal dev wifi|grep yes|cut -d':' -f3` | |
bars=`expr $stngth / 10` |
This file contains hidden or 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
# encoding: utf-8 | |
# B: 96% ↑ (0:14) | |
# B: 20% ↓ (0:30) | |
# B: 100% ↔ | |
acpi_output = %x[/usr/bin/acpi].split(' ').map{|i| i.gsub(',', '')} | |
status_symbols = { | |
'Unknown' => '↔', |
This file contains hidden or 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
# encoding: utf-8 | |
require 'json' | |
require 'net/http' | |
def styled_temp(temp) | |
if temp < 15.0 | |
"<fc=#AAC0FF>#{temp}</fc>" | |
elsif temp < 20.0 | |
"<fc=#FFFF00>#{temp}</fc>" |
This file contains hidden or 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
gnome-settings-daemon & | |
xrdb $HOME/.Xresources & | |
xsetroot -solid "#002B36" & | |
setxkbmap -layout fi & | |
xkbset m & | |
xkbset exp "-m" & | |
xmodmap -e "keycode 35 = Pointer_Button2" & | |
$HOME/.dropbox-dist/dropboxd & | |
exec xmonad |
This file contains hidden or 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
it "should output a valid csv with collected invoices included", :js => true do | |
select 'new', :from => 'search_status_eq' | |
click_button 'Apply filter' | |
page.click_link 'Export Invoices' | |
page.text.should eql(<<-CSV) | |
Advertiser;Month;Invoice #;Amount;Difference;Status;Date sent;Collected | |
Name 0;September 2012;INVOICE0;-;-;new;;false | |
CSV | |
end |