This file contains 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
public class Csv2array { | |
public static void main(String[] args) { | |
if (args.length < 1) { | |
System.out.println("Usage: java -jar Csv2array.jar [username(comma separated username)]"); | |
System.exit(-1); | |
} | |
String[] split = args[0].split(","); | |
String[] usernameArray = new String[split.length]; | |
for (int i = 0; i < usernameArray.length; i++) { |
This file contains 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
private static final String verifyToken = "this_is_test"; | |
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | |
String hubMode = request.getParameter("hub.mode"); | |
String hubChallenge = request.getParameter("hub.challenge"); | |
String hubVerifyToken = request.getParameter("hub.verify_token"); | |
if (hubMode != null && !hubMode.isEmpty() && hubChallenge != null | |
&& !hubChallenge.isEmpty() && hubVerifyToken != null && !hubVerifyToken.isEmpty()) { | |
if (hubVerifyToken.equals(verifyToken)) { |
This file contains 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
import java.io.IOException; | |
import java.io.PrintWriter; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.WebServlet; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
This file contains 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
package sent_yo; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.NameValuePair; | |
import org.apache.http.client.ClientProtocolException; | |
import org.apache.http.client.HttpClient; | |
import org.apache.http.client.entity.UrlEncodedFormEntity; |
This file contains 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
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
import javax.xml.bind.DatatypeConverter; | |
import org.xml.sax.Attributes; | |
import org.xml.sax.helpers.DefaultHandler; | |
public class SaxHandler extends DefaultHandler { | |
boolean entryFlag; // <entry></entry>内であることを記憶するフラグ |
This file contains 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
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<link rel="stylesheet" href="http://openlayers.org/en/v3.0.0/css/ol.css" type="text/css"> | |
<style> | |
.map { | |
height: 500px; | |
width: 100%; | |
} | |
</style> |
This file contains 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
import java.io.IOException; | |
import java.io.PrintWriter; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.MultipartConfig; | |
import javax.servlet.annotation.WebServlet; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import javax.servlet.http.Part; |
This file contains 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
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<link rel="stylesheet" href="http://openlayers.org/en/v3.0.0/css/ol.css" type="text/css"> | |
<style> | |
.map { | |
height: 500px; | |
width: 100%; | |
} |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.quitsq.notify3button"> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme"> |
This file contains 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/sh | |
if [ $# != 2 ]; then | |
echo "Usage: $0 FILENAME TIME(sec)" 1>&2 | |
exit 0 | |
fi | |
echo "Start logging" | |
DATE=`date +%Y%m%d_%H%M%S` | |
dmidecode >> $1_dmidecode_${DATE}.txt | |
vmstat -S m -n 1 $2 | awk 'NR>1{OFS=","; $1 = $1;print strftime("%H:%M:%S"),$0; fflush()}' >> $1_vmstat_${DATE}.csv & | |
sar -n DEV 1 $2 >> $1_network_${DATE}.txt & |
OlderNewer