Skip to content

Instantly share code, notes, and snippets.

@Bintopia
Bintopia / set-apt-proxy.md
Created April 30, 2022 12:13 — forked from wonderbeyond/set-apt-proxy.md
[ubuntu][socks5][proxy] Set proxy for apt

Writing an apt proxy conf file /etc/apt/apt.conf.d/proxy.conf as below.

Acquire::http::Proxy "socks5h://127.0.0.1:1080";
Acquire::https::Proxy "socks5h://127.0.0.1:1080";
Acquire::socks::Proxy "socks5h://127.0.0.1:1080";

And the proxy settings will be applied the next time we run apt.

@Hakky54
Hakky54 / openssl_commands.md
Last active May 3, 2024 03:14 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active May 7, 2024 19:33
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@yougg
yougg / proxy.md
Last active May 7, 2024 18:58
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
@Cartexius
Cartexius / install_gtest_ubuntu.md
Last active March 29, 2024 10:11
Install gtest in Ubuntu
@nicklasfrahm
nicklasfrahm / .clang-format
Last active March 11, 2024 12:22
Opinionated .clang-format for JS boys coming from prettier and stumbling into C++
AccessModifierOffset: 2
AlignAfterOpenBracket: true
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: true
# source:
# https://discussions.apple.com/message/32354266#message32354266
sudo mdutil -Ea
sudo mdutil -ai off
sudo mdutil -ai on
@LucaCappelletti94
LucaCappelletti94 / Firing up LaTex on macOS.md
Last active March 29, 2024 22:33
Firing up Latex on macOS

Firing up LaTex on macOS 🔥

As I'm writing this small tutorial, I assume you've read my previous one about setting up macOS, so if for any tool I'll use without explanation, look to that other article.

MacTex

The full version IS NOT MANDATORY, as in the tutorial that follows I installed the smaller version of MacTeX and proceded installing every needed dependency. Installing the complete package is about ~3.5GB of download and ~5GB on disk, the smaller one is just about 80MBs.

Click here to download the complete version or here to download the smaller version.

Gnuplot

@peterdemartini
peterdemartini / command.sh
Last active April 28, 2024 02:42
Exclude node_modules in timemachine
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion
@tomysmile
tomysmile / mac-setup-redis.md
Last active March 18, 2024 22:12
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis