Skip to content

Instantly share code, notes, and snippets.

from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
import sys
import random
from math import cos, pi, sqrt
NPN = 32
NMESH = 50
DM = ((float) (1.0/(NMESH-1.0)))
class Kalkulator:
def __call__(self, fungsi, a, b):
if fungsi == 'tambah':
return self.tambah(a, b)
if fungsi == 'kurang':
return self.kurang(a, b)
if fungsi == 'kali':
return self.kali(a, b)
all : debversion
all : debversion
test : all
./runtest.sh
#include <osg/Matrix>
#include <osgViewer/Viewer>
#include <osg/Geode>
#include <osg/Shape>
#include <osg/ShapeDrawable>
#include <osg/Vec3>
using namespace osg;
using namespace osgViewer;
#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); }
}
_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
@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 {
#!/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
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)