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
#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 | |
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
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
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 ([Parameter(Mandatory=$True)] $clean_path, [Parameter(Mandatory=$True)] $search_pattern, [Parameter(Mandatory=$True)] $max_days) | |
# get the current date | |
$curr_date = Get-Date | |
# determine how far back we go based on current date | |
$del_date = $curr_date.AddDays(-($max_days)) | |
Get-ChildItem $clean_path | Where {$_.Attributes -eq 'Directory'} | ` | |
Foreach-Object{ |
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, $targetFile) | |
trap | |
{ | |
write-output $_ | |
exit 1 | |
} | |
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force | |
$credentials = New-Object System.Management.Automation.PsCredential($username, $securePassword) |
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, $targetFile, $ruleName, $enabled) | |
trap | |
{ | |
write-output $_ | |
exit 1 | |
} | |
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force | |
$credentials = New-Object System.Management.Automation.PsCredential($username, $securePassword) |
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
function New-Migration { | |
param ( | |
[string]$name | |
) | |
$project = Get-Project | |
$projectDirectory = Split-Path $project.FullName | |
$scriptDirectory = $projectDirectory + "\Migrate" | |
$fileNameBase = (Get-Date -UFormat "%y%m%d%H%M%S") | |
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
var http = require('http') | |
var port = process.env.PORT || 1337; | |
var fs = require('fs'); | |
var url = require('url'); | |
var pathColor = '0x0000ff'; | |
var pathWeight = '5'; | |
var mapSize = '640x400'; | |
var houstonCoordinates = '29.73820459,-95.4696264'; | |
var sanDiegoCoordinates = '32.7153292, -117.1572551'; |