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
.─────────. | |
( input ) | |
`─────────' | |
│ | |
▼ | |
┌────────────┐ | |
│ fps │ | |
└────────────┘ | |
│ | |
▼ |
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
#!/usr/bin/env python3 | |
import objc | |
from Foundation import ( | |
NSDate, | |
NSDefaultRunLoopMode, | |
NSLog, | |
NSObject, | |
NSRunLoop, | |
NSThread, |
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
#!/usr/bin/env python3 | |
import threading | |
# from multiprocessing import Pool | |
# from multiprocessing import Process | |
class EventLoopThread(threading.Thread): | |
def __init__(self): | |
super(EventLoopThread, self).__init__() |
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
Homebrew build logs for macvim on macOS 10.14 | |
Build date: 2018-09-08 10:35:42 |
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 <stdio.h> | |
#include <string.h> | |
int is_valid(const char* password) { | |
if (strcmp(password, "poop") == 0) { | |
return 1; | |
} else { | |
return 0; | |
} |
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
" 0 preamble ============================================================== {{{ | |
" | |
" There is a great organization scheme in place here. If you run the | |
" :options command in Vim, you see a list of all the options that you | |
" can set, along with their current settings and a brief description of | |
" them. The great thing about this scheme is that--for better or | |
" worse--it sets up a system which can organize all my settings. I've | |
" decided to organize everything below thus, throwing ancillary things | |
" (my own mappings, plugin settings, and so on) where it makes sense. | |
" |
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
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [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
#!/usr/bin/perl | |
use Text::CSV; | |
my $csv = Text::CSV->new(); | |
while (<>) { | |
$csv->parse($_); | |
my @row = $csv->fields(); | |
print $row[7]; |
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
function! s:SwitchToFromTest() " {{{ | |
let currentfilename = expand("%:t") | |
let pathtocurrentfile = expand("%:p:h") | |
let endofpath = fnamemodify(pathtocurrentfile, ":t") | |
if endofpath == "TEST" | |
let filename = fnamemodify(pathtocurrentfile, ":h") . "/" . currentfilename | |
else | |
let filename = pathtocurrentfile . "/TEST/" . currentfilename | |
endif |
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
fn main() { | |
let number = 20; | |
println(fmt!("%?th fib number is: %?", number, fib(number))); | |
} | |
fn fib(x: int) -> int { | |
match x { | |
0 | 1 => x, | |
_ => fib(x - 1) + fib(x - 2), | |
} |