Skip to content

Instantly share code, notes, and snippets.

View mamemomonga's full-sized avatar

Shotaro Takahashi mamemomonga

View GitHub Profile
@mamemomonga
mamemomonga / gist:ad97ff3d89a09b765e1d2d8515c2fc54
Created February 6, 2020 08:24
ssh-agentを起動してtmuxを起動してssh-addする
exec ssh-agent tmux new-session 'ssh-add; exec $SHELL'
/etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
@mamemomonga
mamemomonga / shellscript.bat
Last active January 31, 2020 08:10
busybox.exeとバッチファイルだけでWindowsでシェルスクリプトを実行する
: <<EOF_BAT
@ECHO OFF
REM ***********************************************************
REM busybox.exeとバッチファイルだけでWindowsでシェルスクリプトを実行する
REM ***********************************************************
REM 同じフォルダにbusybox.exeを入れておく
REM busybox.exe 入手先
REM https://frippery.org/busybox
REM https://github.com/rmyorston/busybox-w32
REM 参考
@mamemomonga
mamemomonga / misoji-no-yoru.txt
Last active January 29, 2020 00:34
三十路の夜 / 尾崎豊
三十路の夜 / 尾崎豊
落書きのドキュメントと ツイッターばかり見てる俺
超高層ビルの箱の中 届かない夢を見てる
やりばのない 気持の扉破りたい
5ちゃんねるに書き込んだこと 見つかれば逃げ場もない
パソコンにむかい 背を向けながら
心のひとつもわかり合えない 上司達をにらむ
そして仲間達は今夜 バックレの計画をたてる
とにかくもう 会議や会社にはいたくない
@mamemomonga
mamemomonga / ffmpeg.md
Last active October 17, 2023 04:31
ffmpegメモ

ffmpegメモ

1080Pの動画の 70秒目から5秒ぶん切り出し、音声なし720Pに変換する

$ ffmpeg -ss 70 -i infile.mp4 -t 5 -vf scale=1280:-1 -an outfile.mp4

映像音声2倍速

-vf setpts=PTS/2.0 -af atempo=2.0 
@mamemomonga
mamemomonga / git-user.md
Last active December 16, 2019 06:23
Gitでgit config user.name, git config user.email を設定せず、環境変数で設定する

Gitでgit config user.name, git config user.email を設定せず、環境変数で設定する

export GIT_AUTHOR_NAME=ユーザ名
export GIT_AUTHOR_EMAIL=メールアドレス
export GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
export GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
export EMAIL=$GIT_AUTHOR_EMAIL
@mamemomonga
mamemomonga / !README.md
Last active December 14, 2019 15:58
まめもどん Advent Calendar 2019
@mamemomonga
mamemomonga / cloud-ssh.sh
Last active December 16, 2019 00:32
EC2, GCEを起動してsshfsでホームディレクトリをマウント、tmuxを起動し、tmuxをぬけるとsshfsをアンマウントしてインスタンスを終了するスクリプト
# こちらに移動
# https://github.com/mamemomonga/cloud-workspace-instance-starter
@mamemomonga
mamemomonga / debian-buster-setup.sh
Created December 11, 2019 13:42
Debian Busterセットアップスクリプト
#!/bin/bash
set -eu
# Build Essentialをインストールする
INSTALL_BUILD_ESSENTIAL=1
# Dockerをインストールする
INSTALL_DOCKER=1
if [ "$(id -u)" != 0 ]; then
@mamemomonga
mamemomonga / awscli.md
Last active December 11, 2019 12:47
AWSとawscliメモ

AWSとawscliメモ

Profile機能をつかって、複数のAWSアカウントを利用する

初期設定

$ aws configure --profile=myaws1

次回以降、ターミナルログインのたびに以下のコマンドを実行すれば、そのプロファイルが使用される