Skip to content

Instantly share code, notes, and snippets.

kazu634 kazu634

Block or report user

Report or block kazu634

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View test.geojson
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
テスト用のGeojson
View test.geojson
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 Nov 29, 2016
AWS CLI related scripts
View ec2-list.rb
#!/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 Mar 1, 2016
Test configuration file for td-agent
View test.conf
<source>
type dstat
tag foo
option -cdnm --tcp --udp --load -gs
delay 5
</source>
<source>
type df
option -k
View graph-modify.rb
#!/opt/td-agent/embedded/bin/ruby
require 'growthforecast'
COLOR_CPU = {
'hiq' => '#77cc11',
'idl' => '#77cccc',
'siq' => '#77cc11',
'sys' => '#cc7711',
'usr' => '#cc77cc',
@kazu634
kazu634 / default
Created Jan 9, 2016
nginx configuration for HTTP/2
View default
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 Oct 18, 2015
Chrome Extension Sample
View manifest.json
{
"manifest_version": 2,
"name": "My 4th extension",
"version": "0.1",
"description": "testing purpose",
"permissions": [
"activeTab"
],
@kazu634
kazu634 / AutoUnattend.xml
Created Aug 31, 2015
AutoUnattend.xml for Windows2008r2.
View AutoUnattend.xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
View sensu-clients.rb
#!/opt/sensu/embedded/bin/ruby
require 'open-uri'
require 'json'
END_POINT = 'http://localhost:4567/clients'
BASIC_AUTH = {:http_basic_authentication => ['admin', 'supersecret']}
response = open(END_POINT, BASIC_AUTH)
@kazu634
kazu634 / delete_graphs.rb
Last active Aug 29, 2015
`Serf`で管理していないノードのグラフを削除する
View delete_graphs.rb
#!/opt/sensu/embedded/bin/ruby
require 'growthforecast'
# Create `Growthforecast` instance:
gf = GrowthForecast.new('localhost', 5125)
glist = gf.graphs()
glist.each do |graph|
You can’t perform that action at this time.