Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Pablo Reinoso pablo384

🎯
Focusing
View GitHub Profile
View build.gradle
// Duplicate classes on android, build fails
//Solve dependenci conflict.
//writhe this in app.gradle file in app/App_Resources/Android
configurations {
compile.exclude group: 'com.google.zxing'
}
@pablo384
pablo384 / gist:7810636722f2aff280e9064ab3c794f5
Created Jul 9, 2020 — forked from dsci/gist:1347672
Delete commits from repository.
View gist:7810636722f2aff280e9064ab3c794f5
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a
# Then do a forced update.
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:develop
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f
@pablo384
pablo384 / exc.sh
Created Feb 18, 2020
Delete all docker images ans Containers except one
View exc.sh
#/bin/sh
#images
docker image rm -f $(docker images -a | grep -v "qtcustom" | awk 'NR>1 {print $3}')
#container
docker rm $(docker ps -a | grep -v "my_docker" | awk 'NR>1 {print $1}')
View QT QeventLoop
QEventLoop loop;
connect(this, &SomeObject::someSignal, &loop, &QEventLoop::quit);
// here you can send your own message to signal the start of wait,
// start a thread, for example.
loop.exec(); //exec will delay execution until the signal has arrived
View git-tag-delete-local-and-remote.sh
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@pablo384
pablo384 / previous-git-tag.sh
Created Nov 8, 2019 — forked from kjantzer/previous-git-tag.sh
Get Previous Git Tag (the one before the latest tag)
View previous-git-tag.sh
# http://stackoverflow.com/a/28818420/484780
git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`