I hereby claim:
- I am simonwex on github.
- I am simonwex (https://keybase.io/simonwex) on keybase.
- I have a public key whose fingerprint is 826E 80FB EBA6 7CEE 3C3F 3269 BE78 1F69 CC4F 0F5E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
A vanilla.js canvas confetti animation. Move the mouse to change direction.
A Pen by Secret Sam on CodePen.
<script type="text/javascript" src="https://towtruck.mozillalabs.com/application.js"></script> | |
... | |
<button onclick="TowTruck();"></button> |
<script type="text/javascript" src="https://towtruck.mozillalabs.com/application.js"></script> | |
... | |
<button onclick="TowTruck();"></button> |
def rebase(num, numerals="Zv0w2x4y6z8AaBcCeDgEiFkGmHoIqJsKuL3M7NbOfPjQnRrS1T9UhVpW5XlYdt"): | |
base = len(numerals) | |
left_digits = num // base | |
if left_digits == 0: | |
return numerals[num % base] | |
else: | |
return rebase(left_digits, numerals) + numerals[num % base] | |
>>> rebase(451) |
... | |
<script type="text/javascript" src="http://onscreen.vibesapps.com/javascripts/messageloop.js"></script> | |
... |
... | |
<script type="text/javascript" src="http://onscreen.vibesapps.com/javascripts/text2screen/1.0/text2screen.js"></script> | |
... |
var messageLoop = new MessageLoop(3); | |
messageLoop.push('a'); | |
messageLoop.push('b'); | |
messageLoop.push('c'); | |
console.log(messageLoop.pull()); | |
// -> "c" | |
console.log(messageLoop.pull()); | |
// -> "b" | |
console.log(messageLoop.pull()); |
Text2Screen.configure({ | |
messageHandler: function(message){ | |
//Do something with the message. | |
Text2Screen.readyForMore(); | |
}, | |
states: ['intro', 'call_to_action', 'display'], | |
transitions: { | |
enterIntro: function(){ | |
// run some animations | |
}, |
... | |
Text2Screen.configure({ | |
messageHandler: function(message){ | |
var list = $('ul'); | |
list.append("<li>" + message.message + "</li>"); | |
Text2Screen.readyForMore(); | |
} | |
}); | |
... |