This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SOURCES="satu::mod/ dua::mod/ tiga::mod/" | |
for src in $SOURCES; do | |
rsync -av $src dst/ && break | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Create thumbnails of a PDF file | |
# | |
# Author: Fajran Iman Rusadi <fajran@gmail.com> | |
# License: Public domain | |
# Requirements: poppler-utils imagemagick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# License: public domain | |
# Usage: ./donlod.sh http://www.megaupload.com/?d=id | |
WAIT=120 | |
#VIEWER=eog | |
VIEWER=open |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
while (<>) { | |
if (/^re.+p.$/) { # regex sudah menjadi bagian bahasa perl | |
print; # tidak terlihat jelas apa yang di-print | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// baca data dari data.txt (asumsinya udah ada) | |
$f = fopen('data.txt', 'rb'); | |
$data = ''; | |
while (!feof($f)) { | |
$data .= fread($f, 1024); | |
} | |
fclose($f); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Angka(object): | |
def __init__(self, nilai): | |
self.nilai = nilai | |
def berapa(self): | |
return self.nilai | |
satu = Angka(1) | |
print satu.berapa() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MetaProvinsi(type): | |
def __new__(cls, name, bases, attrs): | |
return type.__new__(cls, name, bases, attrs) | |
class Provinsi(object): | |
__metaclass__ = MetaProvinsi | |
class MetaKabupaten(type): | |
def __new__(cls, name, bases, attrs): | |
attrs['nama_kelas'] = name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QT = | |
TARGET = coba | |
SOURCES += main.cpp | |
INCLUDEPATH += /usr/include/mpich2 | |
LIBS += /usr/lib/libmpich.a |