Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
FILES="*.avi"
mkdir mp3
for i in $FILES; do
ffmpeg -i "$i" -ab 320k "mp3/${i%%.avi}.mp3"
#mplayer -dumpaudio "$i" -dumpfile "mp3/${i%%.avi}.mp3"
done
for i in range(1, 101):
print("")
if i % 3 == 0:
print ("fizz",end='')
if i % 5 == 0:
print ("buzz",end='')
if (i%3 != 0 and i%5 != 0 ):
print (i,end='')
:: USES UNICA from http://www.gourami.eu/products/unica
:: and filever from the supportkit
@echo off
::
set version=
if not exist "C:\Program Files\Citrix\ICA Client\pnagent.exe" goto install
:checkversion
for /f "Tokens=5" %%a in ('\\dc01-nacifs-01\cifs\XenAppClient11.2\filever.exe "C:\Program Files\Citrix\ICA Client\pnagent.exe"') do set version=%%a
::echo %version%
if %version% == 11.2.0.31560 goto :end
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\PNAgent]
"ServerURL"="http://SERVERNAME/Citrix/PNAgent/config.xml"
"EnablePassThrough"=dword:00000001
(add-to-list 'load-path
"~/.emacs.d/yasnippet")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "~/.emacs.d/yasnippet/snippets")
(defun color-theme-blackboard ()
"Color theme by JD Huntington, based off the TextMate Blackboard theme, created 2008-11-27"
(interactive)
(color-theme-install
param(
[string]$type=$(Throw "Parameter Missing: -type ?barebone/webserver/database?"),
[string]$machinename=$(Throw "Parameter missing: -machinename <MACHINENAME>"),
[string]$size=$(Throw "Parameter missing: -size ?small/medium/large?"),
[string]$vlan=$(Throw "Parameter missing: -vlan ?TRAF-TRU/TRAF-TEST/TRAF-DMZ?"),
[string]$creator=$(Throw "Parameter missing: -creator <CREATOR>")
)
#set numCPU and memory according to size
Switch ($size)
@thattommyhall
thattommyhall / DeployServer.ps1
Created October 6, 2010 15:20
Citrix script
param(
[string]$type=$(Throw "Parameter Missing: -type ?barebone/webserver/database?"),
[string]$machinename=$(Throw "Parameter missing: -machinename <MACHINENAME>"),
[string]$size=$(Throw "Parameter missing: -size ?small/medium/large?"),
[string]$vlan=$(Throw "Parameter missing: -vlan ?TRAF-TRU/TRAF-TEST/TRAF-DMZ?"),
[string]$creator=$(Throw "Parameter missing: -creator <CREATOR>"),
[string]$ipaddress=$(Throw "Parameter missing: -ip <IPADDRESS>")
)
$vms = Get-VM
#sort out GPG shiz (I did it for the cloudera stuff too)
gpg --keyserver pgp.mit.edu --recv-key E2A11821
gpg -a --export E2A11821 | sudo apt-key add -
#add to /etc/sources.list.d/
#R.list
deb http://rh-mirror.linux.iastate.edu/CRAN/bin/linux/ubuntu hardy/
apt-get install r-base r-base-dev pkg-config littler
@thattommyhall
thattommyhall / gist:706994
Created November 19, 2010 19:24
FULL OF WIN
> map <- expression({
+ lapply(seq_along(map.values),function(r){
+ x <- runif(map.values[[r]])
+ rhcollect(map.keys[[r]],c(n=map.values[[r]],mean=mean(x),sd=sd(x)))
+ })
+ })
>
> z <- rhmr(map, ofolder="/tmp/test", inout=c('lapply','sequence'),
+ N=10,mapred=list(mapred.reduce.tasks=0),jobname='test')
Error: could not find function "rhmr"
@thattommyhall
thattommyhall / filter_standard_in.rb
Created February 2, 2011 16:00
Not bothering to learn Sed and Awk
#!/usr/bin/env ruby
ARGF.each_with_index do |line, i|
puts line if line =~ /AirPort/ and i % 5 == 0
end