Skip to content

Instantly share code, notes, and snippets.

View eyeballcode's full-sized avatar
🏠
Working from home

Edward Yeung eyeballcode

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am eyeballcode on github.
  • I am transportsg (https://keybase.io/transportsg) on keybase.
  • I have a public key ASBP3UhQzE2-Mew1yd2rOVeWpN3HDHxYEge-e9x5grLmPQo

To claim this, I am signing this object:

@eyeballcode
eyeballcode / index.js
Created September 24, 2017 15:48
MyTransportSG Scraper
const request = require('request');
const vars = require('./support');
const fs = require('fs');
const c = vars.chars;
var timingsURL = 'https://s3-ap-southeast-1.amazonaws.com/lta-eta-web-2/bus_arrival.baf3.js';
request(timingsURL, (err, resp, body) => {
var timings = {};
@eyeballcode
eyeballcode / calcresistance.py
Last active July 27, 2016 14:44
Calculate Resistance of resistor
#! /usr/bin/python
import sys
args = sys.argv[1:]
resistance_list_places = {
"black": 0,
"brown": 1,
"red": 2,
"orange": 3,
var request = require('request'),
jsdom = require('jsdom'),
templates = require('./templates'),
se = require('./se-chat-api');
function SEChatAPIClient() {
this.fkey = null;
this.site = 'stackexchange';
this.baseSite = 'chat.stackexchange.com';
this.user = null;
@eyeballcode
eyeballcode / EventHandler.java
Last active November 5, 2015 15:16
Demo of XMLToJMenu parser
import java.awt.event.ActionEvent;
public class EventHandler {
public static void handleClickDemo(ActionEvent e) {
System.out.println("You clicked the Click Demo button!");
}
}
@eyeballcode
eyeballcode / index.html
Created July 26, 2015 13:20
StackAPITokenTest
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="http://teamfreehugs.github.io/js/StackAPI.js"></script>
<title>Testing</title>
<script>
(function() {
var instance = new StackAPI(
{
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Draggable - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<style>
@eyeballcode
eyeballcode / index.html
Last active August 29, 2015 14:24
Eyechat
<html>
<head>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="http://jqueryui.com/resources/demos/style.css">
<style>
#login_area { width: 150px; height: 150px; padding: 0.5em; left: 506px; top: 178px; }
</style>
<script>
@eyeballcode
eyeballcode / index.html
Last active August 29, 2015 14:24
Simple @sha peed thingy
<html>
<head>
<script>
var slide = 0;
function next() {
var img = document.getElementById('img');
var text = document.getElementById('text');
if (slide == -1) {
img.src = "http://i.imgur.com/QrCMaCm.png";
text.innerHTML = "ShadowWizard was a rich man. He had many things, such as big 100L tanks of pee.";