(not so much the technical parts of the language)
ART + JS
| var whiteNoiseGen = function(){ | |
| var bufferSize = 4096; //Math.pow(2,13); //between 8 & 14 | |
| //make this a global var so it isnt garbage collected | |
| whiteNoise = context.createScriptProcessor(bufferSize, 0, 2); | |
| whiteNoise.onaudioprocess = function(e) { | |
| var outputBuffer = e.outputBuffer; | |
| for (var channel = 0; channel < outputBuffer.numberOfChannels; channel++) { | |
| var outputData = outputBuffer.getChannelData(channel); | |
| for (var i = 0; i < bufferSize; i++) { |
| int pingPin = 13; | |
| int inPin = 12; | |
| void setup() { | |
| Serial.begin(9600); | |
| } | |
| void loop() | |
| { | |
| // establish variables for duration of the ping, |
| ''' | |
| flask-tweepy-oauth | |
| an example showing how to authorize a twitter application | |
| in python with flask and tweepy. | |
| find the rest of the app here: https://github.com/whichlight/flask-tweepy-oauth | |
| ''' |
| //from http://www.codeproject.com/Articles/317974/KinectDepthSmoothing | |
| function smoothDepth(arr){ | |
| var res = createArray(width,height); | |
| for(var i=2; i< width-2; i++){ | |
| for(var j=2; j < height-2; j++){ | |
| if(arr[i][j]===0){ | |
| var innerBandCount = 0; | |
| var outerBandCount = 0; | |
| var filterCollection = []; |
| #!/bin/bash | |
| #the video recordings in my phone are in .3gp | |
| #so i wrote this to convert .3GP to .mp4 | |
| # | |
| #http://whichlight.com/blog/mobile-video-recording-convert-from-3gp-to-mp4/ | |
| LIST=`ls *.3gp` | |
| for i in $LIST; | |
| do ffmpeg -i $i -sameq -ab 64k -ar 44100 ${i%3gp}mp4 | |
| done |
| var button = "<a class="embedly-button" href="http://embed.ly/code" data-lang="Auto (Determined by Browser)">Embed</a><br/><script>!function(a){var b="embedly-platform",c="script";if(!a.getElementById(b)){var d=a.createElement(c);d.id=b,d.src=("https:"===document.location.protocol?"https":"http")+"://cdn.embedly.com/widgets/platform.js";var e=document.getElementsByTagName(c)[0];e.parentNode.insertBefore(d,e)}}(document);</script>"; var $button = jQuery('<div/>').html(button).text(); jQuery(".post-content").append($button) |
| // colorwheel demo for RGBmatrixPanel library. | |
| // Renders a nice circle of hues on a 32x32 RGB LED matrix. | |
| #include <Adafruit_GFX.h> // Core graphics library | |
| #include <RGBmatrixPanel.h> // Hardware-specific library | |
| // If your 32x32 matrix has the SINGLE HEADER input, | |
| // use this pinout: | |
| #define CLK 8 // MUST be on PORTB! | |
| #define OE 9 |
| if (Serial.available() > 0) { | |
| // get incoming byte: | |
| byteRead = Serial.read(); | |
| /*Listen for a comma which equals byte code # 44 */ | |
| if(byteRead==44){ | |
| data[counter] = String(serialDataIn); | |
| serialDataIn = String(""); | |
| counter = counter + 1; | |
| } | |
| else if(byteRead == 59){ |
| Installing the module, this comes up, but it still installs fine | |
| gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] | |
| CXX(target) Release/obj.target/kinect/src/kinect.o | |
| ../src/kinect.cc:1:1: warning: "BUILDING_NODE_EXTENSION" redefined | |
| <command-line>: warning: this is the location of the previous definition | |
| SOLINK_MODULE(target) Release/kinect.node | |
| ld: warning: in /usr/local/lib/libfreenect.dylib, file was built for unsupported file format which is not the architecture being linked (i386) | |
| SOLINK_MODULE(target) Release/kinect.node: Finished |