Skip to content

Instantly share code, notes, and snippets.

View satifanie's full-sized avatar
🏖️
I may be slow to respond.

Leo Tuan satifanie

🏖️
I may be slow to respond.
  • Melbourne
  • 10:29 (UTC +10:00)
View GitHub Profile
@satifanie
satifanie / .Cloud.md
Created April 15, 2023 15:35 — forked from imba-tjd/.Cloud.md
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@satifanie
satifanie / my.cnf
Created October 5, 2022 02:44 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@satifanie
satifanie / mosdns.yaml
Created September 1, 2022 03:36
mosdns的配置文件备份。其中,
# docker run -d \
# --name mosdns \
# --net=host \
# -v /opt/etc/mosdns:/etc/mosdns \
# --restart=always \
# irinesistiana/mosdns:latest
# 可参考改进版本:https://gist.github.com/satifanie/2a3b2d89bdcc56b79e8301fe2afc587e
# cat > /root/auto_update_geoxx.sh << EOF
# #!/bin/sh
@satifanie
satifanie / auto-update-geodat.sh
Created September 1, 2022 03:28
自动更新geosite geoip。供其他应用使用,增加了文件大小判断,避免下载了空文件影响程序使用。
#!/bin/sh
################# setup env
# download resource refer:
# https://github.com/Loyalsoldier/geoip
# https://github.com/Loyalsoldier/v2ray-rules-dat
# 使用 https://hub.fastgit.xyz/author/repo 加速
geoip="https://raw.fastgit.org/Loyalsoldier/geoip/release/geoip-only-cn-private.dat"
geosite="https://download.fastgit.org/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat"
minip=100000
@satifanie
satifanie / cloudflare-ipset.sh
Created August 8, 2022 06:13 — forked from KiNgMaR/cloudflare-ipset.sh
Cloudflare IPTABLES and IPSET scripts - fixed 2022-02-23
#!/bin/bash
# name of the ipset - v4 or v6 will be appended.
IPSET_NAME=cloudflare-
# argument: v4 or v6 (defaults to v4)
cloudflare_ipset ()
{
local ipv
local inetv
@satifanie
satifanie / firewall.user
Created August 8, 2022 06:08 — forked from stokito/firewall.user
OpenWrt: Allow only CloudFlare to access HTTP 80 and HTTPS 443 ports. Use if your uhttpd is hidden behind CF. Put this file to /etc/firewall.user. NOTE: It uses HTTP to get the list of IPs because to wget via https we need to install ca-certs. This makes you vulnerable to MiTM attacks but that's ok to be protected from internet's hackers
# https://www.cloudflare.com/ips replace the ips-v4 with ips-v6 if needed
# https://blog.cloudflare.com/cloudflare-now-supporting-more-ports/
for ip in `wget -qO- http://www.cloudflare.com/ips-v4`; do
iptables -I INPUT -p tcp -m multiport --dports 80,443,8080,8443,2052,2053,2082,2083,2086,2087,2095,2096,8880 -s $ip -j ACCEPT
done
#!/bin/sh
# cross & static compile shadowsocks-libev
PCRE_VER=8.41
PCRE_FILE="http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VER.tar.gz"
MBEDTLS_VER=2.6.0
MBEDTLS_FILE="https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz"
@satifanie
satifanie / iterm2-solarized.md
Created October 3, 2017 14:14 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@satifanie
satifanie / intro.md
Created October 3, 2017 14:14 — forked from derhuerst/intro.md
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.

<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
<compilerId>eclipse</compilerId>
</configuration>
<dependencies>