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
(require '[bidi.ring :refer (make-handler)]) | |
(require '[ring.util.response :refer (response)]) | |
(def route-table ["/index.html" :index]) | |
(defn index-page [request] | |
(response "Hi!")) | |
(def handler-map | |
{:index index-page}) |
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
int ledState = 0; | |
int laserState = 0; | |
long prevTime = 0; | |
void setup() | |
{ | |
// laser on A0 | |
pinMode(A0, OUTPUT); | |
digitalWrite(A0, LOW); |
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
# -*- coding: utf-8 -*- | |
# Name files like: L12-14 foreign translation.wav | |
import re, os, sys, tempfile, shutil | |
from subprocess import call | |
class Word: | |
filename = "" | |
def __init__(self, filename): | |
self.filename = filename |
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
/* | |
* Syntax sugar for collections | |
* [overlap :@"key"].integer = 0; | |
* | |
* gcc -framework Foundation collections.m | |
* | |
*/ | |
#import <Foundation/Foundation.h> |
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
/* | |
* Compile with gcc -framework Foundation | |
*/ | |
#import <Foundation/Foundation.h> | |
struct internals { | |
int a; | |
int b; | |
}; |
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
/* Trivial keyboard input layout to english switcher by Alexander V. Zhouravlev. | |
* Compile it with gcc -framework Carbon -o SwitchToEnglish SwitchToEnglish.m */ | |
#import <Carbon/Carbon.h> | |
int main (int argc, const char *argv[]) | |
{ | |
TISInputSourceRef english = TISCopyInputSourceForLanguage(CFSTR("en-US")); | |
if (!english) | |
return 1; |
NewerOlder