Skip to content

Instantly share code, notes, and snippets.

View bvlion's full-sized avatar
🏠
Working from home

Satoshi Iwai bvlion

🏠
Working from home
View GitHub Profile
@bvlion
bvlion / Main.java
Last active July 20, 2017 08:12
「今さらJava8のStreamとLambdaの関係」の資料用
import java.util.function.Function;
import java.util.stream.Stream;
public class Main {
public static void main(String... args) {
// これまでのJavaのように書くと、こんな感じになります。
Function<String, Integer> fullFunction = new Function<String, Integer>() {
@Override
public Integer apply(String arg) {
return Integer.parseInt(arg);
@bvlion
bvlion / server.js
Created June 29, 2017 02:35
Node.jsでhtmlを表示するサンプル
const http = require('http');
const hostname = '127.0.0.1';
const port = 3000;
var server = http.createServer();
server.on('request', doRequest);
var fs = require('fs');
function doRequest(req, res) {
var url = req.url;
@bvlion
bvlion / spring_meta_table_clean.sh
Created March 23, 2017 01:22
Springバッチの管理DBの指定日以前のデータを削除するシェル(パスワードの管理方法に関しては.my.cnf等を検討)
#!/bin/bash
# SQL情報
PREFIX=
USER=
PASSWORD=
SCHEMA=
# 最終保存日
DATE=`date '+%Y-%m-%d'`
// 指定のウィンドウサイズに変更
int width = 480;
int height = 600;
driver.manage().window().setSize(new Dimension(width, height));
// 最大化
/* driver.manage().window().maximize(); */
if (isFirefox) {
FirefoxProfile profile = new FirefoxProfile();