View .bash_profile
source ~/.bashrc
View how-to-use-jquery-ui-with-browserify.md

Install jquery & jquery-ui:

$ npm install --save jquery jquery-ui

Install deamdify:

$ npm install --save-dev deamdify
View check-ripple-address-seed.js
const crypto = require('crypto');
const hashjs = require('hash.js');
const baseCodec = require('base-x');
const codec = baseCodec("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"); // for ripple
// npm install --save ripple-keypairs ripple-binary-codec ripple-hashes
const Keypairs = require('ripple-keypairs');
// const Binary = require('ripple-binary-codec');
const {
computeBinaryTransactionHash
} = require('ripple-hashes');
View ShiftJISHankakuKanaToUnicode.js
const fs = require("fs");
const readline = require('readline');
const iconv = require('iconv-lite');
const readStream = fs.createReadStream("./shift_jis.txt", { encoding: "binary" });
const rl = readline.createInterface(readStream, {});
rl.on('line', function(line) {
// Shift_JIS => unicode:
console.log("line:", iconv.decode(new Buffer(line, "binary"), "Shift_JIS"));
View npm-install.sh
npm install vue@csp --save
View select-where-in-field.sql
-- Use `ORDER BY FIELDS(<column>, <value>, <value>, ...)`
SELECT * FROM tbl
WHERE id IN (3, 1, 2)
ORDER BY FIELD(id, 1, 2, 3);
-- Returns records ordered by id ASC (order is id:1, id:2, id:3)
View master.js
const cluster = require('cluster');
const numCPUs = require('os').cpus().length;
var tasks = [
"Dusting",
"Sweeping",
"Vacuuming",
"Washing dishes",
"Feeding pets",
"Doing laundry",
View ripple-cli.js
#!/usr/bin/env node
/**
* Ripple CLI tool
*
* The MIT License (MIT)
* Copyright (c) 2017 akirattii <tanaka.akira.2006@gmail.com> (http://mint.pepper.jp)
*/
/**
# Usage & example:
View CheckReCAPTCHA.js
/**
* reCAPTCHA checking middleware
*
* Usage:
* ```
* var checkReCAPTCHA = require("../middleware/CheckReCAPTCHA.js").checkReCAPTCHA;
* router.post('/hoge',
* checkReCAPTCHA(),
* function(req, res, next) {
* //
View さくらのVPSで契約してからユーザを作ってSSHでログインするまで.md

VPS契約してからユーザを作ってSSHでログインするまで

前提:

  • さくらのVPS
  • WebコンソールからログインしてOS (Ubuntu 16.04 LTS) をインストール済み
  • sshデーモン起動済み

ユーザを作成