Skip to content

Instantly share code, notes, and snippets.

@yowainwright
yowainwright / $README.md
Last active March 24, 2025 16:02
Run Intel Mac Terminal Commands On Your M1 Mac Like A Boss In 5 Minutes Or Less

Run Intel Mac Terminal Commands On Your M1 Mac Like A Boss In 5 Minutes Or Less

After using terminals (iTerm, Terminal, Kitty) with an M1 Mac without issue for over a year, I finally came upon an issue that I couldn’t solve without using Rosetta. Rosetta is Mac software to run Intel Mac terminal commands on an M1 Mac. My issue initially came from trying to use Pyenv to install and use different versions of Python across multiple projects. After installing Rosetta, I initially used it by adding a custom flag to commands like this arch -x86_64 . This worked for me but was really error prone, “Did I forget the flag? Did I add the flag in the correct place?”.


This document describes solving M1 Mac vs Intel Mac terminal command discrepancies by creating a copy of your terminal and setting it up to run Intel Mac terminal commands using Rosetta. Although the process of making a Rosetta termi

@akabe1
akabe1 / frida_netsecconfig_bypass.js
Created October 7, 2021 10:25
An Android network security config pinning bypass
/* Android Network Security Config bypass script
by Maurizio Siddu
Run with:
frida -U -f [APP_ID] -l frida_netsecconfig_bypass.js --no-pause
*/
Java.perform(function(){
console.log('');
console.log('======');
@bernhardfritz
bernhardfritz / 0-macbook-friendly-ubuntu-tweaks.md
Last active March 24, 2025 16:01
MacBook-friendly Ubuntu tweaks

MacBook-friendly Ubuntu tweaks

I recently decided to switch from macOS BigSur 11.7.10 to Ubuntu 24.04 LTS after Apple decided to no longer provide updates for my MacBook Pro 11,1. During this transition I learned about various tweaks to improve user experience for MacBook users.

As a MacBook user you are probably used to keyboard shortcuts involving the ⌘ command key like ⌘ command+C and ⌘ command+V to copy/paste respectively. However, in Ubuntu pressing the ⌘ command key by default will open the Activities Overview which is similar to the Exposé view in macOS which is not what we want. As it turns out, Ubuntu involves the control key for almost all combinations you may be used to that involve the ⌘ command key in macOS. Luckily Ubuntu is quite configurable and we can tailor it to our needs.

Prerequisites

@mustafiz080
mustafiz080 / wp-cheat-sheet
Created March 24, 2025 15:59 — forked from loorlab/wp-cheat-sheet
Wordpress cheat sheets
1. Theme Structure
- style file
style.css
- header section
header.php
- main section
index.php
@Laserwolve
Laserwolve / formattedDate.qs
Created March 24, 2025 15:58
URI-Safe Date
var sStartTime = new Date().toLocaleString().replace(':', '-').replace(':', '-');
@luizomf
luizomf / postgresql_13_pgadmin_4_ubuntu_20_04.sh
Last active March 24, 2025 15:58
PostgreSQL 13 on Ubuntu 20.04
# Update all your packages
sudo apt update
sudo apt upgrade -y
# Add postgresql repository and key
sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
# Update again
@rodydavis
rodydavis / podcast_rss_feed.xml
Created April 27, 2020 22:22
Podcast RSS Feed Example
<?xml version="1.0" encoding="UTF-8" ?>
<rss xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<title>Creative Engineering</title>
<googleplay:author>Rody Davis, Norbert Kozsir</googleplay:author>
<rawvoice:rating>TV-G</rawvoice:rating>
<rawvoice:location>San Francisco, California</rawvoice:location>
<rawvoice:frequency>Weekly</rawvoice:frequency>
<author>Rody Davis, Norbert Kozsir</author>
<itunes:author>Rody Davis, Norbert Kozsir</itunes:author>
@yogidevbear
yogidevbear / emacs-keybinding-cheatsheet.md
Last active March 24, 2025 15:57
Emacs keybinding cheatsheet
Keys Description
C Ctrl
M Alt
Helper functions:
C-h k key-binding Describe the function bound to the key binding. To get this to work, you actually perform the key sequence after typing C-h k.
C-h f Describe function.
Cider/REPL bindings:
M-x cider-jack-in Jack into the REPL
Window key bindings:
@kaleb
kaleb / XDG.vim
Last active March 24, 2025 15:57
VIM XDG Configuration
" XDG Environment For VIM
" =======================
"
" References
" ----------
"
" - http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables
" - http://tlvince.com/vim-respect-xdg
"
if empty($XDG_CACHE_HOME)
@dsbilling
dsbilling / reset-proxmox-cluster.sh
Last active March 24, 2025 15:56
A simple script to reset the Proxmox Cluster.
#/bin/bash -xe
systemctl stop corosync.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
pmxcfs -l
rm /etc/pve/corosync.conf
rm /etc/corosync/*
rm /var/lib/corosync/*