Skip to content

Instantly share code, notes, and snippets.

View tmn's full-sized avatar
🐢
Bip bop bip bop

Tri Nguyen tmn

🐢
Bip bop bip bop
View GitHub Profile
@tmn
tmn / ntnui.html
Last active December 20, 2015 18:28
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>Futsal</title>
<style>
ul { width: 200px; margin: 0 auto; text-align: left; }
#container { text-align: center; }
</style>
@tmn
tmn / futsal.html
Created August 7, 2013 17:20
NTNUI Futsal
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>Futsal</title>
<style>
html, body, div, span, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, img, strong, b, u, i, center, dl, dt, dd, ol, ul, li,
@tmn
tmn / settings.rb
Last active January 1, 2016 06:29
c.plugins.options = {}
Dir["./lib/data/*.settings.rb"].each {
|file| eval( File.open(file, "rb").read ).each do |key, val|
c.plugins.options[key] = val
end
}
{
Cinch::Plugins::Lastfm => {
:api_key => '123abc'
}
}
@tmn
tmn / Person.java
Last active August 29, 2015 13:56
public class Person {
private String name;
private Person mother;
private Person father;
// mer ting her....
public Person(String name) {
this.name = name;
}
@tmn
tmn / stops.pl
Created February 19, 2014 11:45
sub convertLon {
my $lon = sprintf "%.6f", ((shift) / (2 * pi * 6378137 / 2)) * 180;
}
sub convertLat {
my $lat = ((shift) / (2 * pi * 6378137 / 2)) * 180;
$lat = sprintf "%.6f", 180 / pi * (2 * atan(exp($lat * pi / 180)) - pi / 2);
}
@tmn
tmn / Card.java
Last active August 29, 2015 13:56
public class Card implements Comparable<Card> {
int number;
char type;
public Card (int number, char type){
this.number = number;
this.type = type;
}
public int getNumber() {
if (this.value) {
if (card1.getNumber() == 1) {
card1.setNumber(14);
}
if (card1.getNumber() == 1) {
card2.setNumber(14);
}
}
@tmn
tmn / test.js
Last active August 29, 2015 13:57
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "test.xml", false);
xmlhttp.send();
xmlDoc = xmlhttp.responseXML;
var root = xmlDoc.firstChild;
var children = root.children;
public class Bsu extends SavingsAccount {
double maxDeposite;
public Bsu (double maxDeposite) {
this.maxDeposite = maxDeposite;
}
// setters and getts ++ ...
@Override