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
brew install pango | |
brew install atk | |
brew install gtk+ | |
tar xvf gtk-sharp-2.12.10.tar.gz | |
cd gtk-sharp-2.12.10 | |
# Set PKG_CONFIG_PATH so that cairo knows where to find xcb-shm. | |
# Set __GLIB_H_INSIDE__ to stop glib from preventing GTK# from including its headers other than glib.h. | |
# Alias _glibsharp_g_thread_supported to the missing _g_thread_supported. | |
./configure --prefix=/usr/local PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig CFLAGS="-D__GLIB_H_INSIDE__" LDFLAGS="-Wl,-alias,_glibsharp_g_thread_supported,_g_thread_supported" | |
make -j4 |
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
#include <stdio.h> | |
#include <unistd.h> | |
int main() { | |
if (geteuid() == 0) { | |
puts("Okay."); | |
return 0; | |
} | |
puts("What? Make it yourself."); | |
return 1; |
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
def ack (int, int -> int) { | |
-> m, n; | |
if (m = 0) { | |
n + 1 | |
} elif (n = 0) { | |
(m - 1) 1 ack | |
} else { | |
(m - 1) m (n - 1) ack ack | |
} | |
} |
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
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use POSIX 'strftime'; | |
use Time::HiRes 'gettimeofday'; | |
my $timestamp = gettimeofday; | |
printf "%.3f", $timestamp; |
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/sh | |
if [ $# -ne 1 ]; then | |
echo 'Usage: git-branch-description <branch name>' >&2 | |
exit 1 | |
fi | |
EDITOR='cat' git branch --edit-description "$1" | grep -v '^#' |
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
// Translation of https://gist.github.com/jeaye/ae36de6b677c4000ce67 | |
data queue: | |
case queue ([<s...> (s... -> s...)]) | |
define push<s...> (queue (s... -> s...) -> queue): | |
-> f; | |
match: | |
case queue: | |
f append queue |
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
#include <iostream> | |
#include <numeric> | |
#include <vector> | |
using namespace std; | |
// In Haskell, the Monoid typeclass is parameterised by only a type. Such a | |
// definition requires “newtype hacks” to produce different monoids on the same | |
// type. This definition is parameterised by both the type and the function, and | |
// as such can be used to define different monoids on the same type without any | |
// interference. |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/time.h> | |
int sum(int a, int b, int c, int d) { | |
return a + b + c + d; | |
} | |
int product(int a, int b, int c, int d) { | |
return a * b * c * d; |
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
Git submodules updated successfully | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive | |
Making all in po | |
Making all in mcs | |
make[3]: Nothing to be done for `all-am'. | |
Making all in libgc | |
Making all in m4 | |
make[3]: Nothing to be done for `all'. | |
Making all in include | |
Making all in private |
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
Building: Shared (Debug) | |
Building: XamarinAndroid (Debug) | |
Build started 2/24/2015 1:06:44 PM. | |
__________________________________________________ | |
Project "/Users/jonathanpurdy/Projects/Mobile-App-Performance/Xamarin/XamarinAndroid/XamarinAndroid.csproj" (Build target(s)): | |
Initial Properties: | |
__CF_USER_TEXT_ENCODING = 0x1F5:0:0 |