Skip to content

Instantly share code, notes, and snippets.

View romepeng's full-sized avatar

romepeng romepeng

View GitHub Profile
#!/bin/bash
# Set iptables for clash redir mode

REDIR_PORT=1234
DNS_PORT=2253
UID_OWNER=1000

iptables -t nat -N CLASH
@noam-g4
noam-g4 / .tmux.conf
Last active September 29, 2024 09:40
# reload config
bind r source-file ~/.tmux.conf
# set index to start from 1
set -g base-index 1
setw -g pane-base-index 1
# scroll through windows
bind -n PageUp next-window
bind -n PageDown previous-window
@romepeng
romepeng / .Cloud.md
Created September 29, 2021 14:44 — forked from imba-tjd/.Cloud.md
☁️ 一些免费的云资源

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

其他人的集合

#!/bin/bash
# Set iptables for clash redir mode

REDIR_PORT=1234
DNS_PORT=2253
UID_OWNER=1000

iptables -t nat -N CLASH
@sanrandry
sanrandry / nginx_sites-available_folder_not_found.md
Last active February 2, 2025 15:14
nginx sites-available folder not found

nginx sites-available folder not found

create the sites-available and sites-enabled folder

sudo mkdir /etc/nginx/sites-available
sudo mkdir /etc/nginx/sites-enabled

edit the http block inside /etc/nginx/nginx.conf and add this line

include /etc/nginx/sites-enabled/*;
@zhensongren
zhensongren / install_mysql_in_wsl.md
Last active March 11, 2024 16:59
Set up MySQL on local machine (Windows Subsystem for Linux, WSL2)

Upgrade the Repositories

sudo apt update sudo apt upgrade

Install MySQL 5.7

sudo apt install mysql-server

Secure MySQL Installation

sudo apt install mysql-server #To do the high security provide all answers to yes

@PatrickAlphaC
PatrickAlphaC / iex_cloud_sample.py
Last active March 14, 2020 06:27
Simple IEX Cloud Startup
import requests
import json
token = 'XXXX'
# Get a key from https://iexcloud.io/cloud-login#/register/
ticker = 'TSLA'
url = 'https://cloud.iexapis.com/stable/stock/{}/quote?token={}'.format(ticker, token)
response = requests.get(url)
print(response.json())
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@imba-tjd
imba-tjd / .Cloud.md
Last active October 15, 2025 04:28
☁️ 一些免费的云资源

  • IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装。PaaS提供语言环境和框架(可以自己选)。SaaS只能使用开发好的软件(卖软件本身,如税务会计、表格文字处理)。BaaS一般类似于非关系数据库,但各家不通用
  • 云服务的特点:零前期成本 & 按需付费 & 弹性(类似于租,可随时多加、退掉;但没有残值)、高可用(放在机房中,不同AZ间水电隔离)

其他人的集合

@ferventcoder
ferventcoder / NonAdmin.cmd
Last active August 29, 2025 18:30
Installing Software as a Non-Administrator Using Chocolatey
:: Pick one of these two files (cmd or ps1)
:: Set directory for installation - Chocolatey does not lock
:: down the directory if not the default
SET INSTALLDIR=c:\ProgramData\chocoportable
setx ChocolateyInstall %INSTALLDIR%
:: All install options - offline, proxy, etc at
:: https://chocolatey.org/install
@powershell -NoProfile -ExecutionPolicy Bypass -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH="%PATH%;%INSTALLDIR%\bin"