Skip to content

Instantly share code, notes, and snippets.

View sethmcl's full-sized avatar

Seth McLaughlin sethmcl

  • Dropbox
  • San Francisco, CA
View GitHub Profile
@sethmcl
sethmcl / concurrency.go
Created August 9, 2016 21:05
Simple example of goroutines and channels
package main
import (
"fmt"
"net/http"
)
const maxConcurrentRequests = 100
type Response struct {
@sethmcl
sethmcl / otto.go
Created August 2, 2016 03:38
Print ast node types using golang with otto
package parse
import (
"fmt"
"github.com/robertkrimen/otto/ast"
"github.com/robertkrimen/otto/parser"
"io/ioutil"
"reflect"
)
document.write('foobar');
const Question = React.createClass({
handleGetStarted: function(event) {
this.nextQuestion(event);
},
qdata: [
{
id: 0,
type: "m-choice",
question: "Are you ready to get started?",
options: [
@sethmcl
sethmcl / README.md
Last active February 13, 2019 20:48 — forked from smileart/README.md

My modified fork of agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

Compatibility

@sethmcl
sethmcl / ice.zsh-theme
Last active August 29, 2015 14:06
My ZSH theme
# PROMPT='%{$fg_bold[red]%}%M at %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
PROMPT='%{$fg_bold[yellow]%}%n %{$reset_color%}at %{$fg_bold[green]%}%m %{$fg[cyan]%}${PWD/#$HOME/~} %{$fg_bold[blue]%}$%{$fg_bold[blue]%} % %{$reset_color%}
$ '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
@sethmcl
sethmcl / .slate.js
Created June 14, 2014 20:08
Simple Slate config
var fullscreen, right, left, topLeft, bottomLeft, topRight, bottomRight;
fullscreen = slate.operation('move', {
x: 'screenOriginX',
y: 'screenOriginY',
width: 'screenSizeX',
height: 'screenSizeY'
});
right = slate.operation('move', {
@sethmcl
sethmcl / index.html
Created May 16, 2014 22:06
Sample show/hide
<!DOCTYPE html>
<html>
<head>
<title>Sample page</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<ul id="list">
<li>Maine</li>
@sethmcl
sethmcl / 0_reuse_code.js
Created May 3, 2014 23:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@sethmcl
sethmcl / output.js
Last active August 29, 2015 14:00
output
function log() {
var output = Array.prototype.slice.call(arguments, 0).join(' ');
var div = document.createElement('div');
div.innerText = output;
document.body.appendChild(div);
}