Skip to content

Instantly share code, notes, and snippets.

Working from home

Yuki Matsukura matsubo

Working from home
View GitHub Profile
matsubo / wordpress.rb
Created Nov 12, 2020
Post image to wordpress and use it in the article.
View wordpress.rb
require 'faraday'
require 'base64'
require 'json'
# Generated password using application-passwords plugin
authorization = 'Basic ' + Base64.encode64('username:password')
# post image
View index.js
var os = require('os')
module.exports = Franz =>
class Gmail extends Franz {
overrideUserAgent() {
if (os.platform() == 'linux')
return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"
return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36";
matsubo / Gemfile
Last active Aug 20, 2020
quick and dirty code for prototyping
View Gemfile
# frozen_string_literal: true
source ""
git_source(:github) {|repo_name| "{repo_name}" }
gem "influxdb"
gem "logger"
View prefectures.json
["北海道", "", "hokkaido"],
["青森県", "あおもり", "aomori"],
["岩手県", "いわて", "iwate"],
["宮城県", "みやぎ", "miyagi"],
["秋田県", "あきた", "akita"],
["山形県", "やまがた", "yamagata"],
["福島県", "ふくしま", "fukushima"],
["茨城県", "いばらき", "ibaraki"],
["栃木県", "とちぎ", "tochigi"],
matsubo /
Last active Jan 28, 2021 — forked from gbraad/
Buy me a coffee

HTML tag

Buy Me A Coffee


Buy Me a Coffee

View gist:488d23a674231bacf4032fc9cc37088f
require 'bundler/setup'
class Rtx830
def initialize(hash = {})
username = hash[:username] || 'admin'
password = hash[:password] || 'admin'
set -eu
date=`date +%s`
drop=`iptables -nL |grep f2b-blacklist -A 10000 | grep \^DROP|wc -l`
reject=`iptables -nL|grep f2b-sshd -A 10000|grep REJECT|wc -l`
echo -e "fail2ban.ipv4.drop\t${drop}\t${date}"
View mackerel-agent.conf
command = "sudo -u pi python3 /home/pi/DHT11_Python/"
type = "metric"
View 社外の人材との契約形態.md
  • 業務委託契約
    • 請負契約
    • 準委任契約(=SES契約)
  • 派遣契約
matsubo /
Created Jun 7, 2020
Get current stat via telnet on RTX830
COMMAND="show arp"
$(dirname $0)/ $HOST "${COMMAND}" | grep "Count" | awk '{print $2}'