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
param ($computerName, $username, $password, $sourceDirectory, $targetDirectory) | |
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force | |
$credentials = New-Object System.Management.Automation.PsCredential($username, $securePassword) | |
Invoke-Command -ComputerName $computerName -Credential $credentials -ScriptBlock { Copy-Item $args[0] $args[1] -recurse } -ArgumentList $sourceDirectory,$targetDirectory |
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
param ($xml, $xsl, $output) | |
if (-not $xml -or -not $xsl -or -not $output) | |
{ | |
Write-Host "& .\xslt.ps1 [-xml] xml-input [-xsl] xsl-input [-output] transform-output" | |
exit; | |
} | |
trap [Exception] | |
{ |
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/bash | |
rm $2 | |
files="${1}" | |
temp_file="tmp_combine" | |
temp_file_2="tmp_combine_2" | |
for file in $files; do | |
echo "${file}" | |
iconv -f "UCS-2LE" -t "UTF-8" "${file}" >> $temp_file | |
echo "" >> $temp_file | |
echo "GO" >> $temp_file |
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
#PostDeploy.ps1 - This script is called by Octopus Deploy and is responsible for setting up | |
# Scheduled Tasks to execute jobs. The task definitions are located in \Tasks folder. | |
# This file should be located in the root of the jobs projects and have Build Action marked to "Content" | |
# and Copy to Output Directory marked "Copy if newer". | |
$exePath = (Get-Item -Path ".\" -Verbose).FullName + "\.JobExecutor.exe" | |
function CreateScheduleXml($sourceXmlPath, $outXmlPath) |
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/bash | |
if [ ! -f /tmp/"$1".mp3 ] | |
then | |
echo "Downloading TTS file from Google Translate..." | |
wget -O /tmp/"$1".mp3 --user-agent="Mozilla/4.0" http://translate.google.com/translate_tts?q="$1" | |
else | |
echo "Skipping download, cached file found." | |
fi |
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
#!/usr/bin/bash | |
# Format: YEAR MONTH DAY | |
DATE=$(date +%Y%m%d) | |
PATH="/home/bholt/surveillance/driveway" | |
TARGET_FILE="$PATH/$DATE" | |
/usr/bin/sudo /usr/bin/systemctl stop motion | |
/usr/bin/sudo /sbin/swapon /dev/sdb2 | |
cd $PATH | |
#create timelapse video |
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
#!/usr/bin/bash | |
DOWNLOAD_DIR=/home/bholt/downloads | |
TARGET_DIR=/home/bholt/tv | |
cd ${DOWNLOAD_DIR} | |
mv So.You.Think* ${TARGET_DIR}/So\ You\ Think\ You\ Can\ Dance | |
mv MythBusters* ${TARGET_DIR}/MythBusters |
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
public class DataContext : DbContext | |
{ | |
public DbSet<Order> Orders { get; set; } | |
public DbSet<OrderDetail> OrderDetails { get; set; } | |
} | |
public class Order | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } |
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/bash | |
FILENAME=$1 | |
cd ~/veritas-podcast | |
#change ownership to bholt | |
sudo chown bholt ./record/${FILENAME}.wav | |
[ $? -eq 0 ] || exit $? |
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
public class Person { | |
public string FirstName {get;set;} | |
public string LastName {get;set;} | |
public Address = new Address(); // << It's important to instantiate Address. | |
} | |
[ComplexType] // << This attribute is important. | |
public class Address { | |
public string Address1 {get;set;} | |
public string Address2 {get;set;} |