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
import cv2 | |
import numpy as np | |
import pyautogui | |
import time | |
def main(): | |
s_filename = 'tabloid.png' | |
# Env: Raspberry OS chromium browser full screen mode on 1024px x 600px (7inch) display | |
# Trim tabloid area (include menu button) |
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
--- | |
meta: | |
state_label: unity_quiz # クイズを一意に識別するための文字列、ほかのものと被らないようにつけること | |
header: VRChat Unity Quiz # クイズのタイトル | |
command: '/unityクイズ' # クイズを呼び出すコマンド | |
quiz: | |
- name: Q1 | |
question: "\ | |
2020年12月現在、VRChatにアバターやワールドをアップロードするために\ |
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/bash | |
set -ue | |
NUM_LOOPS=1000 | |
use_cut(){ | |
for i in $(seq 1 $NUM_LOOPS) | |
do | |
line="i-ec56a9f5 vol-07d00601 servername" | |
instance_id=`echo $line | cut -d' ' -f1` | |
volome_id=`echo $line | cut -d' ' -f2` |
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/bash | |
sudo amazon-linux-extras install ansible2 |
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/bash | |
cd /tmp | |
wget http://openresty.org/download/ngx_openresty-1.4.3.1.tar.gz | |
tar xf ngx_openresty-1.4.3.1.tar.gz | |
git clone https://github.com/evanmiller/nginx_upstream_hash.git | |
cd ngx_openresty-1.4.3.1/ | |
sudo yum -y install pcre-devel openssl-devel | |
./configure --with-luajit --with-http_gzip_static_module --add-module=/tmp/nginx_upstream_hash |
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
--- | |
- hosts: localhost | |
gather_facts: no | |
tasks: | |
- name: Create EC2 Instance with user-data | |
local_action: | |
module: ec2 | |
region: ap-northeast-1 | |
image: ami-efbe98ee # Ubuntu 12.04 LTS, hvm:ebs, 20140829.2 | |
instance_type: t2.micro |
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/bash | |
namespace=AWS/Billing | |
os_name=`uname` | |
now=`date -u "+%Y-%m-%dT%H:%M:%SZ"` | |
if [ $os_name = "Darwin" ]; then | |
yesterday=`date -u -v-1d "+%Y-%m-%dT%H:%M:%SZ"` | |
else | |
yesterday=`date -u -d "1 days ago" "+%Y-%m-%dT%H:%M:%SZ"` | |
fi | |
start_time=${1:-$yesterday} |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowUsersAllActionsForCredentials", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:*LoginProfile", | |
"iam:*AccessKey*", | |
"iam:*SigningCertificate*" |
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/bash | |
set -u # Check unset variables only | |
#set -ue # Check unset variables. Exit on error | |
LANG=C | |
# Trap signals | |
trap_HUP() { | |
echo "Trap HUP signal." | |
exit 1 | |
} |
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
cat <<EOT >> ~/.bashrc | |
alias ishikawasan_gomennasai='sudo sed -i "s/\(SELINUX=\).*/\1disabled/" /etc/selinux/config \ | |
&& echo-sd "石川さんごめんなさい" 2>/dev/null \ | |
|| banner "石川さんごめんなさい" 2>/dev/null \ | |
|| echo "石川さんごめんなさい" | |
# お詫びのeject | |
eject -T 2>/dev/null && eject -T | |
sudo reboot' | |
EOT |
NewerOlder