Skip to content

Instantly share code, notes, and snippets.

🍑
https://whimsy.space

Daniel X Moore STRd6

🍑
https://whimsy.space
Block or report user

Report or block STRd6

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am strd6 on github.
  • I am danielx (https://keybase.io/danielx) on keybase.
  • I have a public key ASC8LhNkWD02QHx2inQw_CTsDiy0iw2mBv4DPTaoTYVf1wo

To claim this, I am signing this object:

@STRd6
STRd6 / heroku.coffee
Created Jun 13, 2016
Make requests to the Heroku API from the browser. Note accept and authorization headers.
View heroku.coffee
APIGenerator = require "./api_generator"
{extend} = require "../source/util"
module.exports = (ajax) ->
requester = (path, options={}) ->
options = extend
url: path
method: "GET"
dataType: "json"
View reflect_angle.coffee
reflect = (normal, incident) ->
2 * normal - incident
View pubsub.rb
require 'faye/websocket'
require "sinatra/activerecord"
class Pubsub
KEEPALIVE_TIME = 15 # in seconds
def initialize(app)
@app = app
@clients = []
@channel = "test"
View a e s t h e t i c s .html
<meta charset="utf-8">
<style >*{
margin
:0;}
a {color : gold }
[e] {font-weight : bold }
[s] {white-space : pre }
[t] {text-decoration : overline }
View .bash_prompt
YELLOW="\[\033[0;33m\]"
GRAY="\[\033[0;34m\]"
RESET="\033[0;00m"
if [ -z "$COMP_SYM" ]; then
COMP_SYM="♥"
fi
PS1="\n\! \[\`if [[ \$? = "0" ]]; then echo '\e[32m\h\e[0m'; else echo '\e[31m\h\e[0m' ; fi\`\]:\w$YELLOW"'`__git_ps1`'"$GRAY \@$RESET\n$COMP_SYM "
View release.sh
#!/bin/bash
set -e
cd component && git pull && cd ..
VERSION=`echo "console.log(require('./package').version)" | node`
script/update_version $VERSION
script/prepublish && script/test && script/standalone
@STRd6
STRd6 / spec.md
Last active Jun 14, 2017
Jadelet Spec
View spec.md

Hamlet Spec

Tags

Tags map directly to the DOM tag with that name. If the tag is omitted it is assumed to be a div.

h1
@STRd6
STRd6 / integration.coffee
Last active Aug 29, 2015
Using integration to solve greatest contiguous sum problem
View integration.coffee
integrate = (array) ->
total = 0
array.map (n) ->
total += n
zeros = (array) ->
array.reduce (zeros, n, i) ->
if !(array[i-1] > 0) and n > 0
zeros.push i
You can’t perform that action at this time.