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
/* jQuery plugin textselect | |
* version: 1.0 | |
* tested on jQuery 1.3.2, 1.5 | |
* author: josef.moravec@gmail.com, duane.johnson@gmail.com | |
* | |
* usage: | |
* $(function() { | |
* $(document).bind('textselect', function(e) { | |
* Do stuff with e.text | |
* }); |
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
/* | |
Create a console app, add references to the various white libraries and use the following as a template for operating the Open Dialog window | |
Get the white binaries from here: http://white.codeplex.com/ | |
*/ | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Windows.Automation; | |
using White.Core; | |
using White.Core.UIItems; |
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
using System; | |
using System.IO; | |
using System.Runtime.CompilerServices; | |
using NLog; | |
public sealed class CallerInfo | |
{ | |
private CallerInfo(string filePath, string memberName, int lineNumber) | |
{ | |
this.FilePath = filePath; |
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 code is public domain. | |
The MurmurHash3 algorithm was created by Austin Appleby and put into the public domain. See http://code.google.com/p/smhasher/ | |
This C# variant was authored by | |
Elliott B. Edwards and was placed into the public domain as a gist | |
Status...Working on verification (Test Suite) | |
Set up to run as a LinqPad (linqpad.net) script (thus the ".Dump()" call) | |
*/ |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
public class Ini | |
{ | |
Dictionary<string, Dictionary<string, string>> ini = new Dictionary<string, Dictionary<string, string>>(StringComparer.InvariantCultureIgnoreCase); | |
string file; |
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 request = require('request'); | |
var unzip = require('unzip'); | |
var csv2 = require('csv2'); | |
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip') | |
.pipe(unzip.Parse()) | |
.on('entry', function (entry) { | |
entry.pipe(csv2()).on('data', console.log); | |
}) | |
; |
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
{ | |
"description": "\"contains\" hack for v4 JSON Schema. The array must contain at least one \"A\", specified by saying that if all the entries are *not* \"A\", then it fails.", | |
"type": "array", | |
"not": { | |
"items": { | |
"not": { | |
"enum": ["A"] | |
} | |
} | |
} |
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 tv4 = require('tv4'); | |
var schema = { | |
"type": "object", | |
"$schema": "http://json-schema.org/draft-04/schema", | |
"id": "#", | |
"required": ["events"], | |
"properties": { | |
"events": { | |
"type": "array", |
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 BloomFilter | |
{ | |
using System; | |
using System.Collections; | |
/// <summary> | |
/// Bloom filter. | |
/// </summary> | |
/// <typeparam name="T">Item type </typeparam> | |
public class Filter<T> |
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
# | |
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf: | |
# | |
# Blocks IPs that makes too much accesses to the server | |
# | |
[Definition] | |
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*" | |
ignoreregex = |
OlderNewer