Skip to content

Instantly share code, notes, and snippets.

@p-mng
p-mng / README.md
Created March 22, 2024 13:52
Uninstall Rosetta 2 on macOS

Uninstall Rosetta 2 on macOS

1. Disable SIP (System Integrity Protection)

  1. Boot into recovery
  2. Open a terminal (Utilities > Terminal)
  3. Disable SIP using csrutil disable
  4. Reboot into macOS

2. Uninstall Rosetta

@bubba-h57
bubba-h57 / instructions.md
Last active April 20, 2025 21:08
Configuring Jetbrains Gateway and WSL

Step 1: SSH Daemon

In your WSL instance, re-install OpenSSH server as follows.

sudo apt remove --purge openssh-server
sudo apt install openssh-server

Edit /etc/ssh/sshd_config (e.g. sudo vi /etc/ssh/sshd_config) and add the following lines to the bottom of the file. Ensure you replace WSL_ACCOUNT_NAME with your WSL2 account name.

@samuelbradshaw
samuelbradshaw / python-pyenv-macos.md
Last active April 27, 2025 21:50
Installing Python 2 and 3 on macOS

Installing Python 2 and 3 on macOS

Starting with macOS 12.3, Python is no longer bundled with macOS. These instructions allow you to set up Python 2 and Python 3 side-by-side using pyenv. The instructions were tested on an Apple Silicon Mac, but the process on an Intel Mac should be similar.

Install Homebrew

Homebrew is a popular package manager that makes it easy to install command line tools. If you don’t yet have Homebrew installed, instructions can be found here: https://brew.sh

Verify that Homebrew is installed:

@mcxiaoke
mcxiaoke / miui-blotware-apps.md
Last active May 2, 2025 13:08
MIUI 13/14 bloatware apps, updated at 20240816

对于所有应用,不建议直接删除,使用adb shell pm disable-user package-name禁用即可,方便出问题时恢复。

DO NOT UNINSTALL:

  • com.miui.securitycenter
  • com.miui.securityadd
  • com.xiaomi.finddevice

(Don’t uninstall these three apps or services from your Xiaomi device. Otherwise, you may encounter device bricking or bootloop issues.)

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 29, 2025 18:04
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 2, 2025 12:02
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@linuxkathirvel
linuxkathirvel / mysql57-in-centos7.md
Last active January 14, 2025 07:44
Install MySQL 5.7 in CentOS7/RHEL7

MySQL 5.7 installation in CentOS 7

sudo su

# Remove MariaDB packages
yum list installed | grep -i maria
yum remove mariadb.x86_64
yum remove mariadb-libs.x86_64

# Download MySQL 5.7 RPM tar
@AlmostGosu
AlmostGosu / confluence-h2-restore.sh
Last active January 3, 2023 19:16
Shell script to recover corrupted Confluence h2 database
#!/bin/bash
# This script has to be run as your confluence user or root
# Create a backup of, and attempt to restore a confluence h2 internal database
# Go home.
cd ~
# Stop confluence
/opt/atlassian/confluence/bin/stop-confluence.sh
# Really though...
@fearblackcat
fearblackcat / iptables.md
Last active September 2, 2021 03:23
firewalld for in public allow

Lookup the open port:

iptables -L -n

Add new open port:

//open 8080 port
iptables -I IN_public_allow -p tcp --dport 8080 -j ACCEPT
@sdnts
sdnts / example.md
Last active January 10, 2023 20:50
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});