- Full stack developer working in JavaScript, Go, Ruby, lua and more.
- Front End: angular.js, vue.js, d3, paper.js, less / stylus, bower, grunt / gulp
- Back End: Node.js, Go, SQL, Mongo, Redis, websockets, etc.
- Comfortable with linux, basic ops and AWS services.
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
) | |
func main() { |
This file contains hidden or 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.backgroundVideo = function() { | |
var win = $(window) | |
var wrap = this | |
var vid = wrap.find('video') | |
if (vid.length == 0) { | |
throw new Error("You must call backgroundVideo on a wrapper div that contains a video element. No video element found.") | |
} | |
wrap.css({ |
This file contains hidden or 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
.long-shadow { | |
text-shadow: | |
1px 1px #333, | |
2px 2px #333, | |
3px 3px #333, | |
4px 4px #333, | |
5px 5px #333; | |
} |
This file contains hidden or 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
var Debug = React.createClass({ | |
render: function() { | |
var obj = this.props.obj | |
var json = JSON.stringify(obj, undefined, 2) | |
return <pre>{json}</pre> | |
} | |
}) |
This file contains hidden or 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
const std = @import("std"); | |
const Mark = enum(u2) { | |
Empty, | |
X, | |
O, | |
}; | |
const Game = struct { | |
board: [3][3]Mark, |
This file contains hidden or 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
use std::io::{self, BufRead}; | |
fn to_mark(i: u8) -> String { | |
match i { | |
1 => "X".to_string(), | |
2 => "O".to_string(), | |
_ => "-".to_string(), | |
} | |
} |
This file contains hidden or 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 { | |
serve, | |
ServerRequest, | |
} from "https://deno.land/[email protected]/http/server.ts"; | |
const GIT_PROJECT_ROOT = "repoz"; | |
const encoder = new TextEncoder(); | |
async function gitCgi(request: ServerRequest) { | |
let [path, query] = request.url.split("?"); |
This file contains hidden or 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
// A very basic chatroom example: | |
import { JSONCodec, Msg } from 'nats.ws' | |
import { FormEvent, useState } from 'react' | |
import './App.css' | |
import { useNats, useNatsSubscription } from './useNats' | |
const natsSubject = 'chat' | |
const sc = JSONCodec() |
This file contains hidden or 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
-- currently running queries (youngest to oldest) | |
SELECT pid, state, age(clock_timestamp(), query_start), substring(trim(regexp_replace(query, '\s+', ' ', 'g')) from 1 for 200) | |
FROM pg_stat_activity | |
WHERE state != 'idle' AND query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- x blocking y |
OlderNewer