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 Touch-File | |
{ | |
$file = $args[0] | |
if($file -eq $null) { | |
throw "No filename supplied" | |
} | |
if(Test-Path $file) | |
{ | |
(Get-ChildItem $file).LastWriteTime = Get-Date | |
} |
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
{ | |
"black": "#000000", | |
"dark_blue": "#2A4475", | |
"dark_green": "#E6C000", | |
"dark_cyan": "#50c0c0", | |
"dark_red": "#800000", | |
"dark_magenta": "#800080", | |
"dark_yellow": "#808000", | |
"gray": "#F8F8F2", | |
"dark_gray": "#aaaaaa", |
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
# Quick 'n' dirty script to export snippets from GitLab to local files. Useful if you're | |
# migrating to GitHub or just want to back up your snippets as files. Doesn't catch errors | |
# or anything like that, but what were you expecting for a Gist? :-) Also, this will only | |
# export snippets that are visible to you, so other users' private snippets are excluded. | |
# Tested with GitLab v8.5.1 | |
$username = "username" # Your username goes here | |
$password = "password" # Your password goes here | |
$baseURL = "https://your.gitlab.base.url" # Your GitLab base URL goes here |
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
_.mixin({ | |
// Case-insensitive pick that returns an object with keys in the original case | |
picki : function(obj, keys) { | |
var copy = {}; | |
var objKeyList = _.keys(obj); | |
_.each(keys, function(key) { | |
_.each(objKeyList, function(o){ | |
if (key.toString().toLowerCase() === o.toString().toLowerCase()) { | |
// o is from the list of keys extracted from the object, so |