⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,
See how a minor change to your commit message style can make a difference.
Tip
Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs
Africa/Abidjan | |
Africa/Accra | |
Africa/Addis_Ababa | |
Africa/Algiers | |
Africa/Asmara | |
Africa/Asmera | |
Africa/Bamako | |
Africa/Bangui | |
Africa/Banjul | |
Africa/Bissau |
//Java | |
webview.getSettings().setJavaScriptEnabled(true); | |
webview.loadUrl("<your html file>"); //not in scope of this gist | |
webview.setWebViewClient(new WebViewClient(){ | |
public void onPageFinished(WebView view, String url){ | |
//Here you want to use .loadUrl again | |
//on the webview object and pass in | |
//"javascript:<your javaScript function" | |
webview.loadUrl("javascript:myJavaScriptFunc('" + argumentPassingIn + "')"); //if passing in an object. Mapping may need to take place | |
} |
# overwrite master with contents of feature branch (feature > master) | |
git checkout feature # source name | |
git merge -s ours master # target name | |
git checkout master # target name | |
git merge feature # source name |
git config core.editor "'C:\Program Files (x86)\Notepad++\notepad++.exe' -multiInst -notabbar -nosession -noPlugin" |
<?php | |
# http://jeffreysambells.com/2012/10/25/human-readable-filesize-php | |
function human_filesize($bytes, $decimals = 2) { | |
$size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB'); | |
$factor = floor((strlen($bytes) - 1) / 3); | |
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor]; | |
} | |
echo human_filesize(filesize('example.zip')); |