Then create the user; remember setting to his password to "chessman123"
sudo adduser binsun
Apparently, gist is a simple way to share snippets and pastes with others. All gists are Git repositories, so they are automatically versioned, forkable and usable from Git. |
// Sometimes solves kortaggio's 5x5 variant of 2048: http://kortaggio.github.io/2048/ | |
// Open the javascript console with F12 and copy past this in. | |
// export the game manager into the global namespace | |
GameManager.prototype.__original_actuate = GameManager.prototype.actuate; | |
GameManager.prototype.actuate = function() { | |
window.gm = this; | |
this.__original_actuate(); | |
GameManager.prototype.actuate = GameManager.prototype.__original_actuate; | |
}; |
# sending | |
# SMTP use the univ serv | |
set smtp_url="smtp://[email protected]:587" | |
set ssl_starttls=yes | |
set ssl_force_tls=yes | |
r = session.query(ClaimRoom)[-1] | |
for name in range(0,10): | |
ClaimAsset(room=r,product_type_name=name,simple=False) | |
session.commit() |
// Generic Types | |
class Carousel<T: CustomStringConvertible> { | |
var items = [T]() | |
var currentPosition = 0 | |
var count: Int {return items.count} | |
var isEmpty: Bool {return items.isEmpty} | |
func append(item: T) {items.append(item)} | |
func next() -> T? { | |
if self.isEmpty { return nil } |
Output the symmetric difference of two sorted streams of numbers. | |
Examples: | |
list1 = [1,3,5,8] | |
list2 = [2,5,6,7,8] | |
output = [1,2,3,6,7] | |
input1 = [1,2,3,4,99,100] | |
input2 = [3,4,5,6,99] | |
output = [1, 2, 5, 6, 100] |
// http://user.qzone.qq.com/765591203 | |
var pages = document.getElementById("tblog").contentWindow.document.getElementsByClassName("mod_pagenav_count")[0]; | |
var posts = document.getElementById("tblog").contentWindow.document.getElementById("listArea").getElementsByTagName("li"); | |
for (var i = 0; i < 1 /*posts.length*/; i++) { | |
var postTitle = posts[i].getElementsByClassName("article")[0].textContent; | |
var postLink = posts[i].getElementsByClassName("article")[0].getElementsByTagName("a")[0].href | |
// http://user.qzone.qq.com/765591203/blog/1400775512 | |
var entryDate = posts[i].getElementsByClassName("list_op")[0].childNodes[0].textContent; | |
var readCount = posts[i].getElementsByClassName("list_op")[0].childNodes[2].textContent; |
<!DOCTYPE html> | |
<meta charset="utf-8" /> | |
<title>WebSocket Test</title> | |
<script language="javascript" type="text/javascript"> | |
function submit() | |
{ | |
wsUri = document.getElementById("wsUriInput").value; | |
testWebSocket(); |
// #bodyContent > div.mw-content-ltr > table:nth-child(21) > tbody > tr:nth-child(500) | |
//*[@id="bodyContent"]/div[4]/table[10]/tbody/tr[500] | |
// bgcolor="33CC33" | |
c=document.getElementById("bodyContent") | |
d=c.getElementsByClassName("mw-content-ltr")[0] | |
e=d.getElementsByTagName("table") | |
phoneTable=e[e.length - 4] | |
phoneBuilds = [] |