Skip to content

Instantly share code, notes, and snippets.

@gnowenegue
gnowenegue / gist:a5509b6e3f64972e6fbc
Created March 3, 2016 09:04 — forked from betweenbrain/gist:2284129
Git command to export only changed files between two commits
git archive --output=file.zip HEAD $(git diff --name-only SHA1 SHA2)
@gnowenegue
gnowenegue / copy_files_txt.txt
Created March 1, 2016 03:05
Copy files listed in a text file to another destination folder keeping the structure.
for file in $(cat files.txt); do rsync -R $file dest/; done
@gnowenegue
gnowenegue / update_all_bower.txt
Created February 24, 2016 07:25
Re-install all bower dependencies with latest stable version.
for package in $(ls bower_components); do bower uninstall $package --save; bower install $package --save; done
@gnowenegue
gnowenegue / mobile_hover.html
Created November 25, 2015 03:32
Hover trigger for mobile
<style>
.hover {
/* to stop the browser from asking you to copy/save/select the image or whatever */
-webkit-user-select: none;
-webkit-touch-callout: none;
}
</style>
<script>
$(function () {
@gnowenegue
gnowenegue / ie8BlackBorderPngAnimationFix
Created April 28, 2014 04:04
Prevent IE8 black border for png during fading animation.
background: transparent;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)"; /* IE8 */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); /* IE6 & 7 */
@gnowenegue
gnowenegue / emailValidation
Created April 4, 2014 05:17
Email validation
var re = /[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}/igm;
var email = "test@test.com";
return re.test (email);