Skip to content

Instantly share code, notes, and snippets.

View nateluzod's full-sized avatar
🎯
Focusing

Nate Luzod nateluzod

🎯
Focusing
View GitHub Profile
@nateluzod
nateluzod / gist:9263873
Created February 28, 2014 02:15
Gulp Install Base
npm install --save-dev gulp gulp-util gulp-uglify gulp-watch gulp-concat gulp-notify gulp-livereload gulp-ruby-sass
@nateluzod
nateluzod / gist:ef65f98e4d5d7e1a8ee1
Created August 24, 2014 10:21
Get public ssh key
pbcopy < ~/.ssh/id_rsa.pub
@nateluzod
nateluzod / gist:d2ce99fe2beb315ec657
Created June 23, 2015 08:13
Import DB with progress bar
pv mydump.sql.gz | gunzip | mysql -u root -p dbname
@nateluzod
nateluzod / scrub_email.py
Last active September 22, 2015 08:18
Mask an email address to show only the first letter of the name and the domain. Could be modified to work the same for credit card numbers.
def scrub_email(email):
""" Takes an email address and masks the left side. test@test.com becomes t***@test.com """
user, domain = email.split('@')
user = user[0].ljust(len(user), "*")
return("{}@{}".format(user, domain))
@nateluzod
nateluzod / killsvn.sh
Created May 22, 2011 16:51
Remove any and all traces of SVN
find . -name .svn -exec rm -rf {} \;
@nateluzod
nateluzod / ie7-indentfix.css
Created May 22, 2011 16:50
Fixing text indent for submits on IE7
input[type=submit] {
text-indent: -9999px;
display: block;
line-height: 0;
font-size: 0;
}
@nateluzod
nateluzod / scrollToTop.js
Created May 31, 2011 19:37
jQuery scroll to page top
$.fn.scrollToTop = function(){
$("html, body").animate({ scrollTop: 0 }, "slow");
return false;
}
@nateluzod
nateluzod / supportPlaceholder.js
Created June 25, 2011 21:23
Placeholder support for older browsers
$.fn.supportPlaceholder = function(){
if(!Modernizr.input.placeholder) {
// Populate field with placeholder text
var placeholderText = $(this).attr("placeholder");
$(this).val(placeholderText).css({"color" : "#999"});
// Clear text if they focus
$(this).focus(function(){
$(this).val("").css({"color" : "#333"})
@nateluzod
nateluzod / coda-slider.less
Created June 27, 2011 01:17
Coda Slider CSS refactored into LESS format
.coda-slider-wrapper {
padding: 20px 0;
clear: both;
overflow: auto;
.coda-nav {
ul {
clear: both;
display: block;
margin: auto;
@nateluzod
nateluzod / zebrafy.js
Created July 6, 2011 21:17
Zebra stripe a table or a list.
$.fn.zebrafy = function(){
if($(this).get(0) != null){
var $im_a = $(this).get(0).tagName.toLowerCase();
var $stripe_element;
if($im_a == "table") {
$stripe_element = "tr"
} else {
$stripe_element = "li"
};