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
struct Example { | |
number: i32, | |
} | |
impl Example { | |
fn boo() { | |
println!("boo! Example::boo() was called!"); | |
} | |
fn answer(&mut self) { | |
self.number += 42; | |
} |
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/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 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 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 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 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 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 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 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 ]}" | |
} |
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
{ | |
"extends": "standard", | |
"rules": { | |
"semi": [2, "always"] | |
} | |
} |
NewerOlder