Skip to content

Instantly share code, notes, and snippets.

View yamikuronue's full-sized avatar

Bay yamikuronue

View GitHub Profile
it('should update a board on PUT', (done) => {
dao.addBoard({
ID: '1111',
Name: 'test board',
Adult: false,
BoardMasters: null,
Tags: [],
IC: null
}).then((data) => {
@yamikuronue
yamikuronue / app.js
Created December 19, 2015 20:56
Facebook authentication
app.get('/', function (req, res) {
request('https://graph.facebook.com/v2.5/oauth/access_token?client_id=[redacted]&client_secret=[redacted]&grant_type=client_credentials', function (error, response, body) {
body = JSON.parse(body);
if (!error && response.statusCode == 200) {
res.render('home', {access_token: body.access_token, temp: 'hello world'});
}
})
});
ensureGameExists: function(id) {
return internals.db.prepare('SELECT id FROM games WHERE id = ?')
.then((statement) => {
return statement.get(id);
})
then((row) => {
if (!row) {
return internals.db.prepare('INSERT INTO games (id, status, current_day, current_stage) VALUES (?, (SELECT id FROM game_statuses WHERE status="active"),0,(SELECT id FROM stages WHERE stage="night"))')
.then((statement) => {
return statement.run(id)

Proposed command structure for SockMafia 4.0

Guidelines

  • All commands shall be verbs
  • Direct objects should follow the verb unless that makes an unnatural imparative sentence structure in American English
  • Indirect objects and modifiers shall be signalled by the participles that feel natural in American English
  • Optionally, participles that feel natural in other forms of English can be added as synonyms
  • Indirect objects are order-independant
  • Commands without enough arguments to do anything shall list help

Global modifiers

4|zoidberg | [2016-10-21T13:27:35.386Z] Ping exchanged with 8ms latency
4|zoidberg | [2016-10-21T13:28:00.532Z] Ping exchanged with 145ms latency
4|zoidberg | [2016-10-21T13:28:32.539Z] Ping exchanged with 7007ms latency
4|zoidberg | [2016-10-21T13:28:57.680Z] Ping exchanged with 140ms latency
4|zoidberg | [2016-10-21T13:29:46.904Z] Ping exchanged with 242ms latency
4|zoidberg | [2016-10-21T13:30:11.967Z] Ping exchanged with 59ms latency
4|zoidberg | [2016-10-21T13:30:38.595Z] Ping exchanged with 1627ms latency
4|zoidberg | [2016-10-21T13:31:03.755Z] Ping exchanged with 158ms latency
4|zoidberg | [2016-10-21T13:31:28.877Z] Ping exchanged with 118ms latency
4|zoidberg | [2016-10-21T13:31:54.080Z] Ping exchanged with 196ms latency