The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: October 8th 2015
- Original post
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
<?php | |
/* | |
* Create Admin User | |
*/ | |
$jb_password = 'PASSWORD'; #enter your desired password here, if you don't line 16 makes sure nothing bad happens like setting you actual password to 'PASSWORD' | |
$jb_username = 'user'; | |
$jb_email = '[email protected]'; | |
if ( $jb_password === 'PASSWORD' ) |
AddDefaultCharset UTF-8 | |
Timeout 60 | |
# | |
# ServerTokens | |
# This directive configures what you return as the Server HTTP response | |
# Header. The default is 'Full' which sends information about the OS-Type | |
# and compiled in modules. | |
# Set to one of: Full | OS | Minimal | Minor | Major | Prod |
(function() { | |
'use strict'; | |
function revocable(func1) { | |
return { | |
invoke: function(a) { | |
return func1.apply( | |
this, | |
arguments | |
); |
## Performance | |
- [Disable Debug Data](https://docs.angularjs.org/guide/production#disabling-debug-data) | |
- Use track by in every ng-repeat | |
## Cleaning | |
AngularJS does some work on your behalf, but not all. The following need to be manually cleaned up: | |
- Any watchers that are not bound to the current scope (e.g. bound to $rootScope) | |
- Intervals | |
- Timeouts |
(function installJSDependencies() { | |
'use strict'; | |
console.log('------------------'); | |
console.log('Post install: install dependencies'); | |
console.log('------------------'); | |
var nodeModulesFolder = '/node_modules/'; | |
var pluginsForlder = '/dumbometeranalyzer/app/webroot/plugins/lib/'; | |
var fse = require('fs-extra'); |
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
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.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
elem.clientLeft
, elem.clientTop
, elem.clientWidth
, elem.clientHeight
elem.getClientRects()
, elem.getBoundingClientRect()
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |