git clone <repo>
clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
<?php | |
/** | |
* UUID class | |
* | |
* The following class generates VALID RFC 4122 COMPLIANT | |
* Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
* | |
* UUIDs generated validates using OSSP UUID Tool, and output | |
* for named-based UUIDs are exactly the same. This is a pure | |
* PHP implementation. |
// snippet taken from http://catapulty.tumblr.com/post/8303749793/heroku-and-node-js-how-to-get-the-client-ip-address | |
function getClientIp(req) { | |
var ipAddress; | |
// The request may be forwarded from local web server. | |
var forwardedIpsStr = req.header('x-forwarded-for'); | |
if (forwardedIpsStr) { | |
// 'x-forwarded-for' header may return multiple IP addresses in | |
// the format: "client IP, proxy 1 IP, proxy 2 IP" so take the | |
// the first one | |
var forwardedIps = forwardedIpsStr.split(','); |
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
<?php | |
/** | |
* Generate a sequence of numbers for use in a pagination system, the clever way. | |
* @author Bramus Van Damme <[email protected]> | |
* | |
* The algorithm always returns the same amount of items in the sequence, | |
* indepdendent of the position of the current page. | |
* | |
* Example rows generated: |
/** | |
* Produce a formatted SpannableString object from a given String | |
* input, with all lowercase characters converted to smallcap | |
* characters. Uses only standard A-Z characters, so works with | |
* any font. | |
* | |
* @param input The input string, e.g. "Small Caps" | |
* @return A formatted SpannableString, e.g. "Sᴍᴀʟʟ Cᴀᴘs" | |
*/ | |
public static SpannableString getSmallCapsString(String input) { |
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
import java.time.DayOfWeek; | |
import java.time.LocalDate; | |
import java.time.YearMonth; | |
import java.time.format.DateTimeFormatter; | |
import java.time.format.TextStyle; | |
import java.time.temporal.ChronoUnit; | |
import java.time.temporal.WeekFields; | |
import java.util.Locale; | |
import javafx.beans.binding.Bindings; |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.