さくらVPS上でGithubに入れたnode.jsプロジェクトをJenkins経由でテストする
入ってなければ入れる。
| 更新: | 2014-04-10 |
|---|---|
| バージョン: | 0.2.1 |
| 作者: | @voluntas |
| URL: | http://voluntas.github.io/ |
reltool 周りについて勉強がてらまとめてみました
| // Inspired by https://github.com/logicalparadox/backbone.iobind/blob/master/lib/sync.js | |
| // Overwrite Backbone.sync method | |
| Backbone.sync = function(method, model, options){ | |
| // create a connection to the server | |
| var ws = new WebSocket('ws://127.0.0.1:1234'); | |
| // send the command in url only if the connection is opened | |
| // command attribute is used in server-side. | |
| ws.onopen = function(){ |
| {sys, [ | |
| {lib_dirs, ["../deps"]}, %% depsを追加 | |
| {erts, [{mod_cond, derived}, {app_file, strip}]}, | |
| {app_file, strip}, | |
| {rel, "hogeapplication", "0.1", | |
| [ | |
| %% 標準で使うライブラリも全て追加 | |
| kernel, | |
| stdlib, | |
| sasl, |
| // Doing AES-256-CBC (salted) decryption with node.js. | |
| // This code is based on http://php.net/manual/de/function.openssl-decrypt.php and works with PHP sqAES. | |
| // | |
| // Create your encrypted data with | |
| // echo -n 'Hello world' | openssl aes-256-cbc -a -e | |
| var crypto = require('crypto'); | |
| var password = 'password'; | |
| var edata = 'U2FsdGVkX18M7K+pELP06c4d5gz7kLM1CcqJBbubW/Q='; |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| /* | |
| * MCrypt API available online: | |
| * http://linux.die.net/man/3/mcrypt | |
| */ | |
| #include <mcrypt.h> |
| /** | |
| * 半角カナを全角カナに変換する | |
| * 半角スペースは変換しない | |
| * 対応がとれない濁点、半濁点は変換しない | |
| */ | |
| function toKanaZenkaku(str) { | |
| // lengthの等しい2つの文字列でkey-valueをつくる | |
| const makeMap = (str1, str2) => | |
| str1 | |
| .split("") |