This guide is many years old is most likely outdated. I'll keep it here for reference; use at your own risk.
Tested on Mac OSX 10.6.7 with LLVM and CLANG version 2.9 Eclipse Helios Service Release 1 (Build 20100917-0705)
# Prototype of a functional scripting language. Just fooling around. Nothing to see here. | |
# | |
A long comment. | |
Very long, they say. | |
# | |
# There's only one data type: list | |
# Assign variables with : |
This works: | |
http://jobs.apple.com/index.ajs?BID=1&method=mExternal.returnToResults&CurrentPage=143165577 | |
This doesn't: | |
http://jobs.apple.com/index.ajs?BID=1&method=mExternal.returnToResults&CurrentPage=143165578 | |
But why? |
function getCtr() { | |
var i = 0; return function() { console.log(++i); } | |
} | |
var ctr = getCtr() | |
ctr() // 1 | |
ctr() // 2 |
/* | |
* Parallel bitonic sort using CUDA. | |
* Compile with | |
* nvcc -arch=sm_11 bitonic_sort.cu | |
* Based on http://www.tools-of-computing.com/tc/CS/Sorts/bitonic_sort.htm | |
* License: BSD 3 | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> |
<?php | |
/* | |
HACK: Replace the original dropbox-gallery.php with this file. | |
Script: | |
My PHP DropBox Gallery | |
Author: | |
Jonathan Ochej, <http://2boandco.com> |
from math import log10 | |
from random import randint | |
def get_digit(number, base, pos): | |
return (number // base ** pos) % base | |
def prefix_sum(array): | |
for i in range(1, len(array)): | |
array[i] = array[i] + array[i-1] | |
return array |
I got this message when I tried to open a shell on my application: | |
$ dotcloud run www | |
==> Opening a shell on service (www) instance #0 (application trips) | |
Error: An unexpected error has occured: 'ascii' codec can't decode byte 0xc3 in position 67: ordinal not in range(128). | |
The remote server handling the last request was 174.129.124.156:443. | |
The remote timestamp was Thu, 28 Feb 2013 15:06:19 GMT. | |
Please try again; and if the problem persists, contact support@dotcloud.com with this information. | |
Adding the following to /usr/local/lib/python2.7/site-packages/sitecustomize.py fixed the error: |
" Mac specific: Text-to-speech on selected text in visual mode | |
" w: Don't replace selection with command output after execution | |
" silent: Don't prompt for enter after execution | |
:vnoremap <leader>v :w<Home>silent <End> !say <CR> |
#!/usr/bin/python | |
""" | |
Usage from commandline: | |
python l33t.py "Can i haz cheezburgerz" | |
""" | |
from string import maketrans # Required to call maketrans function. | |
from sys import argv |