Skip to content

Instantly share code, notes, and snippets.

💭
offline

Lee Wei evandrix

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am evandrix on github.
  • I am evandrix (https://keybase.io/evandrix) on keybase.
  • I have a public key whose fingerprint is FBBD 2536 570A 8637 27D5 D451 D7A8 8012 BD08 23B7

To claim this, I am signing this object:

@evandrix
evandrix / index.html
Created Jun 14, 2014
SG-MY Causeway Camera embed
View index.html
<div>
<img alt="LNK CAM S5 SECOND LINK 10 KM-1.3 NB" src="http://www.llm.gov.my/maklumat_trafik_terkini.aspx?ImagePath=HYEC4fuANi4FALhGgLSGmDWAlRFhYuAE7/is8T3p+ROwE7P5XavMSyo/MuMcxM3ICpDtpXzLqfOW4hPqp4ExRJDJqARoFIgnAaRq7RNLqh1DfTZz3VZLZY4T+8oCfM6c">
<img alt="LNK CAM S5 SECOND LINK 8 KM1.8 SB" src="http://www.llm.gov.my/maklumat_trafik_terkini.aspx?ImagePath=HYEC4fuANi4FALhGgLSGmDWAlRFhYuAE7/is8T3p+ROwE7P5XavMSyo/MuMcxM3ICpDtpXzLqfOW4hPqp4ExRNY1mvfC6C26zLOdSXg33IoG4elAdTDml0GqDEBtkqMz">
</div>
View gist:10592923
https://raw.githubusercontent.com/user/repo/master/filename.js
-> https://rawgit.com/user/repo/master/filename.js
View gist:9509160
#coding: utf-8
from cStringIO import StringIO
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
from email import Charset
from email.generator import Generator
import smtplib
# Example address data
@evandrix
evandrix / p438.cpp
Created Jan 11, 2014
Project Euler Problem 438
View p438.cpp
#include <iostream>
#include <cmath>
#include <stdlib.h>
#include <cstring>
using namespace std;
/**
* Problem 438
*
* Example:
View README.md

Gmail.js - JavaScript API for Gmail

TL;DR Summary

  • Lots of api methods to work with gmail. Useful for chrome extensions
  • Most of them dont take arguments, they work on what is currently visible on the screen
  • I still need to add implementation for chrome extension, works by injecting js for now
  • Main method is gmail.observe.on('lots_of_actions_here', callback())
  • Click on a method link to view more detailed docs
  • Create an issue/pull request for feedback, requests and fixes
View SPOTWO.py
import math
for i in xrange(1,600001):
x=int('{0:b}'.format(i))
# x*=2
n=2**x
# print str(i)+":"+str(int(math.log(n,2)))+":"+str(((2**x)**2)%1000000007)+"/"+str(x),
print i,x
if i == 20: break
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>HTML5 Video Player</title>
<link href="http://vjs.zencdn.net/4.1/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.1/video.js"></script>
</head>
<body style="padding-top:16px">
<style>
@evandrix
evandrix / index.html
Created Oct 26, 2013
Twitter data visualization
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Tweets</title>
<style type="text/css">
body {
margin: 0;
padding: 0
}
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8"/>
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application android:label="@string/app_name">
You can’t perform that action at this time.