$ ls -a
# service nginx restart
$ ls -a
# service nginx restart
require 'uri' | |
require 'oauth' | |
CONSUMER_KEY = '<your consumer key>' | |
CONSUMER_SECRET = '<your consumer secret>' | |
CALLBACK_URL = '<your callback url>' | |
consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET, { | |
site: "https://api.twitter.com", | |
scheme: :header |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Program", | |
"program": "${workspaceFolder}/app.js", | |
"envFile": "${workspaceFolder}/.envrc", | |
"outFiles": [ |
``` | |
sudo apt-key list | \ | |
grep "expired: " | \ | |
sed -ne 's|pub .*/\([^ ]*\) .*|\1|gp' | \ | |
xargs -n1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys | |
``` | |
### Command explanation: | |
sudo apt-key list - lists all keys installed in the system; |
find . -name "*.swift" | xargs perl -i -0pe 's/\/\/\s*Created\s*by[^\n]+\n\/\/\s*Copyright[^\n]+\n\/\/\n//m' |
// Settings | |
const appRoot = ""; | |
const srcRoot = "src"; | |
const staticRoot = "statics"; | |
const path = require('path'); | |
const Koa = require('koa'); | |
const send = require('koa-send'); |
{ | |
"Role": { | |
"RoleName": "yourapp-ec2-api-ENV", | |
"Path": "/", | |
"AssumeRolePolicyDocument": { | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Principal": { |
差の距離をキロメートルで | |
``` | |
=sqrt(power((<緯度1>-<緯度2>)/0.0111, 2)+power((<経度1>-<経度2>)/0.0091, 2))*1000 | |
``` | |
多分 Excel も同じ |
const es = require('event-stream'); | |
const KSL = require('kinesis-stream-lambda'); | |
exports.handler = function(event, context, callback) { | |
console.log('event: ', JSON.stringify(event, null, 2)); | |
const result = []; | |
const stream = KSL.reader(event, { isAgg: false }); | |
stream.on('end', function() { |
function snakeToCamel(s) { | |
return s.replace(/(\-\w)/g, function(m){return m[1].toUpperCase();}); | |
} |