clone command: git clone [email protected]:/0cc95cc4e122f000c2f9.git my-squirrel-settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float rng(float a, float b, int m, int x0, int n) { | |
float temp; | |
if (n == 1) { | |
temp = x0; | |
} else { | |
temp = rng(a, b, m, x0, n-1); | |
} | |
return ((int)(a * temp + b) % M) / (float)M; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use cgi entry point | |
https://github.com/littleq0903/FacemapNCCU-Server/blob/master/src/utilities.py#L44 | |
Notice: this code uses `urlfetch` module of Google App Engine, you have to replace it with `urllib` to make it working. | |
# use POP3 entry point | |
# here's a pop3 authentication backend for Django. set it to "nccu.edu.tw" (NCCU's POP3 server) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
""" | |
The auth via trust pop3 server for Django http://www.djangoproject.com | |
set up the trust pop3 server domain in AUTH_POP_SERVERS, you could have one or many | |
trusted pop3 server | |
require python package python-dnspython, http://www.dnspython.org/ | |
for smart MX record lookup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd path/to/tagtoo-open-bidder | |
cd tagtoo-openbidder-utils/scripts/deployer | |
# editing config file, set the ip to bidder | |
vim open-bidder-material/metadata/tanx-bidder-metadata.json | |
# editing ssh key location, username | |
vim fabfile.py | |
# deploy ssh keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var userChoice = prompt("Do you choose rock, paper or scissors?"); | |
var computerChoice = Math.random(); | |
console.log(computerChoice); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just like its CoffeeScript cousin, LiveScript uses number symbols for | |
# single-line comments. | |
/* | |
Multi-line comments are written C-style. Use them if you want comments | |
to be preserved in the JavaScript output. | |
*/ | |
# As far as syntax goes, LiveScript uses indentation to delimit blocks, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env lsc | |
/* | |
Link Preview for command-line | |
*/ | |
require! readability: "node-readability" | |
require! program: commander | |
require! request | |
# Functions | |
show-info = (title, url) !-> |