Skip to content

Instantly share code, notes, and snippets.

require! {
fs
path
express
gm
'../../models/user': User
'../../models/user-image': UserImage
'../../models/post-image': StatusImage
'../../models/talk-message': TalkMessage
'../../models/talk-message-image': TalkMessageImage
require! {
async
'../models/user': User
'../models/user-following': UserFollowing
'../models/status': Status
'./user-response-filter'
'../config'
}
exports = (user-id, limit, since-id, max-id, callback) ->
@syuilo
syuilo / chords.yaml
Last active September 14, 2015 05:27
コード表
---
C:
- C
- E
- G
C#:
- C#
- F
- G#
D:
<!doctype html>
<html>
<head>
<meta charse=utf-8>
<style>
#box {
position: fixed;
top: 200px;
left: 400px;
This file has been truncated, but you can view the full file.
26013 silly addNameRange number 2 { name: 'combined-stream',
26013 silly addNameRange range: '>=0.0.4 <0.1.0',
26013 silly addNameRange hasData: true }
26014 silly addNameRange versions [ 'combined-stream',
26014 silly addNameRange [ '0.0.0',
26014 silly addNameRange '0.0.1',
26014 silly addNameRange '0.0.2',
26014 silly addNameRange '0.0.3',
26014 silly addNameRange '0.0.4',
26014 silly addNameRange '0.0.5',
db.Posts.update({}, {$rename:{"photos":"files"}}, false, true);
db.Posts.find({}, {
'_v': 0,
'repostsCount': 0,
'repliesCount': 0,
'likesCount': 0,
'isDeleted': 0,
'channel': 0,
'app': 0,
// DELETE UNUSE FIELD
db.Users.update({}, {$unset: {"latestStatusText": 1}}, false, true);
// INIT latestPost FIELDS
db.Users.update({}, {$set: {"latestPost": null}}, false, true);
// INIT prevPost FIELDS
db.Posts.update({}, {$set: {"prevPost": null}}, false, true);
// INIT nextPost FIELDS
@syuilo
syuilo / api
Created January 29, 2016 16:29
{
"mongo": {
"uri": "mongodb://localhost/Misskey",
"options": {
"user": "もんごのuser id",
"pass": "ものごのpassword"
}
},
"redis": {
"host": "localhost",
#!/bin/bash
if [ "$(ps axc | grep -P 'deploy$' | wc -l)" -gt 2 ]; then
echo '他のdeployが実行中です。強制終了させるにはkillall deployをしてください。'
exit
fi
cd /var/misskey-api
echo -e "\e[32m--- Stoping process...\e[m"
forever stop $(pwd)/misskey-api.js
//////////////////////////////////////////////////
// WEB SERVER
//////////////////////////////////////////////////
import * as cluster from 'cluster';
import * as fs from 'fs';
import * as http from 'http';
import * as https from 'https';
import * as koa from 'koa';
import config from './config';