Filed under: Uncategorized
from AccessControl.SecurityManagement import newSecurityManager
user = app.sitename.acl_users.getUser(‘username’).__of__(app.sitename.acl_users)
newSecurityManager(None, user)
Filed under: Uncategorized
ffmpeg -aspect 16:9 -i kyp2.wav -itsoffset -0.2 -i kyp3.m2v -croptop 48 -cropbottom 48 -target dvd kyp7.mpg
Filed under: Uncategorized
I religiously update my gentoo every morning and I’ve only recently started using layman for the xeffects overlay for compiz-fusion. I had been running layman -S to sync the overlay ebuilds but I was concerned that I hadn’t emerged anything from the overlay since the initial installation. Spurred on by the beautiful demos on http://fusioncast.blogspot.com I decided to look into it.
It turns out that “live” ebuilds are always given the version 9999 so when I do emerge –update –deep world it doesn’t notice a version change and doesn’t do anything.
There’s a nice tool called eix that helps out here. Once installed and after running update-eix I ran the following to re-emerge all the live ebuilds in the xeffects overlay.
emerge -av `eix -Jc –in-overlay “/usr/portage/local/layman/xeffects” | grep 9999 | cut -d” ” -f2 | tr “\n” ” “`
I was informed on #gentoo-uk that with the new palaudis system this will be taken care of.
Filed under: Uncategorized
To get all the keys and €s and öōé etc. like in http://wiki.linuxquestions.org/wiki/Accented_Characters
setxkbmap -layout gb -option lv3:ralt_switch
is equivalent to the following in xorg.conf
Option “XkbLayout” “gb”
Option “XkbOptions” “lv3:ralt_switch”
You can select variants from
/usr/share/X11/xkb/symbols/gb
Filed under: Uncategorized
I don’t know why it has taken me this long to have a look at bash. It’s great! I wrote a little script today to list the versions of various Plone packages in a release and I needed somewhere to put it:
#!/bin/bash
# spits out the details from version.txt from a toplevel directory
if [ $# -eq 0 -o $# -gt 2 ]
then
echo “Usage: $0 Directory [filename]“
echo “The directory passed to this script is where it looks for version.txt files.”
echo “The filename is for writing the results to, if it already exists then the script complains.”
echo “If no filename is provided the script writes the results to ‘the Directory name + .txt’”
fiTLD=$1
# Try to change to the directory or give up
cd $TLD || exitecho entered `pwd`
#Find all the version.txt files under the directory
VERS=$(find ./ -iname “version.txt” | sort)#Get the version
for file in $VERS
do
RESULT+=”$file `cat $file`\n”
donecd ../
#If a filename has been specified use it, otherwise call it something sensible
if [ $# -eq 2 ]
then
OUTPUT=$2
else
OUTPUT=”$1-product-versions.txt”
fi#It the file already exists don’t overwrite anything, just print out the details
if [ -f $OUTPUT ]
then
echo -e “$OUTPUT already exists, no output has been saved:\n”
echo -e $RESULT
else
echo -e $RESULT >> $OUTPUT
echo -e “Output written to $OUTPUT”
fiexit 0
Filed under: design
Having wasted about 2 hours trying to hunt down some elusive filtrate for a water filter I feel I should at least have a rant about it. I’ve got a refillable water cartridge for a jug. I used to be able to buy little bags of the filtrate for a not unreasonable £2.50 in a shop in town but then the shop closed and to my great disappointment I cannot find the stuff online. I lie, I can find an equivalent but of course it costs £4 a pop so I’d be paying for the privilege.
I was so happy a couple of weeks ago that I could replace my cafetiere jug with another one off the shelf in the super market. Standardisation is a beautiful thing that has yet to reach the world of water filtration jugs. London tap-water is neither tasty nor particularly clear and I don’t fancy lugging around bottles of water. I’ll buy the cheaper disposable cartridges begrudgingly until something better comes along … grumble grumble
Táim i gcónaí ag lorg an seinnteoir ceoil is deise. Cé go dtaithníonn songbird go mór liom chuala mé go raibh an rhythmbox is déanaí go maith agus go raibh plugin nua suimiul. Bhfeul is fíor sin. Tá se go maith agus is slí íontach é chun ceoil nua a fháil trí jamendo, magnatune agus last.fm. Níor chuala mé faoi jamendo riamh agus tá mé thar bheith tógtha leis anois. Is slí é chun ceol a scaipeadh le ceadúnas Creative Commons agus chun airgead a bhailiú le haghaidh na ceoiltóirí chomh maith.
Filed under: culture, design, free software, gaeilge, linux, music, open source, user interface
reactable
Bunaithe ar sintéiseoir modúlach ach le comhéadan tadhlach (tactile?) agus físeach tá an uirlis ceoil seo thar a bheith siumiul agus go h’álainn le feiceáil. Ní mór duit breathnú ar na físeanna teaspántas a bhfuil ar an suiomh. Táim brea sásta go bhfuil an bogearraí faoí ceadúnas foinse oscailte chomh maith! De réir na físeanna ní doigh liom go bhfuil siad in ann é a seinim i gceart go fóill áfach, cé go bhfuil an comhéadan thar a bheith iomasach. Ba chóir dóibh é a thabhairt go duine 10 mbliana d’aois ar fag cúpla uaire dár liom
Filed under: linux
This time from the cinelerra-cv mailing list as a suggestion for helping to work through the cinelerra-cv code to check the licences of all the bits
for f in `find . -type f`; do echo “$f”; less $f; read flag; if [ !"$flag" = "y" ]; then echo “$f” >> flagged.list; fi; done
so this loops through each file and lets you take a note of each one that you want to look at later.
Someone asked on the gllug mailing list today how to attach a command on to the end of a running command
e.g. you want to do
emerge –sync && emerge –update world
and you start the sync and don’t want to wait, hit ctrl+z to stop it and then
fg && emerge –update world
I’ve had a look into this before but didn’t find any nice solution. Full respect to salsaman (creator of LiVES, a video editing system) for such an elegant answer.
The actual example included the || switch as well so you can run something else if it fails.