Skip to content

Instantly share code, notes, and snippets.

View eddyyanto's full-sized avatar
🎯
Focusing

Eddy Yanto eddyyanto

🎯
Focusing
View GitHub Profile
@eddyyanto
eddyyanto / build-pocketvj.md
Created April 16, 2019 14:25 — forked from baydam/build-pocketvj.md
How to build PocketVJ on Raspberry Pi 3

Documentation for building PocketVJ on raspberry Pi 3

Install Raspbian Lite

Find the instruction in the link below https://www.raspberrypi.org/documentation/installation/installing-images/README.md

Install dependencies

$ sudo apt-get -y install lxde-core lxterminal lxappearance xinit lightdm ntfs-3g python-pexpect vim figlet git-core firmware-ralink hostapd isc-dhcp-server lighttpd samba samba-common-bin php5-common php5-cgi php5 php5-mysql screen fbi ttf-mscorefonts-installer mediainfo gparted php5-cli iptables xtightvncviewer imagemagick dosfstools exfat-utils exfat-fuse hfsplus hfsprogs hfsutils xdotool expect expect-dev avahi-daemon libavahi-compat-libdnssd-dev feh libjpeg8 libjpeg8-dev libao-dev avahi-utils libavahi-compat-libdnssd-dev libva-dev youtube-dl python-smbus mpg321 mpg123 libreoffice-impress rc-gui python-pip iceweasel python-dev python-dbus xpdf x11-xserver-utils libncurses5-dev shellinabox tk okular usbmount libgstreamer0.10-0 libgstreamer0.10-dev gstreamer0.10-tools gstr
@eddyyanto
eddyyanto / dual-screen.pde
Created January 27, 2012 06:28
Implementing dual screen on Processing
//snippet taken from http://processing.org/discourse/yabb2/YaBB.pl?board=Syntax;action=display;num=1185318989
import processing.opengl.*;
PImage displayBg, touchBg;
void setup() {
size(2560, 1024, OPENGL);
frameRate(30);
smooth();
@eddyyanto
eddyyanto / colorbox.js
Created January 16, 2012 12:53
Colorbox multi lines caption hack.
$(document).bind('cbox_complete', function(){
//get title and hide the default element
var cDescription = $('#cboxTitle').text();
$('#cboxTitle').hide();
$('#cboxTitle').offset({top: 0, left: 0});
if(cDescription.length > 0){
$('<div class="cboxTitle" style="z-index:9999;">' + cDescription + '</div>').insertAfter('#colorbox');
//find the position of colorbox and inject the title below it
var cPosition = $('#colorbox').position();
@eddyyanto
eddyyanto / nodejs.conf
Created September 29, 2011 12:59
nodejs upstart script
author "Eddy"
description "Nodejs upstart script"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
respawn
respawn limit 99 5
@eddyyanto
eddyyanto / socket.js
Created August 19, 2011 10:07
Socket connection in Titanium
var connectSocket = Ti.Network.Socket.createTCP({
host: '10.1.100.86',
port: 3040,
connected: function(e) {
Ti.API.info("Socket <" + e.socket + "> connected to host <" + e.socket.host + ">");
try {
// write some data
var outData = Ti.createBuffer({value:"gotoControlCue winter\n"});
var bytesWritten = connectSocket.write(outData);
Ti.API.info("<" + bytesWritten + "> bytes written to socket");
@eddyyanto
eddyyanto / processing.arduino.pde
Created May 24, 2011 09:35
Communication between Processing and Arduino
/*
* Dependencies : Processing-Arduino library
* References : http://processing.org/reference/libraries/video/index.html
* http://www.arduino.cc/playground/Interfacing/Processing
*/
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
@eddyyanto
eddyyanto / search-replace.sql
Created May 23, 2011 03:22
Search and Replace in MySQL
UPDATE table_name SET column_name = replace(column_name,"find_this","replace_with_this");
--http://www.torkiljohnsen.com/2006/07/24/search-and-replace-in-mysql/
@eddyyanto
eddyyanto / gist:970134
Created May 13, 2011 07:24
MySQL Snippet
Database dump :
mysqldump -u root -p database > database.sql
@eddyyanto
eddyyanto / gist:947847
Created April 29, 2011 04:42
Overriding view logic class using plugin
<?php
class plgSystemAcyFieldExtend extends JPlugin {
public function __construct(&$subject, $config = array()) {
parent::__construct($subject, $config);
}
public function onAfterRoute() {
$app = JFactory::getApplication();
if('com_acymailing' == JRequest::getCMD('option') && !$app->isAdmin()) {
require_once(dirname(__FILE__) . DS . 'archive.view.html.php');
}
SUMMARY="Summary"