Skip to content

Instantly share code, notes, and snippets.

View hidepin's full-sized avatar

hidepin hidepin

View GitHub Profile
@hidepin
hidepin / gist:873d84d86dcc9c2c0f9a
Created October 25, 2015 06:58
elasticsearchのテンプレート
{
"template" : "apache_log*",
"mappings" : {
"www3" : {
"properties" : {
"remote-host" : {
"type" : "string"
},
"request-header-Referer" : {
"type" : "string"
@hidepin
hidepin / json
Created October 27, 2015 06:14
multi
{
"template" : "apache_log*",
"settings" : {
"index" : {
"analysis" : {
"filter" : {
"method_filter" : {
"type" : "pattern_replace",
"pattern" : " .*",
"replacement" : ""
@hidepin
hidepin / shell
Last active November 2, 2015 15:33
scl
# SCLのインストール
# yum install centos-release-SCL
# python33のインストール
# yum install python33.x86_64
# python33を使用する場合
# scl enable python33 bash
# OS起動時に使用する場合
@hidepin
hidepin / hubot-memo.txt
Last active February 29, 2016 23:24
hubot
https://github.com/github/hubot-scripts
https://github.com/github/hubot/blob/master/docs/adapters.md
cron
```
cat scripts/cron.coffee [~/hubot/hubot]
# Description:
# cron
#
@hidepin
hidepin / selenium.txt
Last active October 5, 2016 11:49
selenium
## RemoteWebDriver
### firefox
1. サーバを起動
java -jar selenium-server-standalone-xxx.xxx.xxx.jar
2. リモート呼び出しのソース
public static void main(String[] args) {
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
RemoteWebDriver remoteWD = null;
@hidepin
hidepin / selenium-python
Created March 13, 2016 07:41
selenium-python
import time
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote(
command_executor='http://192.168.137.225:4444/wd/hub',
desired_capabilities=DesiredCapabilities.FIREFOX)
driver.get('https://www.google.co.jp')
@hidepin
hidepin / selenium_remotewebdriver_screenshot
Last active March 19, 2016 09:54
selenium remotewebdriver screenshot
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.Augmenter;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
public class NavigateToAUrl {
public static void main(String[] args) {
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
@hidepin
hidepin / selenium_addon
Created March 17, 2016 21:08
selenium_addon
package org.func.sample.selnium;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
@hidepin
hidepin / selenium_useragent
Created March 17, 2016 21:29
selenium_useragent
package org.func.sample.selnium;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
@hidepin
hidepin / docker_systemd.md
Last active June 19, 2016 23:18
docker_systemd

(概要)

systemdでは、サービスの起動オプションなどをデフォルトの設定から変更する方法として、 /etc/systemd/system/<NAME>.service.dディレクトリを作成し、その配下に拡張子.confファイルを 作成して、デフォルトの設定との差分を記述する必要がある。

(参考)

How do I customize a unit file/ add a custom unit file?