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
{% for t in xs %} | |
{{ loop.index }} - {{ t }} | |
{% endfor %} |
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
# https://zenn.dev/de_teiu_tkg/articles/1b9025d3a6db71 | |
sudo apt-get install openjdk-17-jdk-headless tmux | |
sudo timedatectl set-timezone Asia/Tokyo | |
# https://www.minecraft.net/ja-jp/download/server | |
wget https://piston-data.mojang.com/v1/objects/c9df48efed58511cdd0213c56b9013a7b5c9ac1f/server.jar | |
sudo mkdir /opt/minecraft-server | |
sudo mv server.jar /opt/minecraft-server/ |
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
set virtualedit=onemore | |
set showmatch | |
set incsearch | |
set hlsearch | |
set ignorecase | |
set smartcase | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab |
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
- hosts: localhost | |
connection: local | |
gather_facts: no | |
vars: | |
enabled: yes | |
tasks: | |
- debug: | |
msg: enabled! | |
when: | |
- "{{ enabled | default(false) }}" |
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
const { parse, format } = require('date-fns'); | |
const { utcToZonedTime } = require('date-fns-tz'); | |
function formatDateString(s) { | |
const date = parse(s, 'EEE, dd MMM yyyy HH:mm:ss xx', new Date()); | |
return format(utcToZonedTime(date, 'Asia/Tokyo'), 'yyyy/MM/dd'); | |
} |
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 Element { | |
value: i32, | |
} | |
impl Element { | |
pub fn change_to(&mut self, val: i32) { | |
self.value = val; | |
} | |
pub fn run(&self) { | |
println!("done {}", self.value); | |
} |
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
pub mod custom { | |
use thiserror::Error; | |
#[derive(Debug, Error)] | |
#[error("{message:} ({line:}, {column:})")] | |
pub struct JsonError { | |
pub message: String, | |
pub line: usize, | |
pub column: usize, | |
} |
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
package test.aws.ssm; | |
import com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement; | |
import com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagementClientBuilder; | |
import com.amazonaws.services.simplesystemsmanagement.model.GetParameterRequest; | |
import com.amazonaws.services.simplesystemsmanagement.model.GetParameterResult; | |
public class App { | |
public static void main(String[] args) { | |
final AWSSimpleSystemsManagement ssm = AWSSimpleSystemsManagementClientBuilder.defaultClient(); |
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
- hosts: localhost | |
connection: local | |
gather_facts: false | |
vars_files: | |
- group_vars/{{ stage }}/all.yml | |
- group_vars/{{ stage }}/aws.yml | |
tasks: | |
- set_fact: | |
r5: "{{ aws.ec2.searches | selectattr('instance_type', 'match', '^r5\\..+') | list }}" |
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
- hosts: localhost | |
gather_facts: false | |
vars: | |
db: | |
replicas: | |
- id: 1 | |
dns_record: host1 | |
- id: 2 | |
dns_record: host2 |
NewerOlder