Skip to content

Instantly share code, notes, and snippets.

set main-view-id = yes
set main-view-id-width = 16
set main-view-date = custom
set main-view-date-format = "%Y-%m-%dT%H:%M:%S%Z"
set main-view-author-width = 20
bind generic C none
bind generic C !<git checkout %(commit)
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "flutter_tools",
"request": "launch",
fe4e273dccb328ea5e2291a730cf527cf7282187
pip install esdk-obs-python --trusted-host pypi.org
{
"tag": "",
"files": {
"darwin-arm64": "/Users/username/flutter_engine_3.22/artifacts.zip"
}
}
FLUTTER_OHOS_STORAGE_BASE_URL=https://flutter-ohos.obs.cn-south-1.myhuaweicloud.com
alias gp="git pull"
alias gpr="git pull --rebase"
alias gc="git checkout ."
alias grs="git reset ."
alias gps="git push"
alias gpf="git push -f"
alias gcan="git commit --amend"
alias gcane="git commit --amend --no-edit"
alias gs="git status"
alias gd="git diff"
@HaskellZhangSong
HaskellZhangSong / config
Last active July 4, 2024 07:44 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = <Name>
email = <email>
username = <username>
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@HaskellZhangSong
HaskellZhangSong / gist:c9c7769587d87013cae16547d2519147
Last active July 17, 2021 06:29
Block Sougou InputMethod to access Internet on Windows
New-NetFirewallRule -DisplayName "Block Sougou ConfigIE TCP" -Direction Inbound -Program "C:\Program Files (x86)\SogouWBInput\4.3.0.2160\ConfigIE.exe" -Protocol TCP -Action Block
New-NetFirewallRule -DisplayName "Block Sougou ConfigIE UDP" -Direction Inbound -Program "C:\Program Files (x86)\SogouWBInput\4.3.0.2160\ConfigIE.exe" -Protocol UDP -Action Block
New-NetFirewallRule -DisplayName "Block Sougou ErrorReport TCP" -Direction Inbound -Program "C:\Program Files (x86)\SogouWBInput\4.3.0.2160\ErrorReport.exe" -Protocol TCP -Action Block
New-NetFirewallRule -DisplayName "Block Sougou ErrorReport UDP" -Direction Inbound -Program "C:\Program Files (x86)\SogouWBInput\4.3.0.2160\ErrorReport.exe" -Protocol UDP -Action Block
New-NetFirewallRule -DisplayName "Block Sougou ImeUtil TCP" -Direction Inbound -Program "C:\Program Files (x86)\SogouWBInput\4.3.0.2160\ImeUtil.exe" -Protocol TCP -Action Block
New-NetFirewallRule -DisplayName "Block Sougou ImeUtil UDP" -Direction Inbound -Program "C:\Program Files (x86)\SogouWB
@HaskellZhangSong
HaskellZhangSong / ubuntu-alibabab-deb-src-config.sh
Last active January 5, 2020 15:50
Ubuntu配置阿里镜像源
cp /etc/apt/source.list /etc/apt/source.list.bak
rm /etc/apt/source.list
cat >>/etc/apt/sources.list<<EOF
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
@HaskellZhangSong
HaskellZhangSong / dynamic-nginx-module-ubuntu-18.04.sh
Created December 27, 2019 16:13 — forked from excid3/dynamic-nginx-module-ubuntu-18.04.sh
How to compile a dynamic nginx module for Ubuntu 18.04
# Install dependencies that nginx was originally compiled with
sudo apt install libperl-dev libgeoip-dev libgd-dev
# Get the nginx source
wget https://nginx.org/download/nginx-1.14.0.tar.gz
tar zxf nginx-1.14.0.tar.gz
# Get the module source
wget https://github.com/fdintino/nginx-upload-module/archive/master.zip
unzip master.zip
@HaskellZhangSong
HaskellZhangSong / ss_config_to_ss_url.sh
Created October 16, 2019 02:58
ss server config to ss url and qrcode
#! /bin/bash
method=`cat $1 | jq '.method'`
method1=`sed -e 's/^"//' -e 's/"$//' <<<"$method"`
password=`cat $1 | jq '.password'`
password1=`sed -e 's/^"//' -e 's/"$//' <<<"$password"`
server_port=`cat $1 | jq '.server_port'`
server_ip=`curl -s ip.sb`
url=$(echo -n "${method1}:${password1}@${server_ip}:${server_port}" | base64)