Skip to content

Instantly share code, notes, and snippets.

@kazu634
kazu634 / response.txt
Last active August 15, 2023 05:33
Micro CMS: Modify the existing post.
{"service":"everun1989","api":"posts","id":"lg4rp6zuj","type":"edit","contents":{"old":{"id":"lg4rp6zuj","status":["PUBLISH"],"draftKey":null,"publishValue":{"id":"lg4rp6zuj","createdAt":"2023-01-09T11:52:40.682Z","updatedAt":"2023-01-09T13:25:21.210Z","publishedAt":"2023-01-09T12:20:30.813Z","revisedAt":"2023-01-09T13:25:21.210Z","title":"Stravaで振り返る2022年のランニング・サイクリング","summary":"OBの武蔵です。Stravaの記録で2022年の運動を振り返ってみました","topic":{"id":"v0-y7ub-erm","createdAt":"2023-01-09T11:50:15.226Z","updatedAt":"2023-01-09T11:50:15.226Z","publishedAt":"2023-01-09T11:50:15.226Z","revisedAt":"2023-01-09T11:50:15.226Z","topic":"活動"},"author":{"id":"6b-xy3r36m","createdAt":"2023-01-09T12:15:58.524Z","updatedAt":"2023-01-09T12:15:58.524Z","publishedAt":"2023-01-09T12:15:58.524Z","revisedAt":"2023-01-09T12:15:58.524Z","name":"武蔵一弘","bio":"2002年に文学部に入学しました。大学院の修士で卒業したので、6-7年ほどイブランにはお世話になりました。今はIT系の会社に勤めています。","image":{"url":"https://images.microcms-assets.io/assets/11f641bfad9f43549b0a39188320765a/a76d1a778a1f40b5be6b28fe4a9e9278/m
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kazu634
kazu634 / test.geojson
Created May 15, 2019 15:51
テスト用のGeojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kazu634
kazu634 / ec2-list.rb
Created November 29, 2016 09:16
AWS CLI related scripts
#!/usr/bin/env ruby
instances = `aws ec2 describe-instances | \
jq -r -c '.Reservations[].Instances[] | [.InstanceId, (.Tags[]? | select(.Key == "Name")).Value, .PrivateIpAddress , .State.Name ] | @csv'`
instances.split().each do |instance|
id, name, ip, state = instance.gsub('"', '').split(',')
name = "NONAME" if name.empty?
puts "#{name}\t#{id}\t#{ip}\t#{state}"
@kazu634
kazu634 / test.conf
Created March 1, 2016 13:38
Test configuration file for td-agent
<source>
type dstat
tag foo
option -cdnm --tcp --udp --load -gs
delay 5
</source>
<source>
type df
option -k
#!/opt/td-agent/embedded/bin/ruby
require 'growthforecast'
COLOR_CPU = {
'hiq' => '#77cc11',
'idl' => '#77cccc',
'siq' => '#77cc11',
'sys' => '#cc7711',
'usr' => '#cc77cc',
@kazu634
kazu634 / default
Created January 9, 2016 15:17
nginx configuration for HTTP/2
server {
# allow access from localhost
# listen 80 reuseport backlog=1024;
listen 443 ssl http2 backlog=1024;
server_name test.kazu634.com;
ssl_certificate /etc/letsencrypt/live/test.kazu634.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/test.kazu634.com/privkey.pem;
ssl_dhparam /etc/letsencrypt/live/test.kazu634.com/dhparams_4096.pem;
@kazu634
kazu634 / manifest.json
Created October 18, 2015 12:52
Chrome Extension Sample
{
"manifest_version": 2,
"name": "My 4th extension",
"version": "0.1",
"description": "testing purpose",
"permissions": [
"activeTab"
],