Skip to content

Instantly share code, notes, and snippets.

View thosakwe's full-sized avatar
🎯
Focusing

Tobe Osakwe thosakwe

🎯
Focusing
View GitHub Profile
@thosakwe
thosakwe / .vimrc
Last active February 16, 2019 16:54
" 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'
@thosakwe
thosakwe / arr.txt
Last active January 14, 2019 22:44
ML lang?
let arr = rand float[2, 3];
let arr2 = arr + 2
print arr2
@thosakwe
thosakwe / the-scene.ts
Created November 20, 2018 21:05
Random sounds in Phaser
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...));
@thosakwe
thosakwe / build.txt
Created October 30, 2018 14:34
Simple build pipeline...
// 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
@thosakwe
thosakwe / exists.
Created October 24, 2018 19:15
Proof-based language
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.
}
@thosakwe
thosakwe / github.declarative.txt
Last active September 11, 2018 00:55
Web Scraping ML???
// 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')
@thosakwe
thosakwe / ascii.txt
Last active September 3, 2018 06:25
Hmmmrmrmr
val Ascii = (
A: 0x12,
// ...
z: 0x13
)
type Number = Uint8 | Uint16 // Etc.
fn (Number n) toString() : String {
var chars = Array(Uint16).new()
@thosakwe
thosakwe / distinct.spql
Last active August 12, 2018 20:00
SpartanDB
from users where {distinct username} select { username }
@thosakwe
thosakwe / Class.mnd
Last active July 20, 2018 07:02
MANDA
class Snake {
var name: String
get title: String {
return '%name the Legendary Snake'
}
set age (value: Num) {
}
@thosakwe
thosakwe / cat.csc
Created June 3, 2018 01:25
CASCADA
import file
def main |argc, argv|
if (>= (argc 2))
argv
| first
| file.read
| stdout
else
stdin | stdout