Skip to content

Instantly share code, notes, and snippets.

@WilliamQLiu
WilliamQLiu / index.html
Created July 30, 2014 20:13
D3 Scatterplot
<!DOCTYPE html>
<html>
<head>
<!-- Load D3 from site -->
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<!-- CSS (Styling) -->
<style type="text/css">
.axis path,
@WilliamQLiu
WilliamQLiu / index.html
Last active August 29, 2015 14:04
D3 Bar Chart (Animations)
<!DOCTYPE html>
<html>
<head>
<!-- Load D3 from site -->
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<!-- Tooltip CSS Styling -->
<style type="text/css">
@WilliamQLiu
WilliamQLiu / index.html
Created August 1, 2014 02:21
D3 Scatterplot (Animations)
<!DOCTYPE html>
<html>
<head>
<!-- Load D3 from site -->
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<!-- CSS (Styling) -->
<style type="text/css">
/* Format X and Y Axis */
@WilliamQLiu
WilliamQLiu / gist:97e3c1732201178604db
Created August 4, 2014 15:31
Sublime Text 3 Default Text Editor on Mac
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'
@WilliamQLiu
WilliamQLiu / sample_pycrypto.py
Created August 12, 2014 20:32
Quick Obfuscation in Python
from Crypto.Cipher import AES
from base64 import b64encode, b64decode
import os
BLOCK_SIZE = 32 # Block size for the cipher object must be 16, 24, 32 for AES
PADDING = '*'
pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * PADDING
@WilliamQLiu
WilliamQLiu / index.html
Created November 17, 2014 20:25
D3 Mouse Events
<!DOCTYPE html>
<!-- How to create Mouse Events for D3 -->
<html>
<head>
<!-- Load D3 from site -->
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<!-- CSS (Styling) -->
<style type="text/css">
@WilliamQLiu
WilliamQLiu / index.html
Created November 17, 2014 20:27
D3 Transitions
<!DOCTYPE html>
<html>
<head>
<!-- Load D3 from site -->
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<!-- CSS (Styling) -->
<style type="text/css">
@WilliamQLiu
WilliamQLiu / index.html
Created November 17, 2014 20:31
D3 Autoscaling Axis
<!DOCTYPE html>
<!-- Allows creating new values outside the normal scale
Then updates axis, scales, and circle attributes -->
<html>
<head>
<!-- Load D3 from site -->
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<!-- CSS (Styling) -->
@WilliamQLiu
WilliamQLiu / index.html
Created November 18, 2014 21:30
D3 Colors
<!DOCTYPE html>
<!-- D3 has a lot of neat ways to manipulate color
https://github.com/mbostock/d3/wiki/Colors -->
<html>
<head>
<!-- Load D3 from site -->
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<!-- CSS (Styling) -->
<style type="text/css">
@WilliamQLiu
WilliamQLiu / index.html
Created November 18, 2014 21:35
D3 Basic Template
<!DOCTYPE html>
<!-- D3 Template, can run with: python -m SimpleHTTPServer 8000
Reference: https://github.com/mbostock/d3/wiki/API-Reference
-->
<html>
<head>
<!-- Load D3 from site -->
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>