Skip to content

Instantly share code, notes, and snippets.

@zfb132
zfb132 / powershell_proxy.md
Last active March 31, 2025 16:26
Windows配置Powershell代理

方法一:
为 PowerShell 设置代理,命令如下:

$Env:http_proxy="http://127.0.0.1:7890";
$Env:https_proxy="http://127.0.0.1:7890";

这是临时命令,重新代理终端需要重新输入
如果想要永久设置代理,建议使用自定义配置,使每次代理 PowerShell 窗口时,运行如上命令:

在 PowerShell 窗口中运行如下指令:

@moriwaka
moriwaka / README.md
Last active March 31, 2025 16:25
PDF Document Downloader from docs.redhat.com

Usage:

```
$ mkdir RHEL9Doc
$ cd RHEL9Doc
$ fetchdoc.sh https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9
```

Prerequirement: curl, GNU Parallel

2024-11-21: fix for docs.redhat.com update

@jeffjohnson9046
jeffjohnson9046 / git-ignore.sh
Created August 11, 2015 21:02
Remove unwanted files from a git repo AFTER adding a .gitignore. The files will remain on disk.
## I just ran into this after initializing a Visual Studio project _before_ adding a .gitignore file (like an idiot).
## I felt real dumb commiting a bunch of files I didn't need to, so the commands below should do the trick. The first two commands
## came from the second answer on this post: http://stackoverflow.com/questions/7527982/applying-gitignore-to-committed-files
# See the unwanted files:
git ls-files -ci --exclude-standard
# Remove the unwanted files:
git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached

DHCP setup of a single node

TL;DR Set up your sole node Proxmox VE install as any other server - with DHCP assigned IP address. Useful when IPs are managed as static reservations or dynamic environments. No pesky scripting involved.


ORIGINAL POST DHCP setup of a single node

@mob-sakai
mob-sakai / _README.md
Last active March 31, 2025 16:21
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:

Ruby: The future of frozen string literals

What is a literal?

In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.

Some examples:

7 # integer literal
@Tynael
Tynael / README.md
Last active March 31, 2025 16:19
How to use npx to run gist based scripts
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active March 31, 2025 16:18
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@RAJA102002
RAJA102002 / clean-up-unused-github-rpositories.md
Created March 31, 2025 16:05 — forked from ntamvl/clean-up-unused-github-rpositories.md
Clean Up Unused GitHub Repositories! Delete all unused repositories and forgotten forks in 6 (semi)-automatic steps!

Clean Up Unused GitHub Repositories!

Delete all unused repositories and forgotten forks in 6 (semi)-automatic steps!

Ugh. Github forces me to type my password for every fork and repository I want to delete. That’s smart and all, but what if one wants to mass-delete a bunch of old, unused, forgotten, dirty little repositories that make his repository list look like a mess? well, that person follows this short guide:

[1.] Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click)

https://github.com/wildeyes?tab=repositories
@Chester-Gillon
Chester-Gillon / Windows_11_install_on_HP_Z640.md
Last active March 31, 2025 16:16
Windows 11 install on HP Z640

0. Introduction

This looks at installing Windows 11 on a HP Z640.

1. Starting point

The PC had Windows 10 Pro Version 22H2 (OS Build 19045.4474) installed.

Updated the BIOS to the latest version M60 v02.62 01/04/2024 and enabled secure boot.