Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥
🍖

Norio Suzuki suzuki

🔥
🍖
View GitHub Profile
View snapshot_output_2.json
{
"snapshots" : [ {
"snapshot" : "snapshot_2",
"indices" : [ "webindex" ],
"state" : "SUCCESS",
"start_time" : "2014-11-13T12:49:23.661Z",
"start_time_in_millis" : 1415882963661,
"end_time" : "2014-11-13T12:49:24.561Z",
"end_time_in_millis" : 1415882964561,
"duration_in_millis" : 900,
View snapshot_output.json
{
"snapshots": [
{
"snapshot": "snapshot_1",
"indices": [
"webindex",
"_river",
"logstash-2014.11.12",
"logstash-2014.11.13",
"logstash-2014.11.11",
View output.json
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 9,
View mappings.json
{
"mappings": {
"suzuki_tdiary_net": {
"dynamic_templates": [
{
"url": {
"match": "url",
"mapping": {
"type": "string",
"store": true,
View river.json
{
"type": "web",
"crawl": {
"index": "webindex",
"url": ["http://suzuki.tdiary.net/"],
"includeFilter": ["http://suzuki.tdiary.net/.*"],
"excludeFilter": [
"http://suzuki.tdiary.net/images/.*",
"http://suzuki.tdiary.net/js/.*",
"http://suzuki.tdiary.net/theme/.*",
View output.json
{
"_index": "_river",
"_type": "suzuki_tdiary_net",
"_id": "_meta",
"_version": 1,
"found": true,
"_source": {
"type": "web",
"crawl": {
"index": "webindex",
@suzuki
suzuki / firefox-developer-edition.rb
Created Nov 11, 2014
Homebrew Cask: Cask file for Firefox Developer Edition
View firefox-developer-edition.rb
class FirefoxDeveloperEdition < Cask
version :latest
sha256 :no_check
url 'https://download.mozilla.org/?product=firefox-aurora-latest-ssl&os=osx&lang=en-US'
homepage 'https://www.mozilla.org/en-US/firefox/developer/'
license :mpl
app 'FirefoxDeveloperEdition.app'
end
View elasticsearch results
% curl -XGET "http://localhost:9200/logstash-2014.11.03/_search?pretty=true&q=server:suzuki.tdiary.net&fields=server,path&size=3"
{
"took" : 6,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
View td-agent.conf
<source>
type tail
format /^(?<ip>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] (?<server>\S+) "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<status>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<user_agent>[^\"]*)")?$/
time_format %d/%b/%Y:%H:%M:%S %z
path /var/log/tdiary_access.log
pos_file /var/log/td-agent/tdiary_access.log.pos
tag tdiary.access
</source>
<match tdiary.access>
View gtags.sh
#!/bin/sh
HOME="/home/suzuki"
WORK="$HOME/work"
GTAGS="/usr/bin/gtags"
TARGETS="$WORK/project-a
$WORK/project-b
$WORK/project-c
"
You can’t perform that action at this time.