Skip to content

Instantly share code, notes, and snippets.

@aleadag
aleadag / 0arch-logo.png
Created March 11, 2025 03:57 — forked from sjsivert/0arch-logo.png
Arch Matebook installation notes
0arch-logo.png
@aleadag
aleadag / grok_vi.mdown
Created November 7, 2023 08:19 — forked from nifl/grok_vi.mdown
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)

@aleadag
aleadag / Run shell script on gist.md
Last active January 19, 2023 15:47 — forked from mob-sakai/_README.md
Run shell script on gist

Run shell script on gist

Shells that support process substitution such as bash and zsh allow to run shell script on gist as follows.

# With curl:
bash <(curl -sL ${GIST_URL}) args...

# With wget:
@aleadag
aleadag / README-badges.md
Created November 10, 2022 03:08 — forked from tterb/README-badges.md
A collection of README badges

Badges

License

MIT License GPLv3 License AGPL License

Version

Version GitHub Release

@aleadag
aleadag / gist:f60308bc3508450fc11acece290df075
Created August 19, 2022 16:22 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@aleadag
aleadag / npm.taobao.sh
Created April 13, 2022 16:15 — forked from lvxianchao/npm.taobao.sh
่ฎพ็ฝฎ npm ๅ’Œ yarn ็š„้•œๅƒๆบไธบๆท˜ๅฎ้•œๅƒๆบ
# ==========================================================
# NPM
# ==========================================================
npm set registry https://r.npm.taobao.org # ๆณจๅ†Œๆจกๅ—้•œๅƒ
npm set disturl https://npm.taobao.org/dist # node-gyp ็ผ–่ฏ‘ไพ่ต–็š„ node ๆบ็ ้•œๅƒ
## ไปฅไธ‹้€‰ๆ‹ฉๆทปๅŠ 
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass ไบŒ่ฟ›ๅˆถๅŒ…้•œๅƒ
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron ไบŒ่ฟ›ๅˆถๅŒ…้•œๅƒ

Use Proxy for Git/GitHub

Generally, the Git proxy configuration depends on the Git Server Protocal you use. And there're two common protocals: SSH and HTTP/HTTPS. Both require a proxy setup already. In the following, I assume a SOCKS5 proxy set up on localhost:1080. But it can also be a HTTP proxy. I'll talk about how to set up a SOCKS5 proxy later.

SSH Protocol

When you do git clone ssh://[user@]server/project.git or git clone [user@]server:project.git, you're using the SSH protocal. You need to configurate your SSH client to use a proxy. Add the following to your SSH config file, say ~/.ssh/config:

ProxyCommand nc -x localhost:1080 %h %p
@aleadag
aleadag / archlinux-install-notes.md
Created July 28, 2021 12:16 — forked from mloskot/archlinux-install-notes.md
My notes on Arch Linux installation
@aleadag
aleadag / ExportTool.cs
Created April 28, 2021 11:49 — forked from larryhou/ExportTool.cs
Command-line building tool for Unity project
using UnityEditor;
using System.Collections.Generic;
// Put this memu command script into Assets/Editor/
class ExportTool
{
static void ExportXcodeProject ()
{
EditorUserBuildSettings.SwitchActiveBuildTarget (BuildTarget.iOS);
@aleadag
aleadag / gist:c466eee8116638ac67063dca650cf5a9
Created April 20, 2021 01:48 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote