Skip to content

Instantly share code, notes, and snippets.

Fajran Iman Rusadi fajran

Block or report user

Report or block fajran

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ibvf.py
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)))
View kalkulator.py
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)
@fajran
fajran / Makefile
Created Dec 2, 2008
Cubes with OpenGL
View Makefile
CC = gcc -Wall
kubus: kubus.c
$(CC) kubus.c -o kubus -lGL -lGLU `sdl-config --cflags --libs`
View Makefile
all : debversion
test : all
./runtest.sh
View cube.cpp
#include <osg/Matrix>
#include <osgViewer/Viewer>
#include <osg/Geode>
#include <osg/Shape>
#include <osg/ShapeDrawable>
#include <osg/Vec3>
using namespace osg;
using namespace osgViewer;
View test_hmac_sha1.c
#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); }
}
View gist:68828
_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
View gist:68830
/*
* 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 {
View rsync2xferlog.py
#!/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
You can’t perform that action at this time.