If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"
npm adduser
function setURLParam(key, value) { | |
var re = new RegExp("([?&])" + key + "=.*?(&|#|$)(.*)", "i"); | |
var newSearch = location.search; | |
// Is the key-value pair present in the existing search? | |
if (re.test(newSearch)) { | |
// Update a value | |
newSearch = newSearch.replace(re, '$1' + key + "=" + value + '$2$3'); | |
} else { | |
// Add the key and its value |
[ | |
{ | |
"name":"United Arab Emirates", | |
"dial_code":"+971", | |
"code":"AE" | |
}, | |
{ | |
"name":"Afghanistan", | |
"dial_code":"+93", | |
"code":"AF" |
function randIdGen() { | |
var text = ""; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
for( var i=0; i < 5; i++ ) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return '#' + text; | |
} |
<script type="text/javascript"> | |
$(document).ready(function() { | |
var masks = { | |
'int': /[\d]/, | |
'float': /[\d\.]/, | |
'money': /[\d\.\s,]/, | |
'num': /[\d\-\.]/, | |
'hex': /[0-9a-f]/i, | |
'email': /[a-z0-9_\.\-@]/i, |
// Validation wrappe init & rules | |
$("#form").validate({ | |
errorClass: 'invalid', | |
validClass: 'valid', | |
errorPlacement: function(error, element) { | |
error.insertAfter($(element)); | |
// error.insertAfter($(element).siblings('label')); | |
}, | |
rules: { | |
'name': { |
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresDefault "access plus 1 month" | |
# CSS | |
ExpiresByType text/css "access plus 1 year" | |
# Data interchange | |
ExpiresByType application/atom+xml "access plus 1 hour" |
Install Ruby Gems on Mac OS X without sudo | |
1. Add GEM_HOME to your .bash_profile | |
For example, nano ~/.bash_profile and add | |
export GEM_HOME=/Users/srinivas/.gem where the path is to your own Home folder | |
2. Add the gem executables to your system path | |
Also in .bash_profile, add | |
wget -nd -H -p -A jpg,jpeg,png,gif -e robots=off example.com |
.col-xs-offset-right-12 { | |
margin-right: 100%; | |
} | |
.col-xs-offset-right-11 { | |
margin-right: 91.66666667%; | |
} | |
.col-xs-offset-right-10 { | |
margin-right: 83.33333333%; | |
} | |
.col-xs-offset-right-9 { |