Skip to content

Instantly share code, notes, and snippets.

View Zane5's full-sized avatar
🎯
Focusing

Zane5 Zane5

🎯
Focusing
View GitHub Profile
@Zane5
Zane5 / readme.md
Created September 1, 2023 02:17 — forked from Quick104/readme.md
Expose a server behind CG:NAT via Wireguard
@Zane5
Zane5 / Android-Emulator-on-AWS-EC2.txt
Created June 1, 2023 23:59 — forked from atyachin/Android-Emulator-on-AWS-EC2.txt
Installing and running Android Emulator on Amazon AWS EC2 (Ubuntu 16.04 / m5.xlarge)
Update (2022): https://gist.github.com/atyachin/2f7c6054c4cd6945397165a23623987d
Steps for installing the Android Emulator from EC2 console:
-----------------------------------------------------------
sudo apt install default-jdk
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d android-sdk
sudo mv android-sdk /opt/
export ANDROID_SDK_ROOT=/opt/android-sdk
@Zane5
Zane5 / Android_Emulator_AWS_EC2_ARM64_2022.txt
Created June 1, 2023 03:18 — forked from atyachin/Android_Emulator_AWS_EC2_ARM64_2022.txt
Running headless android emulator on AWS EC2 Ubuntu instance (ARM64 / aarch64) - 2022
Android Emulator (ARM64) on EC2 - 2022
---------------------------------------
1. Launch EC2 ARM based Instance (a1.metal / a1.2xlarge): (16 Gb RAM, 32Gb Disk), Ubuntu Server 22.04 LTS (HVM) ARM x64
2. sudo apt update && sudo apt upgrade
3. sudo apt install default-jdk python3-pip repo python-is-python3 unzip libpcre2-dev adb
4. wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip
5. unzip commandlinetools-linux-8512546_latest.zip -d android-sdk
6. sudo mv android-sdk /opt/
7. mkdir /opt/android-sdk/cmdline-tools/latest
8. mv /opt/android-sdk/cmdline-tools/* /opt/android-sdk/cmdline-tools/latest (ignore the error)
@Zane5
Zane5 / install-docker.md
Created January 3, 2023 10:28 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@Zane5
Zane5 / markdownhere.css
Last active July 9, 2016 07:21 — forked from xiaolai/markdownhere.css
markdown-here-css
.markdown-here-wrapper {
font-size: 16px;
line-height: 1.8em;
letter-spacing: 0.1em;
background-color: #EFF2F2;
}
pre, code {
font-size: 14px;
@Zane5
Zane5 / 提问的智慧.md
Created May 17, 2016 16:20 — forked from zer4tul/提问的智慧.md
Simplified Chinese edition of "How To Ask Questions The Smart Way"
```
email address: auto_sms@mail.example.cn
email passwd: h9LH
```
import smtplib
import email.utils
#!/bin/sh
# author: zheng
# date: 201505
# version: 0.0.0
# this file for merged the error-report log file
#path_work="/home/"
path_work="/home/"
echo $path_work
require 'mail'
require 'date'
yesterday=Date.today.prev_day.strftime("%Y%m%d")
yesterdayLogFile="./" + yesterday + ".log"
subject="技术指标 " + yesterday
body="请查看附件。"
options = {
:openssl_verify_mode => OpenSSL::SSL::VERIFY_NONE,
@Zane5
Zane5 / analysis log file portal
Last active August 29, 2015 14:21
merge some files
#!/bin/gawk
BEGIN{
cnt=1;
cnt_2=0;
cnt_10=0;
cnt_499=0;
cnt_500=0;
total_time=0;
cnt_portal=0;
cnt_portal_2=0;