Skip to content

Instantly share code, notes, and snippets.

@lewtds
lewtds / PKGBUILD
Created September 26, 2012 10:54
Arch Linux packaging for BoGoEngine (Git)
# Contributor: Nguyen Ha Duong <cmpitg@gmail.com>
# Contributor: Ngo Trung <ndtrung4419@gmail.com>
# Contributor: Dam Tien Long <longdt90@gmail.com>
pkgname="ibus-bogo-git"
pkgver=20121114
pkgrel=2
pkgdesc="Bogo Engine for Ibus"
arch=('i686' 'x86_64')
@lewtds
lewtds / gist:3838752
Created October 5, 2012 08:29
Transcription for the "In the unlikely event..." video from CollegeHumor.

Link: http://www.youtube.com/watch?feature=endscreen&NR=1&v=4BuOlKZ_C2k

Evening passengers of the flight 114, this is your pilot speaking. We're approaching some rough weather pattern ahead. Expect some turbulence. So please look to the front of the plane while our flight attendants help us go over some air safety tips, once again.

Everyone please make sure your seat belts are securely and properly fastened. Please note that in case of a water landing, your seats can be used as a floatation device. However, in the unlikely event that we crash-land in a moun'ain, we will ask that you please refrain from resorting to cannibalism. We have plenty of food to last all of us through the winter. However, in the unlikely event that it takes more than a few months for us to be rescued, we have prepared a lottery system for deciding whom to eat. Passengers will be selected one at a time from economy class, starting from the fatests. They will be flayed and served to the passengers in the first class. This will continu

@lewtds
lewtds / passwd.c
Created October 23, 2012 08:44
Chin's password test
// Chin
#include <string.h>
#include <stdio.h>
#define MAX_LEN 10
int fread_string(FILE *in, char out[], size_t len)
{
// TODO investigate further this len thing
@lewtds
lewtds / html_gui.py
Created October 23, 2012 09:31
HTML GUI demo
#/usr/bin/env python
from gi.repository import Gtk, WebKit
gui = """
<html>
<head>
<script>
function on_click() {
var title = prompt("WTF?");
@lewtds
lewtds / gist:3943662
Created October 24, 2012 04:02
Note AFC 21/10/2012

Note họp AFC 21/10/2012

Thành phần tham dự:

  • Chin (L2 08-11)
  • Hiệp (11IT)
  • Duong Nghiem (11IT)
  • Phạm Thọ Hồng Dương (Nga 08-11)
  • Anh Nguyễn Hà Dương, cựu Amser IT, hiện đang là nhân sự cao cấp ở công ty iWay cùng một số công ty khác và hoạt động rất mạnh trong cộng đồng FOSS.
@lewtds
lewtds / gist:3943706
Created October 24, 2012 04:07
Họp AFC 10/10/2012

Thành phần tham dự:

  • Ngô Trung
  • Kin
  • Đức Hiệp
  • Duong Nghiem
  • Quyết
  • A Len
  • Nam Nguyen (guest)
@lewtds
lewtds / case.c
Created November 2, 2012 07:13
EOF
#include <stdio.h>
#include <ctype.h>
int main() {
int c;
while ((c = getchar()) != EOF) {
putchar(toupper(c));
}
return 0;
}

##Hello

I want to say something but I don't remember what I was about to say.

@lewtds
lewtds / gist:4105784
Created November 18, 2012 15:20
Họp AFC 18/11/2012

Note họp AFC 21/10/2012

Thành phần tham dự:

  • Chin
  • Đức Hiệp
  • Đức Anh
  • Phạm Thọ Hồng Dương
  • Anh Đàm Tiến Long (Lờ Ong)

Buổi gặp mặt lần này tập trung chủ yếu vào việc giới thiệu ngôn ngữ lập trình Python

@lewtds
lewtds / gist:4106473
Created November 18, 2012 17:42
Python Quick Start