Skip to content

Instantly share code, notes, and snippets.

View pablo384's full-sized avatar
🎯
Focusing

Pablo Reinoso pablo384

🎯
Focusing
View GitHub Profile
@dileepadev
dileepadev / .gitignore
Last active December 30, 2023 22:37
.gitignore for Flutter projects
### ------------------------- Flutter.gitignore ------------------------ ###
# Miscellaneous
*.class
#*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/
@kjantzer
kjantzer / previous-git-tag.sh
Created March 2, 2015 20:01
Get Previous Git Tag (the one before the latest tag)
# http://stackoverflow.com/a/28818420/484780
git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`
@madhums
madhums / base64-image-upload.js
Created September 14, 2014 17:37
save base64 encoded image
/*
* Taken from http://stackoverflow.com/questions/5867534/how-to-save-canvas-data-to-file/5971674#5971674
*/
var fs = require('fs');
// string generated by canvas.toDataURL()
var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0"
+ "NAAAAKElEQVQ4jWNgYGD4Twzu6FhFFGYYNXDUwGFpIAk2E4dHDRw1cDgaCAASFOffhEIO"
+ "3gAAAABJRU5ErkJggg==";
// strip off the data: url prefix to get just the base64-encoded bytes
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 18, 2024 16:07
how to delete a git tag locally and remote
# 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
@dsci
dsci / gist:1347672
Created November 8, 2011 12:52
Delete commits from repository.
# 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