Skip to content

Instantly share code, notes, and snippets.

@XiaoxiaoLi
XiaoxiaoLi / 0_reuse_code.js
Created June 20, 2014 20:03
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
@XiaoxiaoLi
XiaoxiaoLi / dbnotes.py
Last active August 29, 2015 14:01 — forked from jjgod/dbnotes.py
Grabs douban notes and saves the title, time, and content into a single file. 豆瓣日记导出备份脚本
#!/usr/bin/env python
# Douban Notes Grab
# updated May 6 2014
# First parameter is the username, second parameter is the output file path
# Prints all notes into one single file with an output format of:
# Title
# Time
# Content
@XiaoxiaoLi
XiaoxiaoLi / ColorUtils.java
Last active March 22, 2024 14:47
Java Code to get a color name from rgb/hex value/awt color. The part of looking up a color name from the rgb values is edited from * https://gist.github.com/nightlark/6482130 by Ryan Mast (nightlark)
import java.awt.Color;
import java.util.ArrayList;
/**
* Java Code to get a color name from rgb/hex value/awt color
*
* The part of looking up a color name from the rgb values is edited from
* https://gist.github.com/nightlark/6482130#file-gistfile1-java (that has some errors) by Ryan Mast (nightlark)
*
* @author Xiaoxiao Li