[ Launch: donut example ] 8654015 by gerred
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style>body { text-align: center; } canvas { border: 1px solid black; margin: auto;}</style> | |
</head> | |
<body> | |
<canvas id="canvas" width="500" height="500"></canvas> | |
<script> | |
var canvas = document.getElementById("canvas"), | |
context = canvas.getContext('2d'); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var helpers = { | |
getMouse: function(e, canvas) { | |
return { | |
x: e.pageX - canvas.offsetLeft, | |
y: e.pageY - canvas.offsetTop | |
} | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style>body { text-align: center; } canvas { border: 1px solid black; margin: auto;}</style> | |
</head> | |
<body> | |
<canvas id="canvas" width="500" height="500"></canvas> | |
<div> | |
X: | |
<span id="xPos"></span> | |
Y: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Put this file in Program Files\Adobe\Photoshop\Presets\Scripts\ | |
// In PhotoShop menu File > Automate > Scripts: layersToSprite.js | |
// Arrange layers into a sprite sheet. | |
if (documents.length > 0) | |
{ | |
// -------------------------- | |
docRef = activeDocument; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canvas = document.createElement("canvas") | |
var context = canvas.getContext("2d") | |
canvas.width = window.innerWidth | |
canvas.height = window.innerHeight | |
context.drawWindow(window, 0, 0, window.innerWidth, window.innerHeight, "rgb(255,255,255)") | |
var image = canvas.toDataURL('image/jpeg', 0.2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HEART='♥' | |
if [[ `uname` == 'Linux' ]]; then | |
current_charge=$(cat /proc/acpi/battery/BAT1/state | grep 'remaining capacity' | awk '{print $3}') | |
total_charge=$(cat /proc/acpi/battery/BAT1/info | grep 'last full capacity' | awk '{print $4}') | |
else | |
battery_info=`ioreg -rc AppleSmartBattery` | |
current_charge=$(echo $battery_info | grep -o '"CurrentCapacity" = [0-9]\+' | awk '{print $3}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'clicks.json' -> IN Read(ReadFile) OUT -> IN Split(SplitStr) | |
Split() OUT -> IN Count(Counter) COUNT -> IN Display(Output) | |
Read() ERROR -> IN Display() | |
/Users/gerred/dev/clicks_parser_noflo/node_modules/noflo/lib/Port.js:112 | |
throw new Error("" + (this.getId()) + ": No connection available"); | |
^ | |
Error: Count OUT: No connection available | |
at Port.disconnect (/Users/gerred/dev/clicks_parser_noflo/node_modules/noflo/lib/Port.js:112:15) | |
at Port.<anonymous> (/Users/gerred/dev/clicks_parser_noflo/node_modules/noflo-packets/components/Counter.coffee:37:28) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = require 'fs' | |
noflo = require 'noflo' | |
split = require 'split' | |
class ReadFileStream extends noflo.Component | |
constructor: -> | |
@inPorts = | |
in: new noflo.Port() | |
@outPorts = | |
out: new noflo.Port() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDqStGVPDHXIuiG1tv2SCMHOeg/ka1df3AXyoucsudmTxS7AwftXv1d1NBeYE+2uyTZQ6dBf4hCEiKLjo5OW+8sY8uR/4XRraShUY0uw9FfJVmh4PlUSiyqC2baypLCOgv4GuMVyehNz+B+dcCZzwShEgq/lkXYcSHkh82yoPxlStZmZOurCYZNuBa5yWuJ+NKmoDYl8+vxds1NI9gsdyu6RhJuG3UFEaf1YQ/Tc00DvJ7qfSc0PYynYEScdr1Bs6kJtTMVTeqUcC5iOq3OFPcJ4rj6+cXsgzdlyG6EYePjsoc/V0jxVqoMpg7+JkFzeGdCQ4N+WCLpniKROGWZHK19 [email protected] |