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 ConvertTo-Hashtable | |
{ | |
<# | |
.Synopsis | |
Converts a PSCustomObject that may be returned over WinRM to a | |
standard Hashtable | |
.Description | |
.Parameter PSObject | |
.Example | |
#> |
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
# TODO: replace this hard-coded path with the path on disk where dngs are stored for current trip | |
$tripLocalPath = 'C:\Users\Ethan\Pictures\Curacao 2013' | |
$tripLocalFilter = '*.dng' | |
$memoryCardPath = 'd:\\' | |
$memoryCardFilter = '*.orf' | |
$names = dir $tripLocalPath -Recurse -Include $tripLocalFilter | | |
Select -ExpandProperty BaseName | | |
Sort-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
print(view.syntax_name(view.sel()[0].begin())) |
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
defmodule FizzBuzz do | |
def sequence([]), do: [] | |
def sequence(until) when is_integer(until) and until > 0 do | |
sequence(0..until |> Enum.to_list) | |
end | |
def sequence([head|tail]) do | |
output(rem(head, 3), rem(head, 5), head) | |
sequence(tail) | |
end |
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
if [[ ! -d './.git' ]]; then | |
git init | |
fi | |
owner=$(echo $JANKY_COMMIT_URL | sed -rn 's/^http(s)?\:\/\/github\.com\/(.*?)\/(.*?)\/?/\2/p') | |
repo=$(echo $JANKY_COMMIT_URL | sed -rn 's/^http(s)?\:\/\/github\.com\/(.*?)\/(.*?)\/?/\3/p') | |
url="https://[email protected]/$owner/$repo" | |
found=$(git remote | grep $owner) |
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
## rewrite the tree to add a prefix and trash some unnecessary files | |
git filter-branch --index-filter 'rm -f "$GIT_INDEX_FILE" && git read-tree --prefix=acceptance/ "$GIT_COMMIT" && git rm acceptance/.gitignore acceptance/Gemfile --ignore-unmatch' HEAD |
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
D:\Users\Parity\Documents\source\00 - Puppet\puppet [21133]> bundle install --path .bundle/gems | |
Fetching gem metadata from https://rubygems.org/...... | |
Fetching gem metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Installing rake (10.1.0) | |
Installing activesupport (3.0.20) | |
Installing builder (2.1.2) | |
Installing i18n (0.5.0) | |
Installing activemodel (3.0.20) | |
Installing arel (2.0.10) |
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
Show hidden characters
{ | |
"auto_complete_commit_on_tab": true, | |
"caret_style": "phase", | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/Solarized Color Scheme/Solarized (dark).tmTheme", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Source Code Pro Semibold", | |
"font_size": 15.0, | |
"highlight_line": true, |
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
Looks like I originally wrote this hunk of junk 10+ years ago. Brings back some, ahem, fond .. memories. | |
Expects psexec.exe and reg.exe in the local directory |
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 ConvertFrom-JsonString | |
{ | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true, ValueFromPipeline=$true)] | |
[string] | |
$Json | |
) | |
Add-Type -AssemblyName System.Web.Extensions |