Skip to content

Instantly share code, notes, and snippets.

View mataspetrikas's full-sized avatar
🤔
busy busy

Matas Petrikas mataspetrikas

🤔
busy busy
View GitHub Profile
package com.soundcloud.player.api {
import flash.events.Event;
/**
* @author matas
*/
public class PlayerAPIEvent extends Event {
private var _data : Object;
//onPlayerReady an event fired when the player is ready for playback
package com.soundcloud.player.api {
import flash.events.Event;
/**
* @author matas
*/
public class PlayerAPIEvent extends Event {
private var _data : Object;
//onPlayerReady an event fired when the player is ready for playback
@mataspetrikas
mataspetrikas / mp3 to aac on a Mac
Created September 9, 2010 08:10
a quick and simple way to transcode your mp3's to aac
for f in *.mp3; do echo "processing $f..."; afconvert -fv mp4f -d aac -b 64000 "$f"; echo "done"; done; echo "finished"
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title>
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
var extractToken = function(hash) {
@mataspetrikas
mataspetrikas / Infinite Draught
Created September 2, 2010 15:43
Processing: Infinite Draught
// Global variables
int X, Y;
int nX, nY;
int delay = 10;
// Setup the Processing Canvas
void setup() {
size( 800, 600 );
smooth();
strokeWeight(1);
@mataspetrikas
mataspetrikas / continuous array loop
Created September 1, 2010 15:26
simple continuous loop over array
// continuous loop over array pseudo-code example
var index = 0;
var arr = [1,2,3,4];
// once the step is done, let's jump to the next one
if(nextStep){
index = (index + 1) % arr.length;
}
@mataspetrikas
mataspetrikas / Babel Tower
Created August 18, 2010 18:53
Processing: Babel Tower
ArrayList points;
int progress = 2;
void setup() {
size(1200, 800);
background(250);
smooth();
frameRate(5);
points = new ArrayList();
points.add(new Point(width/2, height*0.45));
@mataspetrikas
mataspetrikas / the pointer grow
Created August 18, 2010 18:22
Processing: The Pointer Grow
ArrayList points;
int progress = 2;
void setup() {
size(1200, 800);
background(250);
smooth();
frameRate(5);
points = new ArrayList();
points.add(new Point(width/2, height*0.45));
@mataspetrikas
mataspetrikas / Your Hair for Me 03
Created August 17, 2010 17:24
Processing: Your Hair for Me 03
void setup() {
size(1000, 715);
background(255);
smooth();
}
void draw() {
stroke(0,random(10,16));
noFill();
beginShape();
@mataspetrikas
mataspetrikas / Your Hair for Me
Created August 17, 2010 12:29
Processing: Your Hair for Me
void setup() {
size(1000, 715);
background(255);
smooth();
}
void draw() {
stroke(0,random(10,16));
noFill();
beginShape();