Skip to content

Instantly share code, notes, and snippets.

@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@mattmeir
mattmeir / MattMeir_Contract Killer.md
Last active May 13, 2024 13:18 — forked from malarkey/Contract Killer 3.md
Amended version of the Contract Killer v3 template

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

Project Information

@malarkey
malarkey / Contract Killer 3.md
Last active May 13, 2024 13:18
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

Estudos de caso com o Flux

Tópicos da apresentação

  • estratégias de deploy
  • tipos de fontes usadas pelo Flux
  • CRDs do Flux
  • benefícios de se usar flux na estrutura de gitops
  • estudo de caso: vículo básico de um repositório
  • estudo de caso: instalação de uma aplicação com helmrelease
@wrmack
wrmack / Win11.md
Last active May 13, 2024 13:16
Windows 11 on MacBook M1

Windows 11 on MacBook M1 (ARM)

Steps I went through to install a Windows Insider Preview VHDX on a Macbook Pro using UTM. I needed Windows because I was developing an app to submit to the Microsoft Store. With the following setup I was able to develop an electron-based app and submit it to the Microsoft Store.

  1. Download the VHDX from Windows Insider Previews. You need to register for the Insider Program and sign in.
    • under Select edition select the Canary channel and press Confirm
    • select language and confirm
    • press Download
  2. Open UTM and press + to create a new virtual machine
    • Virtualize
  • Windows
@trwaters
trwaters / compile_Athena_with_hdf5.md
Last active May 13, 2024 13:14
How to compile Athena++ with hdf5 the easy way

On a linux machine, it's possible to avoid building hdf5 from source in order to compile Athena++ with hdf5 output enabled, both with and without MPI. On OS X, however, there seems to be no way around building HDF5 from source to compile Athena++ with both MPI and HDF5. The directions below suffice if MPI capability isn't needed. Otherwise, follow these instructions instead after installing Anaconda and doing conda install h5py.

Since the anaconda python distribution is so widely used and HDF5 libraries are needed to read Athena++ output, here I simply access the same library for Athena++ to use to write the HDF5 files.

Installing the hdf5 libraries using conda should be as simple as conda install h5py.
Once you can do import h5py from ipython, you have hdf5 libraries on your system. To see where they live do cd ${CONDA_PREFIX} and you should see a bunch of hdf*.h and H5*.h type header files inside the include

@Davenchy
Davenchy / xcopy.bash
Created May 13, 2024 02:31
Copy/Paste bash scripts using xclip
#!/usr/bin/bash
# Simple bash script to copy files into clipboard using xclip
# Check if xclip is installed
if ! command -v xclip &> /dev/null; then
echo "Error: xclip is not installed. Please install xclip before running this script."
exit 1
fi
if [[ -z "$1" ]]; then
@aronson
aronson / README.md
Last active May 13, 2024 13:08
Cogmind Wineskin for Apple Silicon

Running Cogmind as a self-contained app on macOS

Cogmind can be run as a self-contained app on macOS with the modern version of Wineskin Server.

If you are interested in only the performance mods skip to here.

Installing Wineskin

Installing Rosetta 2 (Apple Silicon only)

Wineskin requires the Rosetta 2 framework available from Apple for free. Open your terminal.app from Applications and run the following command to install it if not already present:

@naviat
naviat / git_fixup_n_autosquash.md
Created March 10, 2020 03:48
Git commit fixup and autosquash

Git commit fixup and autosquash are helpful features when you want to “fix” changes from a single commit in your history.

If you discover that you want to change a single commit in your Git history, you would need to manually commit based on the commit you’re about to change and perform a git rebase. Fixup commits produce commits that fix a specific commit in history by appending a commit with message fixup!. An interactive rebase with --autosquash option will then merge the original commit and the fixup into a new commit and rebase the subsequent commits.

See the following history as an example:

3320dec (HEAD) commit 4
03c9685 commit 3
041c401 commit 2