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
(define mycons | |
(lambda (x y) | |
(lambda (m) (m x y)))) | |
(define (mycar x) | |
(x (lambda (p q) p))) | |
(define (mycdr x) | |
(x (lambda (p q) q))) |
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
Sub Test(Assertion As Boolean, Description As String) | |
ActiveCell.Value = Description | |
If Assertion Then | |
With Selection.Interior | |
.ColorIndex = 10 | |
.Pattern = xlSolid | |
End With | |
Else |
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
//&>/dev/null;x="${0%.*}";[ ! "$x" -ot "$0" ]||(rm -f "$x";cc -o "$x" "$0")&&"$x" $*;exit | |
#include <stdio.h> | |
int main() { | |
char c; | |
while ((c = getchar()) != EOF) | |
putchar(c); | |
return 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
#include <stdio.h> | |
#include <stdlib.h> | |
int binsearch1(int, int[], int); | |
int binsearch2(int, int[], int); | |
int main(int argc, char *argv[]) | |
{ | |
int size = atoi(argv[2]); |
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
javascript:(function() {document.write('<script src="https://gist.github.com/1040276.js"> </script>') })() | |
// why not just do this? |
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
#!/usr/bin/env perl | |
use JSON; | |
use strict; | |
no warnings; | |
use HTML::Entities; | |
my $command = @ARGV[0]; | |
my $home = $ENV{'HOME'}; | |
if (not (-e "$home/.hn")) { |
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
#!/usr/bin/env python | |
def twodigits(st): | |
g = st[2:] | |
if (len(g) == 1): | |
g = '0' + g | |
return g.upper() | |
def n2h(n): | |
r = hex(n) |
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
Option Explicit | |
Private Function n(strike As Double, s As Double, sd As Double, r As Double, days As Double) As Double | |
Dim ls, lx, sd2, t As Double | |
ls = Log(s) | |
lx = Log(strike) | |
t = days / 365 | |
sd2 = pow(sd, 2) | |
n = ls - lx + r * t + sd2 * t / 2 | |
End Function |
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 cgi | |
print "Content-Type: text/html" | |
form = cgi.FieldStorage() | |
if 'g' not in form: | |
out = "" |
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
set nocompatible | |
source $VIMRUNTIME/vimrc_example.vim | |
source $VIMRUNTIME/mswin.vim | |
source $VIMRUNTIME/eric_custom.vim | |
behave mswin | |
set ff="unix" | |
set encoding=utf-8 | |
set nobinary |