Skip to content

Instantly share code, notes, and snippets.

🙃
Alive.

Phoenix Nemo phoenixlzx

🙃
Alive.
View GitHub Profile
@phoenixlzx
phoenixlzx / nyaa.cat.nginx.conf
Created Feb 21, 2014
Nyaa.cat NGINX configuration
View nyaa.cat.nginx.conf
map $http_accept_language $lang {
default zh_CN;
~en en;
~ca ca;
}
server {
listen [::]:80;
View ass2txt.js
// ass2txt convert script
if (process.argv.length < 3) {
console.log('Usage: node ' + process.argv[1] + ' FILENAME');
process.exit(1);
}
var fs = require('fs')
, filename = process.argv[2];
fs.readFile(filename, 'utf8', function(err, data) {
if (err) throw err;
@phoenixlzx
phoenixlzx / apple.hosts
Last active Aug 29, 2015
Apple Accelerated hosts
View apple.hosts
# swdist
124.232.148.78 swdist.apple.com
182.118.12.165 swdist.apple.com
220.181.64.182 swdist.apple.com
124.95.150.197 swdist.apple.com
# itunes
221.228.64.48 itunes.apple.com
218.59.209.150 itunes.apple.com
58.215.107.24 itunes.apple.com
@phoenixlzx
phoenixlzx / config.yml
Created Jun 11, 2014
SignShop Configuration
View config.yml
# If you need help with this config, view the SignShop Quick Reference PDF located in the SignShop folder
# You can also visit our Bukkit page at tiny.cc/SignShop
# There are a few basic options to modify how SignShop acts globally
# You can edit anything in this config and use "/signshop reload" to reload the config while the server is running
@phoenixlzx
phoenixlzx / exp.js
Last active Aug 29, 2015
exp.js for NyanWorld
View exp.js
// exp.js table designed by phoenixlzx <i@phoenixlzx.com>
// level 1 - 10 | exp 0 - 324
// for (i = 1; i <= 10; i++) { exp[i] = i == 1 ? 0 : (i * 6 + exp[i-1]) }
// level 11 - 20 | exp 434 - 1874
// for (i = 11; i <= 20; i++) { exp[i]= i * 10 + exp[i-1] }
// level 21 - 40 | exp 2189 - 11024
// for (i = 21; i <= 40; i++) { exp[i] = i * 15 + exp[i-1] }
// level 41 - 50 | exp 12008 - 21944
// for (i = 41; i <= 50; i++) { exp[i] = i * 24 + exp[i-1] }
@phoenixlzx
phoenixlzx / PKGBUILD
Created Oct 2, 2012
PKGBUILD for Vuze 4.7.2.0
View PKGBUILD
pkgname=vuze
pkgver=4.7.2.0
pkgrel=2.1
pkgdesc="One of the most powerful bitTorrent client with GUI in the world, written in Java."
arch=('i686' 'x86_64')
url="http://azureus.sf.net/"
license=('GPL')
depends=('java-runtime' 'desktop-file-utils')
optdepends=('libgnomeui: for vuze GUI')
install=vuze.install
@phoenixlzx
phoenixlzx / getskins.js
Created Nov 24, 2015
JavaScript to get all player skins from your server's whitelist.json
View getskins.js
'use strict';
/*
* Script to get all player skins from your server whitelist.
* $ npm install request
* $ mkdir -p ./skins/Alex ./skins/Steve
* $ node getskins.js
**/
var fs = require('fs');
@phoenixlzx
phoenixlzx / ess_worth.js
Last active Jan 31, 2016
Essentials worth.txt generator from items.csv
View ess_worth.js
'use strict';
/*
* 2016 Phoenix Nemo <i@phoenixlzx.com>
* This script converts Essentials items.csv to worth.txt file
* don't forget to edit prices yourself!
**/
var fs = require('fs');
var yaml = require('js-yaml');
@phoenixlzx
phoenixlzx / bloodmoon_mob_yaml_generator.js
Last active Nov 18, 2016
NyaaCat bloodmoon plugin mob.yml generator
View bloodmoon_mob_yaml_generator.js
'use strict';
var yaml = require('js-yaml');
var fs = require('fs');
var waves = 6,
wave_easy = 3,
wave_normal = 5;
var div = 3;
var maxmobs = 20;
View nodejs_expressjs_restful_api_server_quickstart.md

基于 Node.js 和 Express.js 的 RESTful API 服务端开发

开发环境

  • Node.js (0.10.28+)
    • Arch Linux: 直接使用包管理器安装
    • Ubuntu / Debian / etc: 使用 visionmedia/n
    • OS X / Windows: 使用官方提供的安装包
  • 编辑器
    • WebStorm
You can’t perform that action at this time.