Skip to content

Instantly share code, notes, and snippets.

@waitonza
waitonza / fbTestFF.html
Created October 31, 2012 15:55
FaceBook Test For Fire Finger
<html>
<head>
<title>FaceBook Test For Fire Finger</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
</head>
<body>
<h1>Facebook API Test</h1>
<h3>Friend List</h3>
<input type="button"
onclick="sendRequestViaMultiFriendSelector(); return false;"
@waitonza
waitonza / maxprime-codejom.cpp
Created February 4, 2013 02:47
maxprime of codejom 2013
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
@waitonza
waitonza / parenref-codejom.cpp
Created February 4, 2013 02:51
parenref of codejom 2013
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
@waitonza
waitonza / secondplace-codejom.cpp
Created February 24, 2013 10:54
secondplace of codejom 2013
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
@waitonza
waitonza / BrowserViewController.m
Last active December 23, 2015 16:18
โค้ด Objective-C ดาวน์โหลด คลิปจาก Youtube ของ Session (Barcamp Bangkhen #4)
....
#import "HCYoutubeParser.h"
#import "SVProgressHUD.h"
...
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
@waitonza
waitonza / Classroom.h
Created January 31, 2014 16:43
Basic OOP in Objective-C
//
// Classroom.h
// SocketTest
//
// Created by Wairung Tiranalinvit on 1/31/2557 BE.
// Copyright (c) 2557 Wairung Tiranalinvit. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Student.h"
@waitonza
waitonza / platformString.swift
Created October 21, 2014 16:57
iOS Platform Hardware String in Swift Language for Reuse
func platformString() -> String {
var size : UInt = 0
sysctlbyname("hw.machine", nil, &size, nil, 0)
var machine = [CChar](count: Int(size), repeatedValue: 0)
sysctlbyname("hw.machine", &machine, &size, nil, 0)
let platform : String = String.fromCString(machine)!
if platform == "iPhone1,1" { return "iPhone 1G" }
if platform == "iPhone1,2" { return "iPhone 3G" }
if platform == "iPhone2,1" { return "iPhone 3GS" }
@waitonza
waitonza / express+multer+upload.js
Created March 19, 2015 14:55
Test express+multer+upload
var express = require("express");
var multer = require('multer');
var app = express();
var done = false;
var path = require("path");
var serveIndex = require('serve-index');
app.use(multer({ dest: './uploads/',
rename: function (fieldname, filename) {
return filename+Date.now();
@waitonza
waitonza / google_map_picker.js
Created February 24, 2017 05:16
Google Map Picker
import { default as React, Component } from "react";
import { default as update } from "react-addons-update";
import { GoogleMapLoader, GoogleMap, Marker, SearchBox } from "react-google-maps";
import { triggerEvent } from "react-google-maps/lib/utils";
class GoogleMapPicker extends Component {
static inputStyle = {
"border": `1px solid transparent`,