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.
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- app color palette --> | |
<color name="primary">@color/indigo_500</color> | |
<color name="primary_light">@color/indigo_100</color> | |
<color name="primary_dark">@color/indigo_700</color> | |
<color name="accent">@color/pink_A200</color> | |
<color name="accent_fallback_light">@color/pink_A100</color> | |
<color name="accent_fallback_dark">@color/pink_A400</color> |
// -------------------------------------------------------------------------------------- | |
// A More Modern Scale for Web Typography | |
// Based on this article: http://typecast.com/blog/a-more-modern-scale-for-web-typography | |
// -------------------------------------------------------------------------------------- | |
$body-font-size: 1em !default; | |
// Adjusts body typography to be default | |
// for each browser. | |
@mixin reset-body-font-size($font-size: 100%, $size-adjustment: 0.5) { |
<?php | |
/** | |
* A sample file used for serving PDF files while retaining canonicalization. | |
* | |
* You will need something like the following in .htaccess: | |
* | |
* RewriteRule ^(.+)\.pdf /pdf.php?file=$1 [L] | |
*/ |
#!/bin/bash | |
# usage: ./wpbackup.sh domain.com | |
DOMAIN="$1"; # domain name to backup | |
BACKUP="$HOME/backups"; # store backups here | |
HOSTPATH="$HOME"; # path where hosted domains are | |
backmeup () { | |
local _N _U _P _H FS FT TD WP; |
#!/bin/bash -x | |
NOW=$(date +"%Y-%m-%d-%H%M) | |
FILE="domain.com.$NOW.tar" | |
BACKUP_DIR="/home/user/backups" | |
WWW_DIR="/home/user/domain.com/" | |
DB_HOST="mysql.domain.com" | |
DB_USER="dbuser" | |
DB_PASS="dbpass" | |
DB_NAME="dbname" |
I found installing Sword from source to be problematic on both Mac and Linux. Thankfully, I found hidden in some documentation that it is available through common repositories. Unfortunately, the documentation was not thorough. Here's what worked for me on Mac OSX 10.9.5 and Linux Mint 17.3 "Rosa". These instructions should work on any recent version of Mac and any flavor of Ubuntu.
The process for installing Sword differs a bit between Mac and Linux. I used Homebrew on Mac, but MacPorts should work just fine. Linux was a little less friendly, but I did get it working.
Google Chrome Developers says:
The new WOFF 2.0 Web Font compression format offers a 30% average gain over WOFF 1.0 (up to 50%+ in some cases). WOFF 2.0 is available since Chrome 36 and Opera 23.
Some examples of file size differences: WOFF vs. WOFF2
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>What is my IP?</title> | |
</head> | |
<body> | |
<p>External IP: <span id="result"></span></p> | |
<iframe id="iframe" sandbox="allow-same-origin" style="display: none"></iframe> | |
<script> |
<?php | |
/** | |
* This code will benchmark your server to determine how high of a cost you can | |
* afford. You want to set the highest cost that you can without slowing down | |
* you server too much. 8-10 is a good baseline, and more is good if your servers | |
* are fast enough. The code below aims for ≤ 50 milliseconds stretching time, | |
* which is a good baseline for systems handling interactive logins. | |
*/ | |
function_exists('password_hash') or die("Please use PHP 5.5.0 or higher."); |