Listing 1. Directory and file layout for a simple EPUB archive (EPUB 2 file structure )
| # Map a local port to a target port through the remote server. | |
| # In the example: localhost:9000 is tunneled to imgur.com:80 through example.com | |
| # local:9000 -> exaple.com -> target:80 | |
| # you could browse to http://localhost:9000/ and browse imgur.com | |
| # (won't see anything, because imgur has changed their stack, but the tunnel works) | |
| ssh -L 9000:imgur.com:80 [email protected] | |
| # Useful for: use a server as a proxy, secure a connection (ssh encrypts everything), |
| %.hex: %.asm | |
| avra -fI $< | |
| rm *.eep.hex *.obj *.cof | |
| all: $(patsubst %.asm,%.hex,$(wildcard *.asm)) | |
| upload: ${program}.hex | |
| avrdude -c arduino -p m328p -P /dev/arduino-uno -b 115200 -U flash:w:$< | |
| monitor: |
| var ctx = null, usingWebAudio = true; | |
| try { | |
| if (typeof AudioContext !== 'undefined') { | |
| ctx = new AudioContext(); | |
| } else if (typeof webkitAudioContext !== 'undefined') { | |
| ctx = new webkitAudioContext(); | |
| } else { | |
| usingWebAudio = false; | |
| } |
| taglib https://github.com/takikawa/taglib-racket/blob/master/taglib/taglib.rkt | |
| libsdl http://planet.racket-lang.org/package-source/pb82/sdl4racket.plt/1/1/src/ | |
| allegro https://github.com/kazzmir/racket-allegro-5/blob/master/allegro.rkt | |
| libgit2 https://github.com/jarnaldich/racket-git/blob/master/libgit2.rkt | |
| opencl http://planet.racket-lang.org/package-source/jaymccarthy/opencl.plt/3/4/c/ | |
| openmpi http://planet.racket-lang.org/package-source/jaymccarthy/openmpi.plt/1/1/ffi/ | |
| zeroqm http://planet.racket-lang.org/package-source/jaymccarthy/zeromq.plt/2/1/zmq.rkt | |
| svn http://planet.racket-lang.org/package-source/jaymccarthy/svn-prop.plt/1/0/main.ss | |
| chipmunk http://planet.racket-lang.org/package-source/jaymccarthy/chipmunk.plt/1/0/chipmunk-ffi.ss | |
| opencv https://github.com/oetr/racket-opencv |
| ; Short guide to TCP/IP Client/Server programming in Common Lisp using usockets | |
| ; | |
| ; The main reason for this guide is because there are very few examples that | |
| ; explain how to get started with socket programming with Common Lisp that I | |
| ; could understand. After spending a day trying, I finally came up with a small | |
| ; bit of code that makes it easy to understand the basics. I've written this | |
| ; primarily for myself, but should help others get started as well. | |
| ; As usual, we will use quicklisp to load usocket. |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
I like Pages.app, but don't want to deal with constantly copying and pasting code around.
Here is how I do syntax highlighting in Pages.app by pressing a key command. It's based off of this post on stack exchange.
sudo easy_install Pygments
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
| sf2-ddd | |
| ├── app | |
| ├── bin | |
| ├── build | |
| ├── lib | |
| ├── src | |
| │ └── __VendorPrefix | |
| │ ├── Application | |
| │ │ └── __DomainNameBundle | |
| │ │ ├── Command |