Skip to content

Instantly share code, notes, and snippets.

View tangert's full-sized avatar
🐢
turtles all the way down

Tyler Angert tangert

🐢
turtles all the way down
View GitHub Profile
int numFrames = 100;
PVector field(float x,float y){
float amount = 2.5;
float scale = 0.03;
float radius = 0.45;
double value1 = 400.0*noise.eval(scale*x,scale*y,radius*cos(TWO_PI*1.0*(frameCount-1)/numFrames),radius*sin(TWO_PI*1.0*(frameCount-1)/numFrames));
double value2 = 400.0*noise.eval(1000+scale*x,scale*y,radius*cos(TWO_PI*1.0*(frameCount-1)/numFrames),radius*sin(TWO_PI*1.0*(frameCount-1)/numFrames));
//int value2 = (int) Math.round(value);
float parameter1 = (int) Math.round(value1)/100.0;
@primaryobjects
primaryobjects / react-confirm.js
Created November 1, 2017 19:03
A simple example of a confirm alert dialog in ReactJs / React.
<div className='delete-button' onClick={() => { if (window.confirm('Are you sure you wish to delete this item?')) this.onCancel(item) } } />

Advanced JavaScript Learning Resources

This is a list of advanced JavaScript learning resources from people who responded to this [Tweet][13] and this [Tweet][20].

  • [You Don't Know JS][3]

  • [Frontend Masters courses by Kyle Simpson][12]

  • [@mpjme][6]'s [YouTube videos][5]

@cvan
cvan / post-symbolic-communication-in-vr.md
Created May 9, 2017 00:12
"Post-symbolic communication" in Virtual Reality (from "You Are Not a Gadget")

"Post-symbolic communication" in Virtual Reality

I've selected a few important passages from Jaron Lanier's 2010 book, You Are Not a Gadget (pages 123-125) that speak specifically to "post-symbolic communication" in Virtual Reality (and the inspiration: cephalopods and neoteny).

The problem is that in order to morph in virtual reality, humans must design morph-ready avatars in laborious detail in advance.

We can learn to draw and paint, or use computer graphics design software, but we cannot generate images at the speed with which we can imagine them.

Suppose we had the ability to morph at will, as fast as we can think.

@jonlabelle
jonlabelle / windows_to_unix_command_cheat_sheet.md
Last active November 11, 2024 11:11
Windows to UNIX Command Cheat Sheet

Windows to UNIX Command Cheat Sheet

Windows PowerShell has several transition aliases that allow UNIX and CMD users to use familiar command names in Windows PowerShell. The most common aliases are shown in the table below, along with the Windows PowerShell command behind the alias and the standard Windows PowerShell alias if one exists.

CMD Command UNIX Command PowerShell Command PowerShell Alias
dir ls Get-ChildItem gci
@jannecederberg
jannecederberg / formspree.html
Last active November 4, 2022 12:26 — forked from manfromanotherland/formspree.html
JS: Ajax send forms using the most excellent Formspree » http://formspree.io #snippet
<form id="contact-form" action="//formspree.io/[email protected]" method="post">
<input type="text" name="Name" placeholder="Name" required>
<input type="email" name="Email" placeholder="Email" required>
<textarea name="Message" cols="30" rows="6" placeholder="Message" required></textarea>
<!-- CONFIG -->
<input class="is-hidden" type="text" name="_gotcha">
<input type="hidden" name="_subject" value="Subject">
<input type="hidden" name="_cc" value="[email protected]">
<!-- /CONFIG -->
<input class="submit" type="submit" value="Send">
@wliwanag
wliwanag / Highlighter.js
Last active March 29, 2020 15:12
Highlight Substring From Html / Text Source
//NOTES: Requires Jquery - version 2.2.0 was used during development but may work on earlier version
// Add style by defining highlight class
/*Searh text highlighter*/
$highlighter = (function(){
function highlightHtml(source, searchInput) {
var node = $.type(source) == "object" ? source : $($.parseHTML("<div>" + source + "</div>"));
if (node.children().length > 0) {
//wrap the text contents with a span
@jonobr1
jonobr1 / auto-capture.scpt
Last active September 6, 2024 19:20
A small AppleScript to take a screenshot every 30 seconds for 8 hours. Saves to an Image Sequence in a desktop folder. Great for recording your workday.
set dFolder to "~/Desktop/screencapture/"
do shell script ("mkdir -p " & dFolder)
set i to 0
repeat 960 times
do shell script ("screencapture " & dFolder & "frame-" & i & ".png")
delay 30 -- Wait for 30 seconds.
set i to i + 1
end repeat
@cmackay
cmackay / gist:5863257
Last active November 2, 2024 17:41
AppleScript to save and restore window position and sizes.
-- allSettings is a list of records containing {width:? height:? apps:{{name:? pos:? size:?},...}
-- for each display setup store the apps and their associated position and size
property allSettings : {}
-- create a variable for the current settings
set currentSettings to {}
display dialog "Restore or save window settings?" buttons {"Restore", "Save"} default button "Restore"
set dialogResult to result
@adamwiggins
adamwiggins / adams-heroku-values.md
Last active November 5, 2024 21:40
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style