Skip to content

Instantly share code, notes, and snippets.

class Vehicle
drive: ->
alert "The vehicle moves forward!"
class Motorcyle extends Vehicle
drive: ->
alert "The Motorcyle moves forward!"
class Car extends Vehicle
drive: ->
@nazt
nazt / LICENSE.txt
Created September 28, 2011 11:05 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
<html>
<head>
<title>Warn voyage :: ระบบแจ้งเตือนสำหรับผู้ใช้มือถือระบบปฏิบัติการ Android</title>
<meta http-equiv="Content-Type" content="text/html; charset= utf-8"></head>
<body>
<?php
$objConnect = mysql_connect("localhost","thanapor_bus","busproject") or die("Error Connect to Database");
$objDB = mysql_select_db("thanapor_bus");
mysql_query("SET NAMES UTF8");
$strSQL = "select * from placeinfo where flag = 1";
<html>
<head>
<title>Warn voyage :: ระบบแจ้งเตือนสำหรับผู้ใช้มือถือระบบปฏิบัติการ Android</title>
<meta http-equiv="Content-Type" content="text/html; charset= utf-8"></head>
<body>
<?php
$objConnect = mysql_connect("localhost","thanapor_bus","busproject") or die("Error Connect to Database");
$objDB = mysql_select_db("thanapor_bus");
mysql_query("SET NAMES UTF8");
$strSQL = "select * from placeinfo where flag = 1";
@nazt
nazt / fbphoto.lua
Created December 19, 2011 04:51
Facebook Photo Uploading with Corona SDK
local facebook = require "facebook"
-- You must use your own app id for this sample to work
local fbAppID = "123456789abcdefghi" --fake
local function onLoginSuccess()
-- Upload 'iheartcorona.jpg' to current user's account
local attachment = {
message = "Just a description of the photo.",
source = { baseDir=system.ResourceDirectory, filename="iheartcorona.jpg", type="image" }
@nazt
nazt / hh.js
Created July 5, 2012 09:52 — forked from anonymous/gist:3052686
hh.js
// Global variables
var canvas = document.getElementById('stage');
var badGuesses = 0;
// Draw the canvas
function drawCanvas() {
var c = canvas.getContext('2d');
// reset the canvas and set basic styles
/// 1
db.open(function (err, client) {
client.createCollection("docs", function (err, col) {
client.collection("docs", function (err, col) {
for (var i = 0; i < 100; i++) {
col.insert({
c: i
}, function () {});
}
});
var ignite = require('ignite')
, _ = require('underscore')
, request = require('request')
, cashcardController = require('./cashcardController.js')
, txService
, dbService
, cashcardFactory
, controller;
function cashcardController(fire, options, message, exchange, queue) {
this.startState = 'idle';
this.states = {
'idle': {
entry: function () {
console.log("===> IDLE --");
this.url = "http://localhost:8080/cashcard/state/getUserInfo/5";
return 'request01';
},
},
var re
, match
, html
, new_string;
re = /<a href=".*?">([^<]+)<\/a>/g;
html = 'Testing <a href="http://google.com">a_b_c_d</a><a href="http://google.com">x_y_z/a><a href="http://google.com">1_2_3_4</a>';