This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import csv | |
import sys | |
tmpl_file = sys.argv[1] | |
csv_file = sys.argv[2] | |
ctx_header = [] | |
cxt_list = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'eclipse' | |
buildscript { | |
ext { | |
springBootVersion = '1.3.5.RELEASE' | |
} | |
repositories { | |
mavenCentral() | |
maven { | |
url 'http://repo.spring.io/libs-release' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import lxml.html | |
import requests | |
# http://qiita.com/beatinaniwa/items/72b777e23ef2390e13f8 | |
# これが文字化けで動かなかったのでエンコード追加 | |
target_url = 'http://news.tv-asahi.co.jp/news_politics/articles/000041338.html' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find src/test/java/hoge -type f -name "*.java" -print0 | xargs -0 sed -i -e "s%@Ignore%//@Muscle%" | |
#find src/test/java/hoge -type f -name "*.java" -print0 | xargs -0 sed -i -e "s%//@Muscle%@Ignore%" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get pgid from process group leader cmd | |
PGID=`ps -eo user,pid,pgid,cmd | grep vagrant | grep "[o]ya.sh" | awk '{ print $3 }'` | |
# get children pids from pgid | |
PIDS=`ps -eo user,pid,pgid | grep vagrant | grep " $PGID" | awk '{ print $2 }'` | |
# kill them all | |
for PID in $PIDS; do | |
echo $PID | |
kill -kill $PID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* SimulationItemStatus.java 2016/4/04 | |
* | |
* Copyright (c) xxxxxxx | |
*/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myFunction() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var tblName = sheet.getRange("A1").getValue(); | |
var allData = sheet.getDataRange().getValues(); | |
var headers = allData[1]; | |
var records = allData.slice(2); | |
var sql = toInsertSql(tblName, headers, records); | |
Browser.msgBox(sql); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# via http://stackoverflow.com/questions/3074288/get-url-after-redirect | |
# usage echo "http://bit.ly/xxxxx" | sh urlunzip.sh | |
# cat short_url_list.txt | sh urlunzip.sh | |
while read line | |
do | |
curl -s -i $line -L | egrep -A 10 '301 Moved Permanently|302 Found' | grep 'Location' | awk -F': ' '{print $2}' | tail -1 | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
from datetime import datetime | |
import time | |
import os | |
def measure(func): | |
time_start = datetime.now() | |
func() | |
time_stop = datetime.now() |
NewerOlder