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/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 |
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
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='') |
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
:: 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 |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\PNAgent] | |
"ServerURL"="http://SERVERNAME/Citrix/PNAgent/config.xml" | |
"EnablePassThrough"=dword:00000001 |
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
(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 |
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
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) |
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
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 |
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
#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 |
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
> 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" |
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
#!/usr/bin/env ruby | |
ARGF.each_with_index do |line, i| | |
puts line if line =~ /AirPort/ and i % 5 == 0 | |
end |
OlderNewer