This file contains hidden or 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/bash | |
# | |
# This file echoes a bunch of 24-bit color codes | |
# to the terminal to demonstrate its functionality. | |
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m | |
# The background escape sequence is ^[48;2;<r>;<g>;<b>m | |
# <r> <g> <b> range from 0 to 255 inclusive. | |
# The escape sequence ^[0m returns output to default | |
setBackgroundColor() |
This file contains hidden or 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
struct Example { | |
number: i32, | |
} | |
impl Example { | |
fn boo() { | |
println!("boo! Example::boo() was called!"); | |
} | |
fn answer(&mut self) { | |
self.number += 42; | |
} |
This file contains hidden or 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/sh | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
exec $SHELL -l | |
# for stable | |
rustup install stable | |
rustup default stable | |
rustup component add rust-analysis | |
rustup component add rust-src |
This file contains hidden or 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
BackgroundColour=13,25,38 | |
ForegroundColour=217,230,242 | |
CursorColour=217,230,242 | |
Black=0,0,0 | |
BoldBlack=38,38,38 | |
Red=184,122,122 | |
BoldRed=219,189,189 | |
Green=122,184,122 | |
BoldGreen=189,219,189 | |
Yellow=184,184,122 |
This file contains hidden or 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
Vagrant.configure(2) do |config| | |
def install_plugin(plugin) | |
system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin | |
end | |
install_plugin('vagrant-share') | |
install_plugin('vagrant-vbguest') | |
install_plugin('vagrant-omnibus') | |
install_plugin('vagrant-cachier') | |
if Vagrant.has_plugin?("vagrant-cachier") | |
config.cache.scope = :box |
This file contains hidden or 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
.DEFAULT_GOAL:=help | |
THIS_FILE := $(lastword $(MAKEFILE_LIST)) | |
CRED_TMP := /tmp/.credentials.tmp | |
CRED := ~/.aws/credentials | |
PARENT:=iamA | |
SERIAL:=arn:aws:iam::1234567890ab:mfa/iam-username | |
DURATION:= | |
code:=000000 |
This file contains hidden or 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
.DEFAULT_GOAL := help | |
THIS_FILE := $(lastword $(MAKEFILE_LIST)) | |
target: ## run the target ## make target env=development | |
@echo $@ # print target name | |
@$(MAKE) -f $(THIS_FILE) inner-target # invoke other target | |
inner-target: | |
@echo $@ # print target name |
This file contains hidden or 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
export DISPLAY=:0 | |
if [ -x /usr/bin/Xvfb ] && [ -x /usr/bin/VBoxClient ] && [ ! -f /tmp/.X11-unix/X0 ]; then | |
nohup Xvfb -screen 0 120x80x8 > /dev/null 2>&1 & | |
sleep 0.5 | |
VBoxClient --clipboard | |
fi | |
if [ -x /usr/bin/xsel ]; then | |
alias pbcopy='xsel --display :0 --input --clipboard' | |
alias pbpaste='xsel --display :0 --output --clipboard' | |
fi |
This file contains hidden or 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
export LANG=ja_JP.UTF-8 | |
autoload -Uz compinit | |
compinit -C | |
zstyle ':completion:*' list-colors '' | |
zstyle ':completion:*:default' menu select=2 |
This file contains hidden or 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
resource "aws_ecr_repository" "ecr_repositories" { | |
count = "${length(var.list_of_images)}" | |
name = "${var.list_of_images[ count.index ]}" | |
} | |
resource "aws_ecr_repository_policy" "ecr_policies" { | |
count = "${ length(var.list_of_images) * length(var.list_of_allowed_iam_users) }" | |
repository = "${var.list_of_images[ count.index % length(var.list_of_images) ]}" | |
policy = "${data.template_file.ecr_policy_allowed_iam_users.*.rendered[ count.index ]}" | |
} |
NewerOlder