Skip to content

Instantly share code, notes, and snippets.

View ruanyl's full-sized avatar

Yulong Ruan ruanyl

  • Amazon Web Service
View GitHub Profile
This file has been truncated, but you can view the full file.
[{"_id":"59d0cb68f2c709b231da99d7","symbol":"000001.XSHE","name":"平安银行","type":"CS","preclose":10.88,"low":10.86,"close":11.11,"volume":68228010,"date":20170929,"high":11.16,"open":10.92,"amount":753852534,"change":0.02106227106227094},{"_id":"59d0cb68f2c709b231da99d8","symbol":"000001.XSHG","name":"上证指数","type":"INDX","preclose":3339.64,"low":3340.31,"close":3348.94,"volume":14486244300,"date":20170929,"high":3357.02,"open":3340.31,"amount":175892822951,"change":0.0027841727264835245},{"_id":"59d0cb68f2c709b231da99d9","symbol":"000002.XSHE","name":"万科A","type":"CS","preclose":26.41,"low":26,"close":26.25,"volume":34575268,"date":20170929,"high":26.8,"open":26.56,"amount":908847292,"change":-0.006024096385542174},{"_id":"59d0cb68f2c709b231da99da","symbol":"000002.XSHG","name":"A股指数","type":"INDX","preclose":3497.04,"low":3497.74,"close":3506.73,"volume":14445779300,"date":20170929,"high":3515.24,"open":3497.74,"amount":175615007219,"change":0.0027703602897871356},{"_id":"59d0cb68f2c709b231da99db","symbol":"00
@ruanyl
ruanyl / image-arraybuffer.js
Created January 31, 2018 08:46 — forked from candycode/image-arraybuffer.js
Create a jpg image from ArrayBuffer data
// Simulate a call to Dropbox or other service that can
// return an image as an ArrayBuffer.
var xhr = new XMLHttpRequest();
// Use JSFiddle logo as a sample image to avoid complicating
// this example with cross-domain issues.
xhr.open( "GET", "http://fiddle.jshell.net/img/logo.png", true );
// Ask for the result as an ArrayBuffer.
xhr.responseType = "arraybuffer";
@ruanyl
ruanyl / Unicode table
Created May 4, 2017 13:39 — forked from ivandrofly/Unicode table
Unicode table - List of most common Unicode characters *
Unicode table - List of most common Unicode characters *
* This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable.
Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol.
What is Unicode?
Unicode is a standard created to define letters of all languages ​​and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode.
How to identify the Unicode number for a character?
Type or paste a character:
@ruanyl
ruanyl / create-random-file.md
Created July 4, 2016 13:30
create multiple files with random content in Mac OS
@ruanyl
ruanyl / Jenkins_Protractor_Headless_Chrome_Setup_Ubuntu_14.04.md
Last active December 16, 2022 03:52 — forked from praphull27/Jenkins_Protractor_Headless_Chrome_Setup_Ubuntu_14.04.md
Jenkins, Protractor and Headless Chrome Browser Setup on Ubuntu 14.04

Jenkins, Protractor and Headless Chrome Browser Setup on Ubuntu 14.04

Update Ubuntu

sudo apt-get update
sudo apt-get upgrade

Install Java

@ruanyl
ruanyl / base64.js
Created December 22, 2015 19:53
base64 encoding for browser
var b64encode = function(str) {
return root.btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
return String.fromCharCode('0x' + p1);
}));
};

Using Homebrew to manage Node.js and io.js installs on OSX

Having both Node.js and io.js installed with NVM was giving me a load of problems, mainly with npm. So I uninstalled NVM and manage Node.js and io.js with homebrew.
Heres how.

Install Node.js and io.js

$ brew install node
$ brew install iojs

@ruanyl
ruanyl / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console