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
| require 'parslet' | |
| class Parslet::Atoms::FixedLength < Parslet::Atoms::Base | |
| attr_reader :len, :parslet | |
| def initialize(parslet, len, tag=:length) | |
| super() | |
| raise ArgumentError, | |
| "Asking for zero length of a parslet. (#{parslet.inspect} length #{len})" \ | |
| if len == 0 |
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
| require 'pp' | |
| require 'parslet' | |
| module Example # as in 'lots of insipid and stupid parenthesis' | |
| class Parser < Parslet::Parser | |
| rule(:ws) { match('[\s]').repeat(1) } | |
| rule(:ws?) { ws.maybe } | |
| rule(:number) { match('[0-9]').repeat(1) } | |
| rule(:offset) { ws? >> str("[") >> number.as(:offset) >> str("]") } |
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
| #Persistent | |
| SetTitleMatchMode, 2 | |
| SetTitleMatchMode, Fast | |
| SetTimer, DrawRect, 50 | |
| border_thickness = 5 | |
| Table_String = Table | |
| DrawRect: | |
| WinGetTitle, title, A |
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
| public static class MoqExtensions | |
| { | |
| /// <summary> | |
| /// LINQ + Reflection + Moq = MAGIC!!! | |
| /// Calls Mock.Get(obj).Verify(x => x.MethodY(It.IsAny<Z>,...), Times.Never) for all methods | |
| /// </summary> | |
| /// <typeparam name="T"></typeparam> | |
| /// <param name="mock">mock object you want to assert on</param> | |
| public static void VerifyNoMethodsAreCalled<T>(this Mock<T> mock) where T : class | |
| { |
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
| @start "Edit" /B "c:\Program Files (x86)\Notepad++\notepad++.exe" %* |
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
| # Generated by iptables-save v1.4.7 on Sun Feb 24 00:48:11 2013 | |
| *mangle | |
| :PREROUTING ACCEPT [756:54757] | |
| :INPUT ACCEPT [756:54757] | |
| :FORWARD ACCEPT [0:0] | |
| :OUTPUT ACCEPT [578:527896] | |
| :POSTROUTING ACCEPT [578:527896] | |
| -A INPUT -s 1.1.1.2/32 -j CHECKSUM --checksum-fill | |
| -A OUTPUT -s 1.1.1.2/32 -j CLASSIFY --set-class 0004:0056 | |
| COMMIT |
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
| import System; | |
| import System.Windows.Forms; | |
| import Fiddler; | |
| // INTRODUCTION | |
| // This is the FiddlerScript Rules file, which creates some of the menu commands and | |
| // other features of Fiddler. You can edit this file to modify or add new commands. | |
| // | |
| // The original version of this file is named SampleRules.js and it is in the | |
| // \Program Files\Fiddler\ folder. When Fiddler first starts, it creates a copy named |
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
| I added an alias to my git aliases in my .gitconfig | |
| review-me = !sh -c 'cmd.exe /c \"@e:\\bin\\send_for_review.bat\"' | |
| so I can type 'git review-me' |
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
| @powershell -NoProfile -ExecutionPolicy unrestricted .\Kill_IE_WhenHung.ps1 |
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
| require 'sinatra' | |
| require 'slim' | |
| require './reorder_tests_in_test_lab' | |
| require 'pit' | |
| set :bind, '0.0.0.0' | |
| set :slim, :pretty => true | |
| @@config = Pit.get("qc", :require => { | |
| "username" => "qc_user", |
OlderNewer