This file contains hidden or 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
# path: /etc/dhcpcd.conf | |
interface eth0 | |
static ip_address=192.168.1.100/24 | |
static routers=192.168.1.1 | |
static domain_name_servers=192.168.1.1 | |
interface wlan0 | |
static ip_address=192.168.1.200/24 | |
static routers=192.168.1.1 |
This file contains hidden or 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
ga.getAll().shift().b.data.values[':trackingId'] |
This file contains hidden or 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 debounce = function(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this; | |
var args = arguments; | |
var later = function() { | |
timeout = null; | |
if ( !immediate ) { | |
func.apply(context, args); | |
} |
This file contains hidden or 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 throttle(callback, limit) { | |
var wait = false; | |
return function () { | |
if (!wait) { | |
callback.call(); | |
wait = true; | |
setTimeout(function () { | |
wait = false; | |
}, limit); | |
} |
This file contains hidden or 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(root, factory) { | |
if (typeof module === "object" && typeof module.exports === "object") { | |
module.exports = factory(); | |
} else if (typeof define === "function" && define.amd) { | |
define([], factory); | |
} else { | |
root.ModuleName = factory(); | |
} | |
}(this, function() { | |
return function() { |
This file contains hidden or 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteCond %{SERVER_ADDR} !=127.0.0.1 | |
RewriteCond %{SERVER_ADDR} !=::1 | |
RewriteRule ^ %{ENV:PROTO}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
</IfModule> |
This file contains hidden or 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] | |
RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301,L] | |
</IfModule> |
This file contains hidden or 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
# export | |
mysqldump -u USERNAME -pPASSWORD DATABASE > dump.sql | |
# import | |
mysql -u USERNAME -pPASSWORD DATABASE < dump.sql |
This file contains hidden or 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
# path: /etc/wpa_supplicant/wpa_supplicant.conf | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="SSID" | |
psk="PASSWORD" | |
} |