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
// Compile on Mac with Mono as 'dmcs PrepareWatcher.cs' | |
// With a libuv clone, after 'make', do: | |
// ar -x uv.a | |
// gcc -o libuv.dylib -dynamiclib -m32 *.o -framework CoreServices | |
// rm __.SYMDEF\ SORTED *.o | |
// | |
// Then run with 'mono PrepareWatcher.exe' | |
using System; | |
using System.Runtime.InteropServices; |
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 "libuv/deps/libuv/include/uv.h" | |
#include <stdio.h> | |
int main() | |
{ | |
printf("Prepare Watcher: %lu\n", sizeof(uv_prepare_t)); | |
printf("Idle Watcher: %lu\n", sizeof(uv_idle_t)); | |
printf("Check Watcher: %lu\n", sizeof(uv_check_t)); | |
printf("Timer Watcher: %lu\n", sizeof(uv_timer_t)); | |
printf("TCP Type: %lu\n", sizeof(uv_tcp_t)); |
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
/* | |
* V4L2 video capture example | |
* | |
* This program can be used and distributed without restrictions. | |
* From http://v4l2spec.bytesex.org/spec/capture-example.html | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
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
INCREMENT = (n) -> (p) -> (x) -> p(n(p)(x)) | |
DECREMENT = (n) -> (f) -> (x) -> n((g) -> (h) -> h(g(f)))((y) -> x)((y) -> y) | |
ADD = (m) -> (n) -> n(INCREMENT)(m) | |
SUBTRACT = (m) -> (n) -> n(DECREMENT)(m) | |
MULTIPLY = (m) -> (n) -> n(ADD(m))(ZERO) | |
POW = (m) -> (n) -> n(MULTIPLY(m))(ONE) | |
ZERO = (f) -> (x) -> x | |
ONE = (f) -> (x) -> f(x) |
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
#!/bin/bash | |
# the first argument should be the tex file, either with or without extension | |
file="$1" | |
# run pdflatex and bibtex, and open or reload the pdf in Skim | |
#pdflatex "${file}" && bibtex "${file}" && pdflatex "${file}" && pdflatex "${file}" && \ | |
/usr/bin/osascript \ | |
-e "set theFile to POSIX file \"${file}\" as alias" \ | |
-e "set thePath to POSIX path of theFile" \ |
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
set-option -g prefix C-a | |
#use "v" and "s" to do vertical/horizontal splits, like vim | |
bind s split-window -v | |
bind v split-window -h | |
# use the vim motion keys to move between panes | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R |
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
set-option -g prefix C-a | |
# tmux vim integration | |
# http://robots.thoughtbot.com/post/53022241323/seamlessly-navigate-vim-and-tmux-splits | |
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L" | |
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D" | |
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U" | |
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R" | |
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l" |
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
data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAUABQAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A7R9A1iLmWyk2458sA/oC2aqnSp4utpdRnvuhIB/SuX/bn8Q+Jfh7Y+D7zw5rF3pDTzXMUxtXKCTAjK7h0OPm/M15Lo |
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
general { | |
colors = true | |
interval = 5 | |
output_format = "i3bar" | |
} | |
order += "ethernet eth0" | |
order += "load" | |
order += "time" |
OlderNewer