Skip to content

Instantly share code, notes, and snippets.

View STRd6's full-sized avatar
🍑
https://whimsy.space

Daniel X Moore STRd6

🍑
https://whimsy.space
View GitHub Profile
var o =
{ a : "ape"
, b : "bat"
, c : "cat"
, d : "dog"
, e : "elf"
, f : "fly"
, g : "gnu"
, h : "hat"
, i : "ibu"
@STRd6
STRd6 / TODO
Last active January 28, 2023 08:26
Self hosting gist editor.
TODO
----
Save back to repo from gh-pages demo build
Handle folders in repos
Live Update Demo
- Display Demo Runtime Errors in console
Persist state across demo reloads
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
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 "
@STRd6
STRd6 / build.js
Last active December 19, 2015 21:08
(function() {
var _base;
this.HAMLjr || (this.HAMLjr = {});
(_base = this.HAMLjr).templates || (_base.templates = {});
this.HAMLjr.templates["template"] = function(data) {
return (function() {
var __attribute, __each, __element, __filter, __on, __pop, __push, __render, __text, __with, _ref;
tickets: [
{name: "None", price: null}
{name: "Economy", price: 199.95}
{name: "Business", price: 449.22}
{name: "First Class", price: 1199.99}
]
chosenTicket: Observable()
resetTicket: ->
@chosenTicket(@tickets[0])
@STRd6
STRd6 / cors.xml
Last active December 19, 2015 13:29
Using Amazon S3 as a content addressable store.
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Content-*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
@STRd6
STRd6 / model.coffee
Last active December 19, 2015 09:49
tickets: [
{name: "None", price: null}
{name: "Economy", price: 199.95}
{name: "Business", price: 449.22}
{name: "First Class", price: 1199.99}
]
chosenTicket: Observable()
resetTicket: ->
@chosenTicket(@tickets[0])
_____.___.      .__          _________            .__        __
\__  |   | ____ |  |   ____ /   _____/ ___________|__|______/  |_
 /   |   |/  _ \|  |  /  _ \\_____  \_/ ___\_  __ \  \____ \   __\
 \____   (  <_> )  |_(  <_> )        \  \___|  | \/  |  |_> >  |
 / ______|\____/|____/\____/_______  /\___  >__|  |__|   __/|__|
 \/                                \/     \/         |__|

YoloScript is a stupid little language with functions, objects, and messages.

@STRd6
STRd6 / sh.coffee
Created June 27, 2013 18:34
Like Rake's sh
{print} = require('sys')
{exec} = require('child_process')
sh = (cmd, fn=->) ->
print cmd
exec cmd, (error, stdout, stderr) ->
print(stdout)
if error