This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudp apt-get update | |
sudo apt-get install -y build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 | |
sudo apt-get install -y libboost-system-dev libboost-filesystem-dev libboost-chrono-dev \ | |
libboost-program-options-dev libboost-test-dev libboost-thread-dev parallel python | |
./contrib/install_db4.sh `pwd` | |
export BDB_PREFIX=$(pwd)'/db4' | |
./autogen.sh | |
./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" --enable-debug | |
make CFLAGS='-g -O0' CXXFLAGS='-g -O0 -std=c++11' -j12; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
script_dir="contrib/devtools" | |
files_to_commit=$(git diff-index --cached --name-only --diff-filter=d HEAD) | |
format_paths="src/esperanza src/snapshot" | |
for file in ${files_to_commit} | |
do | |
for path in $format_paths | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Kill all running containers | |
docker kill $(docker ps -a -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_snakebite() | |
{ | |
local cur prev opts | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
if [[ ${prev} != "snakebite" ]]; then | |
local IFS=$'\t\n' | |
if [[ $cur != /* ]] ; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git -c GIT_LFS_SKIP_SMUDGE=1 clone repo //clone a repo without downloading the files | |
// list all tracked files with git lfs (png, wav, mp3 especially) | |
// list for each file all the lfs versions | |
// run git filter on each file to point to the most recent one | |
git filter-branch --tree-filter 'sed -i "/old_pointer/new_pointer" filename' -- --all | |
// run a git lfs prune to remove the files not referenced anymore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here's a good way to clean the repo up after filter-branch: | |
git remote rm origin | |
rm -rf .git/refs/original/ .git/refs/remotes/ .git/*_HEAD .git/logs/ | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n1 --no-run-if-empty git update-ref -d | |
And then: | |
git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 \ | |
-c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@" --aggressive |