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
<?php | |
/** | |
* Markdon Syntax with marked.js | |
*/ | |
function plugin_markedjs_convert() | |
{ | |
$args = func_get_args(); | |
$body = array_pop($args); | |
$noskin = in_array("noskin", $args); |
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 | |
echo "Content-type: text/plain" | |
# echo "" # avahi-browseの出力になんか空行があるのでここを省略 | |
# query_paramのパース | |
get_query_string() { | |
saveIFS=$IFS | |
IFS='=&' |
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 | |
speedtest-cli --list | tail -n +2 | head -n 5 | while read s;do echo "### "$s;speedtest-cli --server $(echo $s | sed "s/\(\d*\)).*/\1/g") --simple --bytes;done > $(date +%Y%m%d-%H%M).txt |
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 | |
anyenv update | |
LATEST_NODE=$(nodenv install -l | grep '\ 10' | tail -n 1) | |
nodenv install $LATEST_NODE | |
nodenv local $LATEST_NODE | |
npm install -g yarn | |
yarn init | |
yarn add -D typescript prettier |
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 | |
K3S_VERSION=v0.8.0 | |
BIN_DIR=/usr/local/bin | |
# for master | |
#cat > /opt/k3s_env_put.sh << 'EOF' | |
##!/bin/bash | |
# | |
#ip=$(hostname | cut -d'.' -f1 | cut -d'-' -f2,3,4,5 | tr '-' '.') |
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
{"lastUpload":"2020-04-29T15:04:09.105Z","extensionVersion":"v3.4.3"} |
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
### system side setup ---------- | |
execute "enable docker-ce repo" do | |
repo = "https://download.docker.com/linux/fedora/docker-ce.repo" | |
command "dnf config-manager --add-repo=#{repo}" | |
not_if "test -e /etc/yum.repos.d/docker-ce.repo" | |
end | |
%w( | |
awscli |
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
import boto3 | |
ec2 = boto3.client("ec2") | |
ssm = boto3.client("ssm") | |
# refs https://qiita.com/cumet04/items/5888e037105e6ea5f6bc | |
def lambda_handler(event, context): | |
try: | |
targets = target_instances("cron", "true") |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>app</title> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css"> | |
</head> |
OlderNewer