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
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active November 16, 2024 18:12
set -e, -u, -o, -x pipefail explanation
@singledigit
singledigit / cognito.yaml
Last active August 14, 2024 09:14
Create a Cognito Authentication Backend via CloudFormation
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
# Creates a role that allows Cognito to send SNS messages
SNSRole:
@STRd6
STRd6 / .bash_prompt
Created October 2, 2014 17:51
.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 "
@STRd6
STRd6 / recursive-selection.md
Last active October 18, 2019 19:47
Weird Ideas

Recursive Selection

What would a recursive selection tool look like in a pixel editor?

One should be able to draw fractals using it.

destructuring_assignment_for_named_local_args() {
declare numbers letters words
read numbers letters words <<<"$@"
echo "$numbers"
echo "$letters"
echo "$words"
}
destructuring_assignment_for_named_local_args 123 abc "Hello world"
@CanastaNasty
CanastaNasty / gist:6577771
Created September 16, 2013 07:58
Self-hosting, livecoding HTML IDE in a little over half a tweet.
<div></div><textarea onkeyup=this.previousSibling.innerHTML=this.value></textarea>
@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
@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;
@kumavis
kumavis / gist:5703920
Last active December 18, 2015 01:29
An attempt at browserifying npm

This project:

  1. is a case-study for browserifying anything
  2. part of a dream to create virtual Node.js development environment
  3. likely a major time-sink!

starting out:

mkdir browser-npm && cd browser-npm
npm install npm