Skip to content

Instantly share code, notes, and snippets.

View christian-fei's full-sized avatar

Christian christian-fei

View GitHub Profile
module.exports = function(s){
var u='toUpperCase'
return s.replace(/(\b((?:(?!by|for|and|of|vs|v|email|example|com|camelCase|(t |s )|iPhone))[a-z]))/g,function(m){
console.log( '-- ', arguments )
return m[u]()
}).replace(/(\b((?=(and|of)$)[a-z]))/g, function(m){
return m[u]()
})
}
jQuery(document).ready(function() {
var attributes = {}
attributes["IT"] = 'data-amazon-it';
attributes["GB"] = 'data-amazon-gb';
var url = "http://freegeoip.net/json/";
jQuery.getJSON(url, function(data) {
var code = data.country_code;
jQuery('[data-amazon]').each(function(index, link) {
link = jQuery(link);
@christian-fei
christian-fei / nginx.conf
Last active August 29, 2015 14:06 — forked from thoop/nginx.conf
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change example.com (server_name and in the rewrite rule) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,