Skip to content

Instantly share code, notes, and snippets.

View lanches-kurashita's full-sized avatar

lanches-kurashita

View GitHub Profile
@lanches-kurashita
lanches-kurashita / buildspec.yml
Created August 20, 2018 07:47
buildspec for AWS CodeBuild
version: 0.2
phases:
install:
commands:
- echo update npm...
- npm install -g n
- n latest
- npm update -g npm
- echo node -v
@lanches-kurashita
lanches-kurashita / check_latest_vulnerability.js
Last active May 17, 2017 05:07
check latest JVN vulnerability information by google apps script.
var JVN_API_URL = "http://jvndb.jvn.jp/myjvn";
var CW_AUTH_TOKEN = "xxxxxx";
var CW_ROOM_ID = "123456789";
var CW_API_URL = "https://api.chatwork.com/v2/rooms/" + CW_ROOM_ID + "/messages";
var SPREADSHEET_ID = 'xxxxxxxxxxxxxxxxxxx';
function checkLatestVulnerabilityInformation() {
var products = getSheetData(SPREADSHEET_ID);
var res = fetchJVN(products);
var new_info = parseXML(res.getContentText());

a piece of Code for webpush on rails

TABLE_NAME = 'devices'.freeze
SCAN_WORKERS = 1 # 1 ~ 32
Aws.config.update({
region: 'region',
credentials: Aws::Credentials.new('...', '...')
})
client = Aws::DynamoDB::Client.new