Skip to content

Instantly share code, notes, and snippets.

@guweigang
guweigang / git_toturial
Last active April 26, 2024 06:41
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
@Brainiarc7
Brainiarc7 / refind-setup.md
Last active April 26, 2024 06:39
Setting up rEFInd on Ubuntu 16.04 LTS for multi-boot purposes with secure boot enabled.

Deploying rEFInd on Ubuntu 16.04 LTS with secure boot enabled

Hello guys,

For these dual-booting Ubuntu 16.04 with an alternate operating system in UEFI boot mode, it may often be necessary to use a third-party boot manager such as rEFInd, as it's significantly superior to grub2's on UEFI-capable systems.

This write-up assumes that:

(a). The user is running a current Ubuntu 16.04LTS operating system installation (preferably on a dual-boot system)

@zapisnicar
zapisnicar / telegram_bot.md
Last active April 26, 2024 06:38
How to create Telegram bot and send messages to group

How to create Telegram Bot and send messages to your group

  1. Create Telegram bot:

    Search for user @BotFather in Telegram app. Type /help in BotFather chat and wait for the reply. Type in the chat:

    /newbot

or select /newbot command from Help text. Answer few setup questions:

@mietzen
mietzen / macos-bitwarden-cli-with-touch-id.md
Last active April 26, 2024 06:37
How to use use Bitwarden CLI with macOS Touch ID

How to use Bitwarden CLI with macOS Touch ID

If you want to use Bitwarden CLI for ssh have a look at: How to use use Bitwarden CLI for SSH-Keys in macOS

Wirtten and tested on macOS Ventura

Configure Touch ID for the sudo command

To allow Touch ID on your Mac to authenticate you for sudo access instead of a password you need to do the following.

@insidegui
insidegui / ScrollViewOffsetModifier.swift
Created July 20, 2021 20:28
A SwiftUI ViewModifier that can be used to read a ScrollView's offset and store it into a @State property of the view
struct ScrollViewOffsetPreferenceKey: PreferenceKey {
static var defaultValue: CGPoint = .zero
static func reduce(value: inout CGPoint, nextValue: () -> CGPoint) {
value = nextValue()
print("value = \(value)")
}
typealias Value = CGPoint
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active April 26, 2024 06:32
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.
@lavantien
lavantien / modern-software-engineering-resources.md
Last active April 26, 2024 06:28
Modern Software Engineering Resources

Modern Software Engineering

Knowledge and Education should be open and free. Hierarchy and Exploitation must be abolished.

  • Z. (down) Notes below. Avoid funnel sales, if you spent money, there's something wrong. Also don't forget good OpSec, self defense gears, and physical/mental strength.
  • A. (go) Development Environment (10 items) (Linux, Neovim, Dev Tools, Languages, Configs, Security, Dotfiles).
  • B. (go) Complementary Subjects (280 items) (Linguistics, English, Security, OpSec, Psychology, Anthropology, History, Philosophy, Economics, Business, Defense, Cooking, Xenology, Self Defense).
  • C. (go) Fundamentals of Science and Technology (133 items) (Logic, Physics (Classical/Quantum Mechanics, Thermodynamics, Electricity, Relativity, Electronics, Electromagnetism, Optoelectronic, Semiconductor, Fusion), Mathematics (Calculus, Linear Algebra, Statistics, Applied
@HerringtonDarkholme
HerringtonDarkholme / nihongo.cpp
Last active April 26, 2024 06:27
g++ nihongo.cpp
#define エスティーディー std
#define アイオーストリーム <iostream>
#define ユージング using
#define イフ if
#define インクルード #include
#define イント int
#define シーアウト cout
#define シーイン cin
#define ネームスペース namespace
#define ブール bool
@nstarke
nstarke / 01-reversing-cisco-ios-raw-binary-firmware-images-with-ghidra.md
Last active April 26, 2024 06:26
Reversing Cisco IOS Raw Binary Firmware Images with Ghidra

Reversing Raw Binary Firmware Files in Ghidra

This brief tutorial will show you how to go about analyzing a raw binary firmware image in Ghidra.

Prep work in Binwalk

I was recently interested in reversing some older Cisco IOS images. Those images come in the form of a single binary blob, without any sort of ELF, Mach-o, or PE header to describe the binary.

While I am using Cisco IOS Images in this example, the same process should apply to other Raw Binary Firmware Images.

@katyhuff
katyhuff / pr-checklist.md
Last active April 26, 2024 06:22
Pull Request Review Checklist
  • Read the PR description
  • Read through all the changes, considering the following questions.
    • Is there anything you can praise about this PR? Start with praise.
    • Are variable names brief but descriptive?
    • Are new/changed functions no longer than a paragraph?
    • Do all function parameters have default values where appropriate?
    • Is the code clear and clean? (see Robert C. Martin's Clean Code)
    • Is there enough documentation?
  • Does the programming style meet the requirements of the repository (PEP8 for python, google for c++, etc.)