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
public static class ObjectToDictionaryHelper | |
{ | |
public static IDictionary<string, object> ToDictionary(this object source) | |
{ | |
return source.ToDictionary<object>(); | |
} | |
public static IDictionary<string, T> ToDictionary<T>(this object source) | |
{ | |
if (source == null) |
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
#!/bin/bash | |
QUERY=query.json | |
time curl -i -XPOST \ | |
-o output.log \ | |
--data "@$QUERY" \ | |
-H "Accept: application/json" \ | |
-H "Content-Type: application/json" \ | |
http://127.0.0.1:7474/db/data/transaction/commit |
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
#find | |
"(\w+)":\s*(.*), | |
#replace with | |
public string $1 {get;set;} = "$2"; | |
# then fix 2x double quotes | |
#find | |
"" | |
#replace with | |
" |
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
namespace Extensions.Types; | |
public static class TypeExtensions | |
{ | |
/* | |
* | |
* String to Type Converters | |
* | |
* WHY? Because converting VB to C# and handling null strings with a bunch of `if` statement is a waste of your time and mine... | |
* How? Ternary logic and fallbacks (or default) |
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
let debug_mode = true; | |
// Filters out emails sent on behalf of some other server they might be impersonating | |
// E.g. mg3.ceipalmm.com | |
// TODO: put your own mail domains in this array. Mine are samples. | |
var my_blacklisted_domains = [ | |
"X-Feedback-Id: postmaster@mg3.ceipalmm.com" | |
,"X-Feedback-Id: postmaster@mg4.ceipalmm.com"]; |
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
-- this file Embedded resource | |
SELECT * FROM "Sellers" | |
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
-- this file Embedded resource | |
SELECT * FROM "Sellers" | |
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 fs = require('fs'); | |
var INTERVAL = 1000; | |
var cycle_stop = false; | |
var daemon = false; | |
var timer; | |
process.argv.forEach(function (arg) { | |
if (arg === '-d') daemon = true; |
NewerOlder