This file contains 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
<?xml version="1.0" encoding="utf-8" ?> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<targets> | |
<target xsi:type="Debugger" name="debugger_target" /> | |
<target xsi:type="Chainsaw" name="chainsaw_target" address="udp4://localhost:4141"/> | |
<!-- | |
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log" | |
layout="${longdate} ${uppercase:${level}} ${message}" /> |
This file contains 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 tags = new []{"adsf", "qwer", "zxcv", "uipo", "nm.,"}; | |
var tagLookup = new Dictionary<string, int>(); | |
var random = new Random(); | |
foreach (var i in Enumerable.Range(1,35000)) | |
{ | |
// var guid = Guid.NewGuid().ToString(); | |
// tagLookup.Add(guid.Substring(guid.IndexOf('-'), 14).Replace('-','\0').ToLower(), i); | |
var key = new string(Enumerable.Repeat("abcdefghijklmnopqrstuvwxyz", 8).Select(s => s[random.Next(s.Length)]).ToArray()); |
This file contains 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
void Main() | |
{ | |
// Write code to test your extensions here. Press F5 to compile and run. | |
} | |
public static class MyExtensions | |
{ | |
// Write custom extension methods here. They will be available to all queries. | |
public static double Std(this IEnumerable<double> src) | |
{ |
This file contains 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
// ==UserScript== | |
// @name StackTrello | |
// @author Benjamin Collins <ben.collins@acm.org> | |
// @namespace https://gist.github.com/aggieben | |
// @downloadURL https://gist.github.com/5811685/raw/stacktrello.user.js | |
// @updateURL https://gist.github.com/5811685/raw/stacktrello.user.js | |
// @version 0.0.4 | |
// @downloadURL ttps://gist.github.com/aggieben/5811685/raw/stacktrello.user.js | |
// @updateURL ttps://gist.github.com/aggieben/5811685/raw/stacktrello.user.js | |
// @description Script to render a link that will create a new trello card from a StackExchange site post |
This file contains 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
/* | |
A = array(1, 3, 5, null, null, null); | |
B = array(2, 4, 6); | |
merge_sort(A, B); | |
console.log(B) | |
>> (1,2,3,4,5,6) | |
*/ |
This file contains 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 Ensure-Module { | |
Param([string]$name) | |
if (-not (Get-Module -name $name)) { | |
if (Get-Module -ListAvailable |? { $_.name -eq $name }) { | |
Import-Module -Name $name | |
$true #if available, then import | |
} | |
} else { | |
$false #not loaded, not available |
This file contains 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
$mail = New-Object System.Net.Mail.SmtpClient("smtp.geusnet.com", 25) | |
$mail.Send("aggieben@gmail.com", "bcollins@praecoemailtest.cloudap...", "testing kato", "blah") |
This file contains 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
// ==UserScript== | |
// @name Co-Op Spotter | |
// @namespace https://gist.github.com/aggieben | |
// @downloadURL https://gist.github.com/raw/3094482/coopspotter.user.js | |
// @updateURL https://gist.github.com/raw/3094482/coopspotter.user.js | |
// @description Script to audibly alert the user to changes in the main content div of Harvest Co-op. | |
// @match http://*coopapp.com/* | |
// @match https://*coopapp.com/* | |
// @resource alertSound http://goo.gl/IDn7c | |
// @resource alertSoundAll http://goo.gl/sQgvK |
This file contains 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
// ==UserScript== | |
// @name CO-OP Timer Growl Reminder | |
// @namespace http://coopapp.com | |
// @description Displays Growl notifications at a user defined interval, reminding you to track your time. | |
// @include * | |
// @author Andreas Schempp | |
// @author Mike Green | |
// @version 0.1.1 | |
// ==/UserScript== |
This file contains 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
#include <cmath> | |
#include <memory> | |
#include <numeric> | |
#include <string> | |
#include <vector> | |
typedef std::auto_ptr<std::vector<std::string> > token_collection_t; | |
token_collection_t tokenize(const std::string &s, const char token = ',') | |
{ |