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
@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
@STRd6
STRd6 / rename.js
Created December 5, 2013 21:09
Rename function in JS
var f, rename, renamedFunction;
rename = function(fn, name) {
return Function("fn", "return (function " + name + "(){\n return fn.apply(this, arguments)\n});")(fn);
};
f = function() {};
renamedFunction = rename(f, "a_new_name");
// Created by STRd6
// MIT License
// jquery.paste_image_reader.js
(function($) {
var defaults;
$.event.fix = (function(originalFix) {
return function(event) {
event = originalFix.apply(this, arguments);
if (event.type.indexOf('copy') === 0 || event.type.indexOf('paste') === 0) {
event.clipboardData = event.originalEvent.clipboardData;
<meta charset="utf-8">
<style >*{
margin
:0;}
a {color : gold }
[e] {font-weight : bold }
[s] {white-space : pre }
[t] {text-decoration : overline }
@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.

Hello this is a test
@STRd6
STRd6 / spec.md
Last active June 14, 2017 23:07
Jadelet Spec

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

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 June 13, 2016 17:19
Make requests to the Heroku API from the browser. Note accept and authorization headers.
APIGenerator = require "./api_generator"
{extend} = require "../source/util"
module.exports = (ajax) ->
requester = (path, options={}) ->
options = extend
url: path
method: "GET"
dataType: "json"
_____.___.      .__          _________            .__        __
\__  |   | ____ |  |   ____ /   _____/ ___________|__|______/  |_
 /   |   |/  _ \|  |  /  _ \\_____  \_/ ___\_  __ \  \____ \   __\
 \____   (  <_> )  |_(  <_> )        \  \___|  | \/  |  |_> >  |
 / ______|\____/|____/\____/_______  /\___  >__|  |__|   __/|__|
 \/                                \/     \/         |__|

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