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
# This command takes iPhone's LLVM GCC and compiles ARMV6 assembly. E.g. my_assembly.s | |
$ /Developer/Platforms/iPhoneOS.platform/usr/bin/llvm-gcc-4.2 -arch armv6 -c ${YOUR_FILE}.s |
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
-- Wat. | |
-- No clue if this works, just writing Haskell. | |
f x y = x + y -- Random function | |
let resultOfF = f 2 2 -- 4 | |
let someList = [1, 2, 3] | |
let someListWithOtherThing = resultOfF:someList | |
addLists x y = x ++ y |
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
print((((((((2 + 2)))))))); | |
console.log(((8 + 2))); |
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
main() { | |
printf("hello, world"); | |
} |
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
// | |
// Soap is a mostly-open-source, minimal operating system written in C and YASM | |
// assembly. Soap's source code way be used as you wish under the following terms | |
// (it's a form of the BSD license): | |
// | |
// Copyright (c) 2013, Christopher Clarke | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: |
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 <stdlib.h> | |
#include <SDL/SDL.h> | |
#include <SDL/SDL_opengl.h> | |
#define WIDTH 640 | |
#define HEIGHT 480 | |
#define WINDOW_TITLE "Hello, SDL!" | |
SDL_Surface *screen; |
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
# Welcome to Schnops! This is a comment. | |
# Comments are ignored when you run the program. | |
#- | |
If you have a lot of cool comments you can put | |
them all in a multiline commment. Multiline comments | |
can space multiple lines and have to be opened and closed | |
with '#-' and '-#'. | |
-# |
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
module C | |
def bananas | |
puts :Bananas! | |
end | |
end | |
def include_method?(method, mod) | |
if mod.methods.include? method | |
puts "Module #{mod} has method #{method}" | |
true |
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
module A; end | |
A::B = Module.new do | |
define_method :hello do | |
puts :hello | |
end | |
end | |
A::B::hello #=> hello |
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
$ bundle binstubs rspec-core | |
$ bin/rspec . # Prefix with the time command and compare with bundle exec, or standard rspec command! |