Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View cirrusUK's full-sized avatar
💭
Dunroamin, Duncarin, Dunlivin.

cirrus cirrusUK

💭
Dunroamin, Duncarin, Dunlivin.
View GitHub Profile
@cirrusUK
cirrusUK / ago
Created June 29, 2014 21:07
ago - Show how long ago files/directories were modified
#!/usr/bin/perl -w
#example ./ago /etc/hosts
=head1 NAME
ago - Show how long ago files/directories were modified
=cut
=head1 SYNOPSIS
@cirrusUK
cirrusUK / .login
Last active August 29, 2015 14:05
BSD configs
# $FreeBSD: release/10.0.0/share/skel/dot.login 190477 2009-03-27 21:13:14Z ru $
#
# .login - csh login script, read by login shell, after `.cshrc' at login.
#
# see also csh(1), environ(7).
#
export LC_ALL=en_GB.UTF-8
if ( -x /usr/games/fortune ) /usr/games/fortune freebsd-tips
@cirrusUK
cirrusUK / xcowmpc
Last active August 29, 2015 14:06
MPD Now Playing using xcowsay
while true; do
OSD=$(mpc current)
xcowsay --image=/path/to/image.png "MPD Now Playing" "$OSD"
mpc idle player > /dev/null
done
@cirrusUK
cirrusUK / conkyrc
Last active August 29, 2015 14:07
dzen panel piping to conkyrc
background no
out_to_console yes
out_to_x no
use_xft yes
update_interval 1.0
total_run_times 0
use_spacer none
default_color 497BF7
override_utf8_locale yes
# Copyright 2012 Cirrus Minor. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
@cirrusUK
cirrusUK / get_iplayer.txt
Created October 20, 2014 17:59
get_iplayer.txt
./iplayer --update
./iplayer --refresh --type=all
./iplayer --refresh-exclude="cbeebies,cbbc" --type=tv --refresh
./iplayer football
./iplayer Match of the Day
./iplayer Late Kick Off London and the South East
./iplayer Question Time
./iplayer sportscene
./iplayer motd
./iplayer motd2
cirrus@hawker64  ~  journalctl -b | grep microcode
Oct 23 14:15:05 hawker64 kernel: CPU0 microcode updated early to revision 0x19, date = 2013-06-21
Oct 23 14:15:05 hawker64 kernel: CPU1 microcode updated early to revision 0x19, date = 2013-06-21
Oct 23 14:15:05 hawker64 kernel: CPU2 microcode updated early to revision 0x19, date = 2013-06-21
Oct 23 14:15:05 hawker64 kernel: CPU3 microcode updated early to revision 0x19, date = 2013-06-21
Oct 23 14:15:05 hawker64 kernel: microcode: CPU0 sig=0x106a5, pf=0x2, revision=0x19
Oct 23 14:15:05 hawker64 kernel: microcode: CPU1 sig=0x106a5, pf=0x2, revision=0x19
Oct 23 14:15:05 hawker64 kernel: microcode: CPU2 sig=0x106a5, pf=0x2, revision=0x19
Oct 23 14:15:05 hawker64 kernel: microcode: CPU3 sig=0x106a5, pf=0x2, revision=0x19
Oct 23 14:15:05 hawker64 kernel: microcode: CPU4 sig=0x106a5, pf=0x2, revision=0x19
#!/bin/sh
URL="http://feeds.bbci.co.uk/news/uk/rss.xml"
curl --silent "$URL" | grep -E '(title>|description>)' | \
grep -E '(<title>|description)' | tail -n +4 | sed -e 's/<!\[CDATA\[//g' -e 's/\]\]>//g' | sed -e 's/<a.*a>/ /g' | sed -e 's/<*.title>//g' -e 's/&lt;.*/\
/' | sed -e 's/<*.title>//g' -e 's/&lt;.*/\
/' | sed -e '/<description>/d' | sed -e 's/<\/description>/\
/g
' | fmt -w 80
@cirrusUK
cirrusUK / notify.py
Created October 29, 2014 11:56
notify for dunst i3blocks
#! /usr/bin/env python3
'''
This program is designed to work in tandem with dunst and i3blocks to extend
the functionality of the existing i3blocks notification blocklet and allow
multiple notifications of different priority levels to stack and be displayed.
Copyright (C) 2014 Tomasz Kramkowski
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
APPNAME="notify-send"
SUMMARY="fedorausers"
BODY="#linux #fedora Re: Font issues in F21 http://t.co/ILRkmD1QHA"
ICON="info"
URGENCY="NORMAL"
##changes as notifiactions change, i use this file to grep and pipe notifications to conky/dzen in openbox