Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Snippet development | |
Quickly finding snippets | |
There are some ways you can quickly find a snippet file: | |
* | |
M-x yas/new-snippet | |
Prompts you for a snippet name, then tries to guess a suitable directory to store it, prompting you for creation if it does not exist. Finally, places you in a new buffer set to snippet-mode so you can write your snippet. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/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}" |
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
<source> | |
type dstat | |
tag foo | |
option -cdnm --tcp --udp --load -gs | |
delay 5 | |
</source> | |
<source> | |
type df | |
option -k |
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
#!/opt/td-agent/embedded/bin/ruby | |
require 'growthforecast' | |
COLOR_CPU = { | |
'hiq' => '#77cc11', | |
'idl' => '#77cccc', | |
'siq' => '#77cc11', | |
'sys' => '#cc7711', | |
'usr' => '#cc77cc', |
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
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; |
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 | |
z40=0000000000000000000000000000000000000000 | |
IFS=' ' | |
while read local_ref local_sha remote_ref remote_sha | |
do | |
if [ "$local_sha" = $z40 ] | |
then | |
# Handle delete |
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
# SERVERSPEC - Resource Types | http://serverspec.org/resource_types.html | |
#============================= | |
# command | |
#============================= | |
snippet desco | |
alias descom | |
abbr describe command('whoami') do ~ end | |
prev_word '^' | |
describe command('${1:whoami}') do | |
${0} |