Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# Create thumbnails of a PDF file
#
# Author: Fajran Iman Rusadi <fajran@gmail.com>
# License: Public domain
# Requirements: poppler-utils imagemagick
#!/bin/sh
SOURCES="satu::mod/ dua::mod/ tiga::mod/"
for src in $SOURCES; do
rsync -av $src dst/ && break
done
TLP_HOME=/home/iang/apps/tulip-3.1.0
CXXFLAGS=-I$(TLP_HOME)/include
LIBS=-L$(TLP_HOME)/lib -ldl -ltulip
all : to-tulip
to-tulip : to-tulip.cc
g++ -o $@ $? $(CXXFLAGS) $(LIBS)
#!/usr/bin/env python
# Converts rsync log format to xferlog format
# Author: Fajran Iman Rusadi <fajran|ubuntu.com>
# License: Public Domain
import re
import sys
from datetime import datetime
@fajran
fajran / gist:68830
Created February 23, 2009 06:30
Mari joged
/*
* gambar ditulis di background: url()
* lebar (width) dan tinggi (height) disesuaikan lagi agar sesuai dg ukuran gambar
*
* cit ini sudah dites sukses di firefox 3.0.6, safari 3.2.1, dan opera 9.52
* ie? masih ada yg make ya? http://getfirefox.com sekarang juga!
*
*/
#dash-stats h3 {
_sedot_pkgs()
{
local cur prev opts base
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
pkgs=$(ls -d /mirror/sedot/pkgs/*/ | while read a; do basename $a; done)
COMPREPLY=($(compgen -W "${pkgs}" -- ${cur}))
return 0
#include <openssl/hmac.h>
#include <openssl/sha.h>
#include <string.h>
#include <stdio.h>
inline char tohex(char c)
{
if ((c >= 0) && (c <= 9)) { return '0' + c; }
else { return 'a' + (c-10); }
}
#include <osg/Matrix>
#include <osgViewer/Viewer>
#include <osg/Geode>
#include <osg/Shape>
#include <osg/ShapeDrawable>
#include <osg/Vec3>
using namespace osg;
using namespace osgViewer;
all : debversion
test : all
./runtest.sh
@fajran
fajran / igv.py
Created December 5, 2008 08:34
Interactive Graph Visualization with Jython and Prefuse
from prefuse import *
from prefuse.render import *
from prefuse.action import *
from prefuse.action.assignment import *
from prefuse.action.layout import *
from prefuse.action.layout.graph import *
from prefuse.controls import *
from prefuse.visual import *
from prefuse.util import *
from prefuse.util.display import *