これなら問題ない
fn refe(addr: &String) {
// addr.push('!');
println!("{}", addr);
}
fn main() {
let mut v = "aa".to_string();
// tflint --recursive --config $(pwd)/.tflint.hcl -f json で出力した結果を使う | |
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"log" | |
"os" | |
"path/filepath" |
use std::io; | |
use std::io::Read; | |
use std::fs::File; | |
use std::error::Error; | |
fn main() -> Result<(), Box<dyn Error>> { | |
read_username_from_file()?; | |
Ok(()) | |
} | |
fn read_username_from_file() -> Result<String, io::Error> { | |
let mut s = String::new(); |
user www-data; | |
worker_processes auto; | |
error_log error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 4096; ## Default: 1024 | |
} |
#!/bin/bash | |
cd "${0%/*}" | |
curl -s http://localhost:<port>/debug/pprof/profile?seconds=60 > $1/cpu.pprof | |
go tool pprof -png $1/cpu.pprof > $1/cpu.png |
#!/bin/bash | |
set -ux | |
cd "${0%/*}" | |
dir="${1%/}" | |
cp kataribe.toml $dir | |
cat $dir/access.log | kataribe > $dir/result.txt | |
sudo cp -a /var/log/mysql/mysql-error.log $dir |
#!/bin/bash | |
set -ux | |
cd "${0%/*}" | |
dir=$(date +%Y-%m-%d-%H-%M-%S) | |
mkdir $dir | |
touch $dir/$dir | |
cp -a nginx.conf $dir |
sudo git clone https://github.com/ahmetb/kubectx /opt/kubectx | |
sudo ln -s /opt/kubectx/kubectx /usr/local/bin/kubectx | |
sudo ln -s /opt/kubectx/kubens /usr/local/bin/kubens | |
mkdir -p ~/.config/fish/completions | |
ln -s /opt/kubectx/completion/kubectx.fish ~/.config/fish/completions/ | |
ln -s /opt/kubectx/completion/kubens.fish ~/.config/fish/completions/ |
git_branch(){ | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$(git_branch)\$ " |
これなら問題ない
fn refe(addr: &String) {
// addr.push('!');
println!("{}", addr);
}
fn main() {
let mut v = "aa".to_string();
<?php | |
$url = "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_HEADER, false); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); | |
$file = curl_exec($ch); | |
$info = curl_getinfo($ch); | |
curl_close($ch); |