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 | |
function script { | |
local repo="$1" | |
echo "repo=$repo" | |
local txn="$2" | |
echo "txn=$txn" | |
local selector="-t $txn" |
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 LINQPad script is usin the "C# Statement(s)" mode | |
// It requires a reference to System.Windows.Forms.dll | |
// and an import of the System.Windows.Forms namespace | |
// | |
// To use it click Execute, switch to minecraft and wait 5s. | |
var item = 20; | |
var user = "vbfox"; | |
var stacks = 54; | |
var itemsPerStack = 64; |
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
struct T | |
{ | |
public static Action<string>[] operator + (T inst) | |
{ | |
return new Action<string>[] { i => Console.WriteLine(i) }; | |
} | |
} | |
void Main() | |
{ |
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 BlackFox | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Android.OS; | |
/// <summary> | |
/// Provides a <see cref="TaskScheduler"/> using an android <see cref="Handler"/> to run the tasks. | |
/// </summary> |
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
// http://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers/ | |
function fullscreenMode() | |
{ | |
this.request = function() { | |
var documentElement = document.documentElement; | |
if (documentElement.requestFullscreen) { | |
return documentElement.requestFullscreen(); | |
} | |
else if (documentElement.mozRequestFullScreen) { |
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
static class Utils | |
{ | |
static IEnumerable<Assembly> GetDirectlyReferencedAssemblies(Assembly startAssembly) | |
{ | |
return startAssembly.GetReferencedAssemblies() | |
.Select(TryLoad) | |
.Where(a => a != null && !a.GlobalAssemblyCache); | |
} | |
static IEnumerable<Assembly> GetReferencedAssemblies(Assembly startAssembly) |
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() | |
{ | |
var root = new DirectoryInfo(@"C:\temp\tmls\Visual Studio Templates"); | |
var works = from dir in root.GetDirectories("*.*", System.IO.SearchOption.AllDirectories) | |
where dir.Parent.Name == "1033" | |
select new { | |
Archive = Path.Combine(dir.Parent.FullName, dir.Name + ".zip"), | |
Glob = Path.Combine(dir.FullName, "*"), | |
Dir = dir |
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
open Microsoft.CodeAnalysis | |
open Microsoft.CodeAnalysis.CSharp | |
open Microsoft.CodeAnalysis.CSharp.Syntax | |
open Microsoft.CodeAnalysis.MSBuild | |
open Microsoft.CodeAnalysis.Formatting | |
open System.IO | |
module FluentRoslynLite = | |
let (!!) t = Async.AwaitTask t | |
let emptyFile = SyntaxFactory.CompilationUnit() |
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
/// Escape arguments in a form that programs parsing it as Microsoft C Runtime will successfuly understand | |
/// Rules taken from http://www.daviddeley.com/autohotkey/parameters/parameters.htm#WINARGV | |
module MsvcrCommandLine = | |
open System.Text | |
let escapeArg (arg : string) (builder : StringBuilder) = | |
let needQuote = arg.Contains(" ") || arg.Contains("\t") | |
let rec escape (builder: StringBuilder) pos = | |
if pos >= arg.Length then | |
() |
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"?> | |
<configuration> | |
<system.webServer> | |
<handlers> | |
<remove name="httpplatformhandler" /> | |
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /> | |
</handlers> | |
<httpPlatform | |
stdoutLogEnabled="true" | |
stdoutLogFile="./logs/SuaveIIS.log" |