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
cd /etc/ssh | |
rm -f ssh_host_*key* | |
ssh-keygen -A | |
rm ssh_host_key ssh_host_key.pub -f | |
chmod 0640 ssh_host_*key | |
chown root:ssh_keys ssh_host_*key | |
chmod 0644 ssh_host_*key.pub | |
# | |
systemctl restart sshd |
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-StrictMode -Version Latest | |
$ErrorActionPreference = "Stop" | |
# $ScriptDir = Split-Path -parent $MyInvocation.MyCommand.Path | |
function isFileDir { | |
[OutputType([string])] | |
Param ([string]$file) | |
$i = Get-Item -LiteralPath $file -ErrorAction silent | |
if ($null -eq $i) { |
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
fn main() { | |
const VERSION: &'static str = env!("CARGO_PKG_VERSION"); | |
const PKGNAME: &'static str = env!("CARGO_PKG_NAME"); | |
println!("{} v{}", PKGNAME, VERSION); | |
// println!("{} v{}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION")); | |
// でもOK | |
} |
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 | |
pkgs=(bpftool bpftool-debuginfo kernel kernel-abi-whitelists kernel-debug kernel-debug-debuginfo kernel-debug-devel kernel-debuginfo kernel-debuginfo-common-x86_64 kernel-devel kernel-doc kernel-headers kernel-tools kernel-tools-debuginfo kernel-tools-libs kernel-tools-libs-devel perf perf-debuginfo python-perf python-perf-debuginfo) | |
installed=() | |
for pkg in ${pkgs[@]}; do | |
rpm -q "$pkg" &> /dev/null | |
if [ $? -eq 0 ] ; then | |
installed+=("$pkg") | |
fi | |
done |
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 main | |
import ( | |
"fmt" | |
) | |
type SS interface { | |
DoAnything() | |
} |
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 main | |
import ( | |
"fmt" | |
) | |
type Hoge struct { | |
label string | |
cnt int | |
} |
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 main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
TF := `2006-01-02 15:04:05.999 -0700` |
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
- name: jinja2 has not list comprehension. | |
hosts: localhost | |
become: no | |
gather_facts: false | |
vars: | |
data: [foo, bar, baz] | |
tasks: | |
- | |
debug: | |
msg: > |
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
- name: handler test | |
hosts: localhost | |
become: no | |
gather_facts: false | |
force_handlers: true | |
#------------- | |
tasks: | |
- name: Create working directory. | |
tempfile: | |
state: directory |
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
- name: join and sequence example | |
hosts: localhost | |
become: no | |
gather_facts: False | |
vars: | |
data: [foo, bar, baz] | |
tasks: | |
- | |
name: join example | |
debug: msg="{{ data|join(', ') }}" |