I hereby claim:
- I am nearlyunique on github.
- I am adam_straughan (https://keybase.io/adam_straughan) on keybase.
- I have a public key ASBygT5WYpAMo80InUjs77Z0Ln6i9craODoU2JBbKo1TQAo
To claim this, I am signing this object:
package main | |
import ( | |
"io" | |
"reflect" | |
"runtime" | |
"testing" | |
) | |
func main() { |
I hereby claim:
To claim this, I am signing this object:
using System; | |
using System.Collections; | |
using System.Reflection; | |
namespace play { | |
public class Program { | |
public static void Main() { | |
TestRunner.Run(new Program()); | |
Console.Read(); | |
} |
using System; | |
using System.Reflection; | |
namespace testing { | |
public static class TestRunner{ | |
public static void Run(object target){ | |
var mi = target.GetType().GetMethods(BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.Instance|BindingFlags.DeclaredOnly); | |
int passed=0,failed=0; | |
foreach(var m in mi){ | |
var argCount = m.GetParameters().Length; |
@rem List aws instaces in all regions | |
@echo off | |
for /F "tokens=*" %%a in ('aws ec2 describe-regions --profile=%1^|jq .Regions[].RegionName -r') do ( | |
echo # Region:%%a | |
aws ec2 describe-instances --region=%%a --profile=%1 | jq ".Reservations[].Instances[]|.InstanceId+\" \"+.State.Name" -r | |
) |
param ( | |
[switch]$vs | |
) | |
$path = "$env:UserProfile\Documents\IISExpress\config\applicationhost.config" | |
if ($vs) { | |
if (!(test-path .vs)) { | |
"Not in solution directory! no '.vs' directory" | |
exit(1) | |
} |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace namespace NearlyUnique.Config | |
{ | |
/// <summary> | |
/// A wrapper for multiple configuration sources |
md "%APPDATA%\Sublime Text 2\Packages\Log" | |
pushd "%APPDATA%\Sublime Text 2\Packages\Log" | |
copy con LogSyntax.json | |
// [PackageDev] target_format: plist, ext: tmLanguage | |
{ | |
"name": "Log File", | |
"scopeName": "logfile", | |
"fileTypes": ["log"], | |
"uuid": "58e4042d-72b2-4281-92f7-7bb0c38dba44", |
/*global console*/ | |
function find(target, searchFor, path) { | |
"use strict"; | |
try { | |
path = path || ""; | |
var i, attr, attrs = Object.keys(target); | |
searchFor = searchFor.toLowerCase(); | |
for (i = 0; i < attrs.length; i += 1) { | |
attr = attrs[i]; | |
if (attr.toLowerCase().indexOf(searchFor) >= 0) { |
var queryDate = function (diff) { | |
var d = new Date(), p = function(num){return num<10?"0"+num:num+"";}; | |
diff = diff || {}; | |
d.setUTCFullYear(d.getUTCFullYear() + (diff.year||0)); | |
d.setUTCMonth(d.getUTCMonth() + (diff.month||0)); | |
d.setUTCDate(d.getUTCDate() + (diff.day||0)); | |
d.setUTCHours(d.getUTCHours() + (diff.hour||0)); | |
d.setUTCMinutes(d.getUTCMinutes() + (diff.min||0)); | |
return ISODate(d.getUTCFullYear() + "-" + | |
p(d.getUTCMonth()+1) + "-" + |