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
// “μσ” calculates the mean and standard deviation of a list, given the sum of the squares of the elements, the sum of the elements, and the reciprocal of the length. Uses real characters for more mathiness. | |
// With local variables, in infix: | |
def μσ (float float float → float float): | |
→ ss s in; | |
s ×. in → μ; | |
(ss ×. in −. μ sq) sqrt → σ; | |
μ σ | |
// With local variables, in postfix: |
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
(defun adaptive-wrap-fill-context-prefix (begin end) | |
"Like `fill-context-prefix', but with length adjusted by `adaptive-wrap-extra-indent'." | |
;; Note: fill-context-prefix may return nil; See: | |
;; http://article.gmane.org/gmane.emacs.devel/156285 | |
(let* ((fcp (or (fill-context-prefix begin end) "")) | |
(fcp-len (string-width fcp))) | |
(if (>= adaptive-wrap-extra-indent 0) | |
(concat (make-string fcp-len ?\ ) | |
"│" | |
(make-string adaptive-wrap-extra-indent ?\ )) |
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 <fcntl.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <sys/mman.h> | |
#include <sys/time.h> | |
#include <unistd.h> | |
static char *buffer1; | |
static char *buffer2; | |
static const int page_size = 1 << 12; |
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
#!/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
// 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 <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 |
OlderNewer