Skip to content

Instantly share code, notes, and snippets.

View qiaoshun8888's full-sized avatar

John Qiao qiaoshun8888

View GitHub Profile
@qiaoshun8888
qiaoshun8888 / litegraph.extensions.js
Created November 4, 2023 23:56
litegraph.extensions.js
/**
* Changes the background color of the canvas.
*
* @method updateBackground
* @param {image} String
* @param {clearBackgroundColor} String
* @
*/
LGraphCanvas.prototype.updateBackground = function (image, clearBackgroundColor) {
this._bg_img = new Image();
@qiaoshun8888
qiaoshun8888 / litegraph.core.js
Last active November 4, 2023 23:54
litegraph.core.js
//packer version
(function(global) {
// *************************************************************
// LiteGraph CLASS *******
// *************************************************************
/**
* The Global Scope. It contains all the registered node classes.
1. Windows 10 & Ubuntu 16.04 Dual-Boot
(Ubuntu 16.04.1 LTS)[http://www.ubuntu.com/download/desktop]
Universal USB Installer
Boot from USB and install ubuntu
- Mount point / 200GB
- Mount point /home 2TB
Reboot after successfully installed
Reference: http://www.tecmint.com/install-ubuntu-16-04-alongside-with-windows-10-or-8-in-dual-boot/
@qiaoshun8888
qiaoshun8888 / Detect Simple Graph Circle
Created April 18, 2014 02:05
Detect Simple Graph Circle
from collections import deque
# graph - adjacency - list
def bfs(s, graph):
queue = deque()
visited = []
queue.append((s, s))
@qiaoshun8888
qiaoshun8888 / gist:10942035
Created April 16, 2014 23:26
/etc/apt/sources.list
#
# deb cdrom:[Ubuntu-Server 13.10 _Saucy Salamander_ - Release amd64 (20131016)]/ saucy main restricted
#deb cdrom:[Ubuntu-Server 13.10 _Saucy Salamander_ - Release amd64 (20131016)]/ saucy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ saucy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy main restricted
@qiaoshun8888
qiaoshun8888 / gist:10912064
Last active August 29, 2015 13:59
Memcached using socket configuration
# memcached default config file
# 2003 - Jay Bonci <[email protected]>
# This configuration file is read by the start-memcached script provided as
# part of the Debian GNU/Linux distribution.
# Run memcached as a daemon. This command is implied, and is not needed for the
# daemon to run. See the README.Debian that comes with this package for more
# information.
-d