Skip to content

Instantly share code, notes, and snippets.

View blueberrystream's full-sized avatar
🐈
にゃーん

Fumihito Hachinohe blueberrystream

🐈
にゃーん
View GitHub Profile
#!/bin/bash
# require peco (https://github.com/peco/peco)
# usage: doc-sh [SHELL]
id=`docker container ls | peco | awk '{print $1}'`
[[ -z "$id" ]] && exit
shell=$1
[[ -z "$shell" ]] && shell=bash
docker container exec -it $id $shell
#!/bin/bash
# require peco (https://github.com/peco/peco)
# usage: fig-sh [SHELL]
id=`docker-compose ps | peco | awk '{print $1}'`
[[ -z "$id" ]] && exit
shell=$1
[[ -z "$shell" ]] && shell=bash
docker container exec -it $id $shell
// ==UserScript==
// @name Prevent OBJECT Insertion
// @version 1.2
// @description OBJECT要素の挿入を阻止します。「Amazonが重い」問題(Bug 1172205)を回避できるかもしれません。
// @id f4cce630-3501-4d9f-a846-d69064429f02
// @namespace f4cce630-3501-4d9f-a846-d69064429f02
// @include http*://www.amazon.com/*
// @include http*://www.amazon.com.au/*
// @include http*://www.amazon.com.br/*
// @include http*://www.amazon.ca/*
# :bug: バグ修正
# :+1: 機能改善
# :sparkles: 部分的な機能追加
# :tada: 盛大に祝うべき大きな機能追加
# :recycle: リファクタリング
# :shower: 不要な機能・使われなくなった機能の削除
# :green_heart: テストやCIの修正・改善
# :shirt: Lintエラーの修正やコードスタイルの修正
@blueberrystream
blueberrystream / iptables.md
Last active March 8, 2016 08:58
秘伝のタレ iptables味

iptables設定

方針

  • inboundは基本drop
  • forwardはdrop
  • outboundはaccept
  • inboundでacceptするのは以下
    • ループバックインタフェースへのinbound
    • ICMP
    • 送信元がNTP(udp123)で送信先がNTP(udp123)
    • 送信先がSSH(tcp22) ※ステートフル性を確認
@blueberrystream
blueberrystream / git-aliases.txt
Last active September 14, 2015 07:12
わたしのgitのエイリアス 2015/09/14版
$ git alias
alias => !git config --list | grep 'alias\.' | sed 's/alias\.\([^=]*\)=\(.*\)/\1\ => \2/' | sort
au => update-index --assume-unchanged
bc => checkout -b
br => branch
ci => commit
co => checkout
contains => branch -r --contains
dc => diff --cached
di => diff --word-diff
@blueberrystream
blueberrystream / 1.png
Last active August 29, 2015 14:27
駅の出口から会場までのみちのり
1.png
@blueberrystream
blueberrystream / copy_onedrive_dqx.bat
Created August 9, 2015 19:16
DQX アルバム画像zip一括保存ブックマークレット http://dq10tools.appspot.com/zip_images.html でDLしたzipを放り込んだらOneDriveに存在しないものだけコピーするやつ
setlocal
set ARCHIVER=C:\Program Files (x86)\LhaForge\LhaForge.exe
set ONEDRIVE_DQX_DIR=C:\Users\hogehoge\SkyDrive\dqx\思い出アルバム
cd /D "%~dp1"
"%ARCHIVER%" /e "%~f1"
cd "%~n1"
for %%f in (*.jpg) do (
// ==UserScript==
// @name [cpro.jp] redirect to blueberrystream.tteesstt.info at dq10skill
// @namespace http://kid0725.usamimi.info
// @version 1.0
// @author KID the Euforia a.k.a. blueberrystream
// @description アレ
// @homepage https://github.com/blueberrystream/userscripts/
// @match http://cpro.jp/dq10/skillsimulator/*
// @run-at document-start
// @grant none
@blueberrystream
blueberrystream / apm-stars.json
Last active August 29, 2015 14:18
my stared atom packages / show only names: jq -r .[].name apm-stars.json
[{
"name": "SFTP-deployment",
"description": "A package which allow you to upload and download files with FTP/SFTP protocol",
"version": "1.0.0",
"author": {
"name": "Ellipsis Team",
"email": "[email protected]"
},
"repository": "https://github.com/amoussard/sftp-deployment",
"bugs": {