Skip to content

Instantly share code, notes, and snippets.

View hach-que's full-sized avatar

June Rhodes hach-que

View GitHub Profile
@hach-que
hach-que / AutoWrapObject.cs
Created May 30, 2011 12:05
AutoWrapObject for IronJS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Reflection;
using IronJS.Native;
namespace IronJS
{
@hach-que
hach-que / sanitize-tree.sh
Created May 2, 2012 09:45
Automatic formatter for Git index!
#!/bin/bash
# This script automatically calls expand and indent
# on either:
#
# * The entire tree or
# * The files changed since last commit (if invoked as pre-commit)
#
# You should make a symbolic link from .git/hooks/pre-commit
# to this file and it will automatically sanitize the data in
@hach-que
hach-que / tryjsil.cs
Created December 11, 2012 10:30
My Gist
using System;
using JSIL;
using JSIL.Meta;
public static class Program {
public static int x = 10;
public static int y = 20;
public static void Main () {
dynamic document = Builtins.Global["document"];
@hach-que
hach-que / Redpoint.appliedpolicy
Created March 10, 2014 21:33
Policy File Example
<Policies>
<TextStylePolicy EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/plain" />
<CSharpFormattingPolicy IndentSwitchBody="True" AnonymousMethodBraceStyle="NextLine" PropertyBraceStyle="NextLine" PropertyGetBraceStyle="NextLine" PropertySetBraceStyle="NextLine" EventBraceStyle="NextLine" EventAddBraceStyle="NextLine" EventRemoveBraceStyle="NextLine" StatementBraceStyle="NextLine" ArrayInitializerBraceStyle="NextLine" BeforeMethodDeclarationParentheses="False" BeforeMethodCallParentheses="False" BeforeConstructorDeclarationParentheses="False" BeforeDelegateDeclarationParentheses="False" NewParentheses="False" SpacesBeforeBrackets="False" inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />
<DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="FileName" />
<TextStylePolicy EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="application/xml" />
<XmlFormattingPolicy inheritsSet="
////////// Program.cs /////////////
#if PLATFORM_WINDOWS || PLATFORM_MACOS || PLATFORM_LINUX || PLATFORM_WEB
namespace PoolingTest
{
using Ninject;
using System;
using System.Diagnostics;
using Protogame;
# Allow running scripts on this system
Set-ExecutionPolicy -Force Bypass
# Download Cygwin64
wget https://cygwin.com/setup-x86_64.exe `
-OutFile C:\setup-x86_64.exe
# Run Cygwin64 install
C:\setup-x86_64.exe -s http://mirrors.kernel.org/sourceware/cygwin/ -P openssh `
-q -a x86_64 -B -X -n -N -d
#!/bin/bash
function gist() {
USERNAME="hach-que"
php -r 'echo json_encode(array("files" => array(basename($argv[1]) => array("content" => file_get_contents($argv[1])))));' -- $1 | curl -s --user "$USERNAME" --data @- https://api.github.com/gists | php -r '$a = json_decode(file_get_contents("php://stdin"), true); echo $a["html_url"]."\n";'
}
@hach-que
hach-que / Hook.definition.xml
Last active November 12, 2015 06:37
Example of a post-build hook in Protobuild
<?xml version="1.0" encoding="utf-8" ?>
<Project Name="Hook" Path="Hook" Type="Console" PostBuildHook="True">
<Properties>
<!-- Prevent the hook from running on these projects -->
<PostBuildHookExcludes>
<Project Name="Hook.Library" />
</PostBuildHookExcludes>
</Properties>
<References>
<Reference Include="System" />
^[[A[roslyn-suspendresume] june@june-linux-pc:~/Projects/monodevelop> ./configure --prefix=/opt/monodevelop-protobuild
Configuring package: main
-------------------------
Configuration options:
Running aclocal ...
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
Running automake --foreign ...
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
Protobuild.exe --automated-build