Skip to content

Instantly share code, notes, and snippets.

View phatpaul's full-sized avatar

Paul Abbott phatpaul

  • Lake Worth Beach, FL
View GitHub Profile
@amlamarra
amlamarra / reposync.sh
Last active May 13, 2022 14:46
A Bash script to update multiple Git repositories at the same time. It also maintains a list of these repos in a text file to keep synced with your dotfiles across other systems.
#!/usr/bin/env bash
#########################################################################
## Title: reposync.sh
## Description: Syncs multiple git repositories in ~/tools/ based on the
## ~/.repolist file. Put each repo URL in there.
## Author: Andrew Lamarra
## Created: 01/23/2019
## Dependencies: bash (v4.0+), git
#########################################################################
@adam-p
adam-p / Local PR test and merge.md
Last active August 3, 2024 16:45
Testing a pull request, then merging locally; and avoiding TOCTOU

It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream.)

Getting the PR code

  1. Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37

  2. Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37:

$ git fetch upstream pull/37/head:pr37
@wpivotto
wpivotto / gist:3993502
Created November 1, 2012 13:02
Maximize VMWare images performance
Insert the following code into the *.VMX file:
sched.mem.pshare.enable = "FALSE"
mainMem.useNamedFile = "FALSE"
prefvmx.minVmMemPct = "100"
prefvmx.useRecommendedLockedMemSize = "TRUE"
mainMem.partialLazySave = "FALSE"
mainMem.partialLazyRestore = "FALSE"
priority.grabbed = "high"
priority.ungrabbed = "normal"