Skip to content

Instantly share code, notes, and snippets.

@9SQ
9SQ / solaseedair_timetable_20161030-20170325.csv
Created Nov 24, 2016
Solaseed Air Flight Schedule 2016/10/30 - 2017/03/25
View solaseedair_timetable_20161030-20170325.csv
number origin_jp destination_jp origin_airport_jp destination_airport_jp origin destination origin_airport destination_airport origin_code_iata destination_code_iata origin_code_icao destination_code_icao departure arrival
11 東京(羽田) 熊本 羽田 熊本 TOKYO(HANEDA) KUMAMOTO HANEDA KUMAMOTO HND KMJ RJTT RJFT 7:10 9:05
12 熊本 東京(羽田) 熊本 羽田 KUMAMOTO TOKYO(HANEDA) KUMAMOTO HANEDA KMJ HND RJFT RJTT 7:35 9:15
13 東京(羽田) 熊本 羽田 熊本 TOKYO(HANEDA) KUMAMOTO HANEDA KUMAMOTO HND KMJ RJTT RJFT 12:05 14:00
14 熊本 東京(羽田) 熊本 羽田 KUMAMOTO TOKYO(HANEDA) KUMAMOTO HANEDA KMJ HND RJFT RJTT 9:45 11:20
15 東京(羽田) 熊本 羽田 熊本 TOKYO(HANEDA) KUMAMOTO HANEDA KUMAMOTO HND KMJ RJTT RJFT 14:05 15:55
16 熊本 東京(羽田) 熊本 羽田 KUMAMOTO TOKYO(HANEDA) KUMAMOTO HANEDA KMJ HND RJFT RJTT 14:40 16:15
17 東京(羽田) 熊本 羽田 熊本 TOKYO(HANEDA) KUMAMOTO HANEDA KUMAMOTO HND KMJ RJTT RJFT 16:30 18:20
18 熊本 東京(羽田) 熊本 羽田 KUMAMOTO TOKYO(HANEDA) KUMAMOTO HANEDA KMJ HND RJFT RJTT 16:30 18:05
21 東京(羽田) 熊本 羽田 熊本 TOKYO(HANEDA) KUMAMOTO HANEDA KUMAMOTO HND KMJ RJTT RJFT 19:05 21:00
@9SQ
9SQ / resource_log.sh
Last active Mar 9, 2016
リソースログ取得スクリプト
View resource_log.sh
#!/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 &
@9SQ
9SQ / AndroidManifest.xml
Created Jan 3, 2016
Androidの通知領域ボタンで動作分け(singleTaskで多重起動防止)
View AndroidManifest.xml
<?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">
@9SQ
9SQ / esp8266_WiFiClientSecure.ino
Last active Jan 6, 2019
Arduino core for esp8266 WiFiClientSecure
View esp8266_WiFiClientSecure.ino
#ifdef ESP8266
extern "C" {
#include "user_interface.h"
}
#endif
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
ADC_MODE(ADC_VCC);
@9SQ
9SQ / RCS620mod.cpp
Created Jul 3, 2015
RC-S620/SでTargetとして動作させる(特定のカードをエミュレート)
View RCS620mod.cpp
// add under "int RCS620S::initDevice(void){...}"
void RCS620S::tgInitTarget(const uint8_t* idm, const uint8_t* pmm, const uint8_t* rfu)
{
uint8_t response[RCS620S_MAX_RW_RESPONSE_LEN];
uint16_t responseLen;
uint8_t command[RCS620S_MAX_RW_RESPONSE_LEN] = {0x00};
uint8_t start[2] = {0xd4, 0x8c}; // command code & sub command code
uint8_t activated[1] = {0x02}; // Activated limit
uint8_t params106[6] = {0x00, 0x04, 0x00, 0x00, 0x00, 0x40}; // 106kbpsParams(6byte)
@9SQ
9SQ / raspi_lps25h.py
Created May 1, 2015
Raspberry PiとLPS25Hで気圧取得
View raspi_lps25h.py
import sys
import wiringpi2
from time import sleep
wiringpi2.wiringPiSetup()
i2c = wiringpi2.I2C()
lps25h = i2c.setup(0x5C)
whoami = i2c.readReg8(lps25h,0x0F)
if whoami != 0xBD:
print "error"
@9SQ
9SQ / openlayers3_test2.html
Created Oct 15, 2014
OpenLayers3でOSMにPointとPolygonを重ねる
View openlayers3_test2.html
<!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%;
}
@9SQ
9SQ / Uploader.java
Created Oct 15, 2014
multipart/form-dataで受けたデータを保存&Paramsも取得 (Tomcat7/Servlet3.0)
View Uploader.java
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;
@9SQ
9SQ / openlayers_test1.html
Last active Aug 29, 2015
OpenStreetMap(EPSG:3857)の上にVector Layer(EPSG:4326)を乗せる (OpenLayers 3)
View openlayers_test1.html
<!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>
@9SQ
9SQ / SaxHandler.java
Created Aug 18, 2014
PuSHで来た気象庁XMLをSAXでパース
View SaxHandler.java
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>内であることを記憶するフラグ
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.