Skip to content

Instantly share code, notes, and snippets.

View arisetyo's full-sized avatar
💭
To live is to create. And to create is immortality.

Arie M. Prasetyo arisetyo

💭
To live is to create. And to create is immortality.
View GitHub Profile
@arisetyo
arisetyo / get.py
Created January 7, 2014 03:01
Using Python ElasticSearch Client
from elasticsearch import Elasticsearch
es = Elasticsearch()
res = es.get(index="belajar", doc_type='pesan', id=1)
print(res['_source'])
@arisetyo
arisetyo / drawline.js
Created October 5, 2013 02:20
Drawing a spectrum analyzer using Raphael.js
function drawSpectrum() {
//RESET
paper.clear();
var array = new Uint8Array(analyser.frequencyBinCount);
analyser.getByteFrequencyData(array);
audioAnimation = requestAnimationFrame(drawSpectrum);
var SPECTRUMLine = "";
@arisetyo
arisetyo / pixi_spritesheet.html
Created October 5, 2013 01:17
Using spritesheets with pixi.js
<!DOCTYPE HTML>
<html>
<head>
<title>spritesheet</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
background-color: #000000;
}
@arisetyo
arisetyo / spectrum.html
Created July 14, 2013 13:25
Spectrum Analyzer Using webkitAudioContext
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Galenic">
<title>Spectrum</title>
</head>
<body>
@arisetyo
arisetyo / index.html
Created July 12, 2013 16:37
Dynamic Real-time Chart Using Chart.js, Socket.io, and Knockout.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Galenic">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/knockout-2.1.0.js"></script>
<script src="js/Chart.js"></script>
<link rel="stylesheet" href="pure-min.css">
@arisetyo
arisetyo / index.html
Created July 9, 2013 15:51
Using Chart.js, Knockout.js, and jQuery for a chart with dynamic data
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery-1.9.1.js"></script>
<script src="js/knockout-2.1.0.js"></script>
<script src="js/Chart.js"></script>
</head>
<body>
<div>
@arisetyo
arisetyo / index.html
Created July 9, 2013 15:29
Setting up Chart.js line chart, with Knockout.js
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery-1.9.1.js"></script>
<script src="js/knockout-2.1.0.js"></script>
<script src="js/Chart.js"></script>
</head>
<body>
<div>
@arisetyo
arisetyo / index.html
Created July 4, 2013 16:33
Basic chat using Node, Express, Socket.io, & Knockout.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Galenic">
<script src="js/knockout-2.1.0.js"></script>
<link rel="stylesheet" href="pure-min.css">
<link rel="stylesheet" href="custom.css">
<title>Node Showcase</title>
@arisetyo
arisetyo / getBitmapFromLoader.as
Created January 7, 2013 08:48
get bitmap data from Loader
var bmpData:BitmapData;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,doneImageLoad);
loader.load(new URLRequest("https://graph.facebook.com/"+fbID+"/picture?type=large"));
function doneImageLoad(e:Event=null):void {
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,doneImageLoad);
bmpData = e.target.content.bitmapData;
}
@arisetyo
arisetyo / GameState.as
Created January 3, 2013 05:16
getting started with Citrus Engine
package {
import Box2D.Dynamics.Contacts.b2Contact;
import citrus.core.StarlingState;
import citrus.objects.platformer.box2d.Coin;
import citrus.objects.platformer.box2d.Enemy;
import citrus.objects.platformer.box2d.Hero;
import citrus.objects.platformer.box2d.MovingPlatform;
import citrus.objects.platformer.box2d.Platform;