Skip to content

Instantly share code, notes, and snippets.

@saboyutaka
saboyutaka / gist:47536cc370923fad8e6160120dbf2941
Created August 11, 2018 06:43
docker-compose for mitmproxy
version: '3'
services:
nginx:
image: nginx
ports:
- 80:80
mitmweb:
image: mitmproxy/mitmproxy
tty: true
ports:
@saboyutaka
saboyutaka / Brewfile
Last active July 16, 2023 13:06
Brewfile 2023.7
cask_args appdir: '/Applications'
tap 'caskroom/cask'
# tap 'homebrew/php'
brew 'azure-cli'
brew 'ctop'
brew 'curl'
brew 'ghq'
brew 'gist'
brew 'git'
[applications_to_ignore]
z
atom
aws
wireshark
photoshop
illustrator
lightroom
messages
@saboyutaka
saboyutaka / .rubocop.yml
Created July 11, 2023 23:30
.rubocop.yml
inherit_from: .rubocop_todo.yml
AllCops:
TargetRubyVersion: 2.7
DisplayCopNames: true
NewCops: enable
Exclude:
- 'db/seeds/*'
- 'db/**/*'
- 'vendor/**/*'
@saboyutaka
saboyutaka / turbolinks_note.md
Last active October 5, 2022 08:45
Turbolinksを調べてみた
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@saboyutaka
saboyutaka / base.tpl
Last active December 23, 2021 16:40
Bottle CSS importing
%#ベースとなる大枠のHTML要素
<html>
<head>
<link rel="stylesheet" type="text/css" href="static/style.css">
<title>{{title or 'No title'}}</title>
</head>
<body>
%# ここにrebaseしたテンプレートが入る。この場合make_table.tplの内容がここに入る。
{{!base}}
</body>
@saboyutaka
saboyutaka / wpapi.ts
Created September 14, 2021 13:40
wpapi
import WPAPI from "wpapi";
import { WP_REST_API_Posts } from "wp-types";
const wp = new WPAPI({ endpoint: "https://your.wordpress.com/wp-json" });
async function main() {
const posts: WP_REST_API_Posts = await wp.posts().get();
const contents = posts.map(p => p.content.rendered)
@saboyutaka
saboyutaka / firebase.ts
Last active February 27, 2021 07:42
Decode Firebase Authentication JWT Token
export type firebasePublicKeys = {
[key: string]: string | undefined;
};
type JwtHeader = {
alg?: string | undefined;
kid?: string | undefined;
typ?: string | undefined;
};
@saboyutaka
saboyutaka / config.py
Created September 24, 2016 11:17
Swap semicolon & colon with keyhac
import sys
import os
import datetime
import subprocess
from keyhac import *
def configure(keymap):
# Global keymap which affects any windows
keymap_global = keymap.defineWindowKeymap()