As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
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
# Using .htaccess is something you should avoid if at all possible, due to performance concerns: | |
# https://httpd.apache.org/docs/current/howto/htaccess.html | |
# Here's how to implement the rewrite rules for CraftCMS in an Apache .conf file; the key | |
# part is the "## Removes index.php from Craft URLs ##" section; the rest is provided | |
# just for context. Enjoy - andrew@nystudio107.com | |
<VirtualHost *:80> | |
ServerName BradsForMen.com | |
ServerAlias *.BradsForMen.com | |
DocumentRoot /var/www/BradsForMen/public |
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
/*! | |
* implementing fadeIn and fadeOut without jQuery | |
* gist.github.com/englishextra/baaa687f6ae9c7733d560d3ec74815cd | |
* modified jsfiddle.net/LzX4s/ | |
* changed options.complete(); to: | |
* function"==typeof options.complete && options.complete(); | |
* usage: | |
* FX.fadeIn(document.getElementById('test'), | |
* {duration:2000,complete:function(){alert('Complete');}}); | |
*/ |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
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
server { | |
server_name [host]; | |
root /var/www/[document_root]; ## <-- Your only path reference. | |
# Enable compression, this will help if you have for instance advagg module | |
# by serving Gzip versions of the files. | |
gzip_static on; | |
location = /favicon.ico { |
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
#!/usr/bin/env sh | |
# Download lists, unpack and filter, write to stdout | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' |