$ docker run --rm -it -v $PWD/:/mnt -w /mnt ruby:2.7.2-alpine3.12 irb
irb(main):001:0> source = Tempfile.new('source')
=> #<Tempfile:/tmp/source20201202-1-1xbulh>
irb(main):002:0> FileUtils.copy_file('/etc/group', source.path)
=> nil
irb(main):003:0> source.size
=> 682
irb(main):004:0> dist = Tempfile.new('dist')
=> #
View ecs-exec.zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh -eu | |
function __help { | |
echo "Usage: ecs-exec [--profile <profile>] [--region <region>] [--cluster <cluster>] [--container <container>] [--base-name <product>] [<command>]" | |
exit 1 | |
} | |
function __info() { | |
echo -e "\e[32m$*\e[m" | |
} |
View docker-mount-issue.md
View GitHub Dark Patch.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-moz-document domain("githubusercontent.com"), domain("www.githubstatus.com"), domain("stylishthemes.github.io"), regexp("^https?://((education|graphql|gist|guides|raw|resources|status|developer|support|vscode-auth)\\.)?github\\.com/((?!(generated_pages)).)*$"), regexp("^https?://www\\.zuora\\.com.*github\\.com.*") { | |
.blob-code-addition { | |
background-color: #002828 !important; | |
} | |
.blob-num-addition { | |
background-color: #0a3232 !important; | |
} | |
.blob-code-addition .x, .highlight .blob-code-addition .x { | |
background: #257 !important; | |
} |
View _composer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef composer | |
function __composer_get_command_list() { | |
if which composer &> /dev/null && which perl &> /dev/null; then | |
composer list --raw | perl -pe 's/:/\\:/g;s/([a-z\\:-]+)(?:\s+(.*))?/$1:$2/ig;' | |
fi | |
} | |
function __composer_commands() { | |
local -a cmds |
View userChrome.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@charset "utf-8"; | |
/* | |
* このファイルを編集して、profile-directory/chrome/userChrome.css | |
* としてコピーしてください。 | |
*/ | |
/* | |
* このファイルは、Mozilla のユーザインタフェース(UI) の外観をカスタマイズ | |
* するのに使用することができます。 | |
* デフォルト設定の無効化宣言 !important を使用する事を忘れないでください。 |
View userContent.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@charset "utf-8"; | |
/* | |
* このファイルを編集して、profile-directory/chrome/userContent.css | |
* としてコピーしてください。 | |
*/ | |
/* | |
* このファイルは、表示するすべての Web ページにスタイルを適用するのに使用 | |
* することができます。 | |
* !important なし規定は、Web ページ作者が何かを設定した場合には、作者の |
View _artisan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef artisan | |
function __older_than_laravel54() { | |
local version=$(cat composer.lock | jq '.packages[] | select(.name == "laravel/framework").version') | |
echo $version | grep -e 'v5\.[0-3]\.' &> /dev/null | |
} | |
function __laravel5_get_command_list() { | |
local PHP | |
if which php74 &> /dev/null; then |
View notify-send
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use common::sense; | |
use IPC::System::Simple qw(systemx); | |
my @arguments = @ARGV; | |
my @ignores = qw/ | |
-u --urgency | |
-t --expire-time |
View git-branch-clear.zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh -eu | |
function __info() { | |
echo -e "\e[32m$*\e[m" | |
} | |
__info "# git fetch --prune" | |
git fetch --prune |
View peco-tmux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# peco-tmux: starts peco in a tmux pane | |
# usage: peco-tmux [-u|-d [HEIGHT[%]]] [-l|-r [WIDTH[%]]] [--] [PECO OPTIONS] | |
args=() | |
opt="" | |
skip="" | |
swap="" | |
close="" | |
term="" |
NewerOlder