Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -eu
myid=$(whoami)
if [ "root" = $myid ]; then
echo root で実行しないでください
exit 1
fi
@ozv-s-urabe
ozv-s-urabe / hapitas-reset.sh
Last active May 26, 2021 00:06
hapitas-reset
#!/bin/bash
set -eu
if [ -f $HOME/.gitconfig ]
then
rm -fv $HOME/.gitconfig || :
fi
if [ $(ls $HOME/.ssh/|grep ^id_|wc -l) -ne 0 ]
@ozv-s-urabe
ozv-s-urabe / LICENSE
Created December 22, 2020 03:32
This license applies to all public gists https://gist.github.com/oz-urabe
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@ozv-s-urabe
ozv-s-urabe / mock-pop3-server.js
Created December 21, 2020 11:54
mock pop3 server です。常にOKと返すだけ、メールボックスは空
var net = require('net');
var readline = require('readline');
net.createServer(function (socket) {
socket.write("+OK Mock-Pop3-Server Ready."+"\r\n") ;
readline.createInterface(socket, socket).on('line', function (line) {
var msg = "-ERR unknown command"+"\r\n";
var slicedLine = line.slice(0, 4).toUpperCase();
@ozv-s-urabe
ozv-s-urabe / vimium-options.json
Created December 13, 2020 04:07
vimium-option.js
{
"settingsVersion": "1.66",
"exclusionRules": [
{
"pattern": "https://mail.google.com/*",
"passKeys": "?jkpxercgils#uld/`"
},
{
"pattern": "https://calendar.google.com/*",
"passKeys": "?jkpxercgils#uld/`"
@ozv-s-urabe
ozv-s-urabe / GA-PC-browser.py
Created August 30, 2020 04:45
GoogleAnalytics PC-OS-Browser シェア
query = '''
{
"ids": "ga:66453283",
"start_date": "30daysAgo",
"end_date": "yesterday",
"metrics": "ga:users",
"dimensions": "ga:operatingSystem,ga:browser",
"sort": "-ga:users"
}
@ozv-s-urabe
ozv-s-urabe / GA-iOS-version.py
Created August 30, 2020 04:01
GoogleAnalytics iOS 利用バージョンシェア
import re
query = '''
{
"ids": "ga:201135853",
"start_date": "30daysAgo",
"end_date": "yesterday",
"metrics": "ga:users",
"dimensions": "ga:operatingSystemVersion",
"sort": "-ga:users",
@ozv-s-urabe
ozv-s-urabe / autoscaling-update.php
Created July 22, 2020 11:21
autoscaling group に running 中の EC2 インスタンスから 自動で起動設定をAttachするスクリプト
#!/usr/bin/env php
<?php
$list = [
'stage' => [
'web' => [
'namelike' => 'stage-web',
'autoscaling_group' => 'stage-web-autoscaling',
'launch_namelike' => 'stage-web-launch',
'instance_type' => 't3.micro',
@ozv-s-urabe
ozv-s-urabe / こんにちはシート.md
Last active January 14, 2021 02:09
こんにちはシート.md

卜部について

プロフィール

40超えたおっさんです。おっさんらしい趣味としてはハーレーダビッドソン・ロードキング(FLHR)に乗っています。Honda クロスカブ110 にも乗ってます。(2台)

プログラマ・インフラエンジニアです。

@ozv-s-urabe
ozv-s-urabe / vpn-stop-cloudformation.yml
Last active November 17, 2020 14:32
AWS Clinent VPN 停止用 Cloudformation テンプレート
AWSTemplateFormatVersion: "2010-09-09"
Description: VPN Template
Parameters:
ACMArn:
Description: "AWS Certificate Manager Arn. See here https://console.aws.amazon.com/acm/home"
Default: arn:aws:acm:ap-northeast-1:000000000000:certificate/00000000-0000-0000-0000-000000000000
Type: String
NatAMIImage:
Description: "Nat AMI Image"