Skip to content

Instantly share code, notes, and snippets.

Avatar

Yuki Matsukura matsubo

View GitHub Profile
View prefectures.json
[
["北海道", "", "hokkaido"],
["青森県", "あおもり", "aomori"],
["岩手県", "いわて", "iwate"],
["宮城県", "みやぎ", "miyagi"],
["秋田県", "あきた", "akita"],
["山形県", "やまがた", "yamagata"],
["福島県", "ふくしま", "fukushima"],
["茨城県", "いばらき", "ibaraki"],
["栃木県", "とちぎ", "tochigi"],
@matsubo
matsubo / README.md
Last active Jul 18, 2020 — forked from gbraad/README.md
Buy me a coffee
View README.md

HTML tag

Buy Me A Coffee

MarkDown

Buy Me a Coffee

View gist:488d23a674231bacf4032fc9cc37088f
require 'bundler/setup'
Bundler.require
class Rtx830
def initialize(hash = {})
username = hash[:username] || 'admin'
password = hash[:password] || 'admin'
View fail2ban.sh
#!/bin/bash
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
[plugin.metrics.dht11]
command = "sudo -u pi python3 /home/pi/DHT11_Python/mackerel.py"
type = "metric"
View 社外の人材との契約形態.md
  • 業務委託契約
    • 請負契約
    • 準委任契約(=SES契約)
  • 派遣契約
@matsubo
matsubo / arp_table_usage.sh
Created Jun 7, 2020
Get current stat via telnet on RTX830
View arp_table_usage.sh
#!/bin/bash
HOST=$1
COMMAND="show arp"
$(dirname $0)/rtx_command.sh $HOST "${COMMAND}" | grep "Count" | awk '{print $2}'
@matsubo
matsubo / main.yml
Last active Jun 4, 2020
Deploy to S3 using GitHub Actions
View main.yml
name: Upload Website
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
View sheet_to_calendar.gs
function scheduleShifts() {
var spreadsheet = SpreadsheetApp.getActiveSheet();
var calendarId = spreadsheet.getRange("A2").getValue();
var eventCal = CalendarApp.getCalendarById(calendarId);
var signups = spreadsheet.getRange("A5:D12").getValues();
for ( x=0; x < signups.length; x++) {
View clowdwatch_to_slack.py
import boto3
import json
import logging
import os
from base64 import b64decode
from urllib.request import Request, urlopen
from urllib.error import URLError, HTTPError
You can’t perform that action at this time.