This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config file | |
# vim ~/.config/fish/config.fish | |
# reload the config | |
# source ~/.config/fish/config.fish | |
# set the workspace path | |
set -x GOPATH /users/my-username/go | |
# add the go bin path to be able to execute our programs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set fish_user_paths path_to_your_google_cloud_sdk/bin | |
set -x MANPATH path_to_your_google_cloud_sdk/help/man /usr/local/share/man /usr/share/man /opt/x11/share/man |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// update a parameter in a URL | |
// or removes it if value is null | |
// browser should support forEach() function or use a polyfill | |
var updateUrlParameter = function(url, key, value){ | |
var parser = document.createElement('a'); | |
parser.href = url; | |
var newUrl = parser.protocol+'//'+parser.host+parser.pathname; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var preloadImage = function(src, callback){ | |
var img = new Image(); | |
img.src=src; | |
img.onload = function(){ | |
callback(); | |
} | |
}; | |
// usage | |
preloadImage(path, function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// MUST BE PLACED BEFORE THE GOOGLE TAG MANAGER SCRIPT | |
// push conversion's data into Google Tag Manager | |
dataLayer = [{ | |
'affilae.ruleKey': 'xxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx', | |
'affilae.conversionId': '123', | |
'affilae.customerId': '123', | |
'affilae.amount': '100.5', | |
'affilae.payment': 'online' // online | bankwire | cheque | other | |
}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isTouchDevice() { | |
return "ontouchstart" in window || navigator.msMaxTouchPoints > 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#API usage: feeds.mysite.fr/index/type?q=* | |
server { | |
listen 91.191.152.55:443; | |
server_name feeds.mysite.fr; | |
access_log /var/log/nginx/elasticsearch.access.log; | |
error_log /var/log/nginx/elasticsearch.error.log; | |
location / { |