Skip to content

Instantly share code, notes, and snippets.

View andatoshiki's full-sized avatar
🥪
=🍞+🔪(🥩)+🔪(🧀)+🔪(🥒)+🔪(🍅)+✋(🥬)+🍞;

Anda Toshiki andatoshiki

🥪
=🍞+🔪(🥩)+🔪(🧀)+🔪(🥒)+🔪(🍅)+✋(🥬)+🍞;
View GitHub Profile

Required Skills Inventory

  • Import features from the Java Standard Library
  • Declare and instantiate a Scanner
  • Get input from the user using a Scanner
  • Use a while loop to get the computer to repeat instructions
  • Use a for loop to get the computer to repeat instructions
  • Use a switch/case structure to get the computer to make a decision
  • Use nested loops and decisions to control the flow of a program
  • Accumulate a total in a variable
@andatoshiki
andatoshiki / ev3-2025-3-5.m
Last active March 27, 2025 00:30
FSE100: Lego EV3 Car with Claw Pick-up/Autonomous Directional Handling Project
% Global Variables
speedFwd = 70; % Forward speed
speedBwd = -70; % Backward speed
speedTurn = 40; % Turning speed
sensorPort = 4; % Color sensor port
ultrasonicPort = 2; % Ultrasonic sensor port (right side)
thresholdDistance = 20; % Ideal distance from the wall
maxTurnTime = 1.0; % Max turn duration to avoid circles
global key
@andatoshiki
andatoshiki / accelerate-and-secure-with-cloudflared.md
Created August 24, 2024 04:21
使用 Cloudflare Tunnel 保护服务器

This article is also available in English, at Use Cloudflare Argo Tunnel (cloudflared) to accelerate and protect your website.

本文于 2024-03-01 更新,更新了新版本的 cloudflared 部署和安装方式

是的,这是一篇记录 cloudflared 的使用历程和一些思路的文章,关于 Cloudflare 的 Argo Tunnel 的用法,我们在 「Cloudflare Argo Tunnel 小试:我终于可以用树莓派做网站啦」 文章中可以看到:Cloudflare Argo Tunnel 提供一个轻量级的 daemon 程序,被称为 cloudflared,用于安装在你自己的机器上并主动和 Cloudflare 保持连接,并可以提供 Web 服务,用 Cloudflare 的话来说,就是:

With Tunnel, users can create a private link from their origin server directly to Cloudflare without a publicly routable IP address. Instead, this private connection is established by running a lightweight daemon, cloudflared, on your origin, which creates a secure, outbound-only connection. This means that only traffic that routes through Cloudflare can reach your origin.

我们之前要建立一个网站并加入 Cloudflare 一般会有如下典型的步骤:

-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGa93SMBEADjZv9Bd6I+/SBegjXBoZx4vtZYo1ed4coRRNuCLPB3juppus3a
pzVooA2B24hRLYriSe87ile38oOJqQ7nh8jwJKq2CF2lAgchapo6NZ4XfctPRgao
gi5yus5qp9TRf3/47uQrit61U/jDmZGImZXUr+XWgnOJykkYEqqFjESIRWZSlozk
Fwj1C3A6Hsc0ySlXCmuNmaoZBg2dAabTkCXK6a9JCrkWH74eWTJqZZtWa+qMqk8Y
Kn2rWEg/3L/UvDEZl98E0M+Wj7xd9evANo7M1+YJixvXCM37QkXHvJOzUKqFpmj/
9w6mSQbLR1eZYsR0VxOqjLrthe7YESXLES6Lgs4tSo3rAwE8ne17c1bz6Ay5boZf
hGxXZF2a13bttpM37sXYtMEQ8yr6XdjTpa954+CMiWCVNQAdW3NoKBDN+jO+Rgpk
45+RWeoSjmjv8IoKqkOmBhthpOt7F0mljW4d7PrmcaWOqvhcFb9Xbx7bt6ZWvD1R
@andatoshiki
andatoshiki / archive-key.asc
Last active August 19, 2024 17:04
Shikigotchi missing PGP key for Kali-pi dependency
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: Hostname:
Version: Hockeypuck 2.2
xsBNBFuGZGIBCADSWnLXzqoWr3PulNhkeaAGTE03AK0dogWjT8noy7IxiwTdiQSe
YEirH7dQ7y/ibst7zijVJPWKb+OLRkhJV5vowC0tFxYjMNxvv5OoNiVIV8nYhir/
0ervR59DfJ8T9lXVlUnohhEsuhitg/EoCFj58XeWL6YUhqLPSfxdrhMPRr+nHCo9
m9PuHFkcvepXGw3tIHu+cwKptTD27Wglrodra4WC5tdSm7HEvoJNp3N87j2JR1D+
wgh21TtpT8ro8ZGchtwLFuNt7B4OsewWoVVGtrJUuuFSTeFaQw9iMFTJ9qeeZawL
vRZbnLwK8LgX/917J7ipCIuMAaPmKi+Un+3rABEBAAHNMkNhcnN0ZW4gQm9ldmlu
@andatoshiki
andatoshiki / user-agemt.md
Created April 14, 2023 00:55
1000 user agent list reference for development purposes.
  • Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
  • Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
  • Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
  • Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
  • Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
  • Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
  • Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
  • Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
  • Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
  • Mozilla/5.0 (Windows NT 6
@andatoshiki
andatoshiki / keybase.md
Last active August 24, 2024 15:36
Keybase GitHub identity proof for username @andatoshiki

Keybase proof

I hereby claim:

  • I am andatoshiki on github.
  • I am andatoshiki (https://keybase.io/andatoshiki) on keybase.
  • I have a public key whose fingerprint is AB92 8BF1 0308 3BB8 7246 2CBD 9301 5C3A DA9B 0FD6

To claim this, I am signing this object:

@andatoshiki
andatoshiki / country-code.md
Created February 7, 2023 07:20
🤍 COUNTRY CODES ALPHA-2 & ALPHA-3
Country Alpha-2 code Alpha-3 code Numeric
Afghanistan AF AFG 004
Albania AL ALB 008
Algeria DZ DZA 012
American Samoa AS ASM 016
Andorra AD AND 020
Angola AO AGO 024
Anguilla AI AIA 660
Antarctica AQ ATA 010
@andatoshiki
andatoshiki / codespaces.zsh-theme
Created November 13, 2022 10:45 — forked from renbaoshuo/codespaces.zsh-theme
GitHub Codespaces zsh Theme
# Codespaces zsh prompt theme
__zsh_prompt() {
local prompt_username
if [ ! -z "${GITHUB_USER}" ]; then
prompt_username="@${GITHUB_USER}"
else
prompt_username="%n"
fi
PROMPT="%{$fg[green]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow
PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd
@andatoshiki
andatoshiki / baidunetdisk.js
Created November 7, 2022 12:54
百度网盘直链提取工具 aria2/idm
// ==UserScript==
// @name 百度网盘简易下载助手(直链下载复活版)
// @namespace http://bd.softxm.cn/bd/
// @version 1.5.6
// @antifeature membership
// @description 一个纯净好用的直链下载助手,绝无多余附加功能。免SVIP会员,免安装浏览器扩展,无视黑号,只要你有个IDM或Aria2,就能享受极速下载的快感!
// @icon data:image/jpeg;base64,/9j/4Rc0RXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAExAAIAAAAiAAAAcgEyAAIAAAAUAAAAlIdpAAQAAAABAAAAqAAAANQAAABIAAAAAQAAAEgAAAABQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpADIwMjA6MDk6MDkgMDA6Mjc6NTYAAAOgAQADAAAAAf//AACgAgAEAAAAAQAAAGSgAwAEAAAAAQAAAGQAAAAAAAAABgEDAAMAAAABAAYAAAEaAAUAAAABAAABIgEbAAUAAAABAAABKgEoAAMAAAABAAIAAAIBAAQAAAABAAABMgICAAQAAAABAAAV+gAAAAAAAABIAAAAAQAAAEgAAAAB/9j/7QAMQWRvYmVfQ00AAv/uAA5BZG9iZQBkgAAAAAH/2wCEAAwICAgJCAwJCQwRCwoLERUPDAwPFRgTExUTExgRDAwMDAwMEQwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBDQsLDQ4NEA4OEBQODg4UFA4ODg4UEQwMDAwMEREMDAwMDAwRDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDP/AABEIAKAAoAMBIgACEQEDEQH/3QAEAAr/xAE/AAABBQEBAQEBAQAAAAAAAAADAAECBAUGBwgJCgsBAAEFAQEBAQEBAAAAAAAAAAE