- Install fish via Brew
- Optionally install Oh My Fish!
- Add fish to known shells
- Set default shell to fish
brew install fish
curl -L https://get.oh-my.fish | fish
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <smmintrin.h> | |
#ifdef __RADAVX__ | |
#include <immintrin.h> | |
#endif |
sudo rm -Rf ~/Library/Caches/com.microsoft.VSCode.ShipIt | |
sudo rm -Rf ~/Library/Caches/com.microsoft.VSCodeInsiders.ShipIt |
# Instrument binaries, pgo data to /data/pgo, serial make is important to not confuse the pgo generator | |
env CXXFLAGS='-march=native -fprofile-dir=/data/pgo -fprofile-generate=/data/pgo' cmake .. -DCMAKE_BUILD_TYPE=Release | |
make -j 1 | |
# Run instrumented program, generate and write pgo data | |
./runIt | |
# Use profile data and feed into gcc, correct for threading counter noise, serial make is important to not confuse the pgo generator | |
env CXXFLAGS='-march=native -fprofile-dir=/data/pgo -fprofile-use=/data/pgo -fprofile-correction' cmake .. -DCMAKE_BUILD_TYPE=Release | |
make -j 1 |
from ctypes import CDLL, c_uint, byref, create_string_buffer | |
from ctypes.util import find_library | |
libc = CDLL(find_library("c")) | |
def sysctl(name, isString=True): | |
size = c_uint(0) | |
# Find out how big our buffer will be | |
libc.sysctlbyname(name, None, byref(size), None, 0) | |
# Make the buffer | |
buf = create_string_buffer(size.value) |
brew install fish
curl -L https://get.oh-my.fish | fish
Removing the last commit
To remove the last commit from git, you can simply run git reset --hard HEAD^
If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.
If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^
which will evict the commits from the branch and from the index, but leave the working tree around.
If you want to save the commits on a new branch name, then run git branch newbranchname
before doing the git reset.