I hereby claim:
- I am itkq on github.
- I am itkq (https://keybase.io/itkq) on keybase.
- I have a public key ASDBnNWJy8KGros0EwG_jp_VkMHCY-1YYK8sTjm8xUAshAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
[[snippets]] | |
description = "Get my ip address" | |
command = "curl ipconfig.io" | |
output = "" |
#!/bin/bash | |
set -e | |
LIST_PATH=$HOME/.mfalist.encrypted | |
KEY_PATH=$HOME/.ssh/id_rsa | |
case $(uname) in | |
"Darwin") copy_cmd='pbdopy' ;; | |
"Linux" ) copy_cmd='xsel -bi' ;; | |
esac |
count=sum=0;$('div.tableSet01 > div > table > tbody > tr > td:nth-child(5)').each(function(){point_str=$(this).text();if(point_str=="認定"){point = 60; count++;}else if(point_str == "合格"){point=0;}else{point=Number(point_str);count++}sum+=point;});console.log(sum/count); |
require 'time' | |
def convert_zone(orig, to_zone) | |
original_zone = ENV["TZ"] | |
utc_time = orig.gmtime | |
ENV["TZ"] = to_zone | |
to_zone_time = utc_time.localtime | |
ENV["TZ"] = original_zone | |
to_zone_time | |
end |
require 'digest/md5' | |
script = <<-SCRIPT | |
var list = new Array(); | |
Application("Vivaldi").windows().forEach(function(window){ | |
window.tabs().forEach(function(tab){ | |
list.push(tab.name() + "\t" + tab.url()); | |
}); | |
}); | |
list.join("\\n") |
function tenki() { | |
local loc=${1:-大田区} | |
curl "wttr.in/$loc?0_lang=ja" | |
} |
#!/bin/bash | |
ls /var/log/nginx/access.log-*.gz | tail -n 1 \ | |
| xargs zgrep 404 | egrep 'php|admin|db|sql|struts' | awk '{print $1}' | uniq \ | |
| awk '{$0="deny " $0 ";"; print}' >> /etc/nginx/dropip.conf |
version: '2' | |
services: | |
db-data: | |
image: busybox:latest | |
volumes: | |
- /var/lib/mysql | |
zabbix-db: | |
image: monitoringartist/zabbix-db-mariadb | |
environment: | |
- MARIADB_USER=zabbix |
# ==== Emojis ==== | |
# 🎨 :art: Improving structure / format of the code. | |
# ⚡️ :zap: Improving performance. | |
# 🔥 :fire: Removing code or files. | |
# 🐛 :bug: Fixing a bug. | |
# 🚑 :ambulance: Critical hotfix. | |
# ✨ :sparkles: Introducing new features. | |
# 📝 :memo: Writing docs. | |
# 🚀 :rocket: Deploying stuff. |