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
" Plugins | |
call plug#begin('~/.local/share/nvim/plugged') | |
Plug 'tpope/vim-sensible' | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'itchyny/lightline.vim' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'SirVer/ultisnips' | |
Plug 'honza/vim-snippets' | |
Plug 'vim-syntastic/syntastic' |
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
let arr = rand float[2, 3]; | |
let arr2 = arr + 2 | |
print arr2 |
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
import {Scene} from 'phaser'; | |
export default class extends Scene { | |
private sounds: Phaser.Sound.BaseSound[] = []; | |
create() { | |
this.sounds.push(this.sound.add('song_1', '<url>', etc...)); | |
this.sounds.push(this.sound.add('song_2', '<url>', etc...)); | |
this.sounds.push(this.sound.add('song_3', '<url>', etc...)); | |
this.sounds.push(this.sound.add('song_4', '<url>', etc...)); |
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
// Glob up C++ sources | |
var srcs = combine([ | |
glob("src/*{.h,.cpp}") | |
]) | |
// Exclude some sources | |
srcs = exclude(srcs, [glob("test/**")]) | |
// Grab all the object files, creates multiple targets | |
var objects = compile_cpp(srcs).outputs |
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
property transitive { | |
let r(a) : Relation on a. | |
let x, y, z : in r. | |
assume (x, y) in r. | |
assume (y, z) in r. | |
declare (x, z) in 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
// Simultaneously fetch three pages | |
fn main(url) { | |
// Asynchronously visit Github, and find all repos... | |
// Do this in the background. | |
// | |
// Returns a Task. | |
let myTask = fork { | |
let rq = fetch(url, {accept: 'text/html'}) | |
let dom = response.dom() | |
let links = dom.querySelectorAll('a.repo-link') |
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
val Ascii = ( | |
A: 0x12, | |
// ... | |
z: 0x13 | |
) | |
type Number = Uint8 | Uint16 // Etc. | |
fn (Number n) toString() : String { | |
var chars = Array(Uint16).new() |
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
from users where {distinct username} select { username } |
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
class Snake { | |
var name: String | |
get title: String { | |
return '%name the Legendary Snake' | |
} | |
set age (value: Num) { | |
} |
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
import file | |
def main |argc, argv| | |
if (>= (argc 2)) | |
argv | |
| first | |
| file.read | |
| stdout | |
else | |
stdin | stdout |