This file contains 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
'use strict'; | |
// generated on 2014-06-24 using generator-gulp-webapp 0.1.0 | |
var src_dir = 'app', | |
dest_dir = 'dist'; | |
var gulp = require('gulp'); | |
// load plugins |
This file contains 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
• SSH to your server to start creating a subdomain (https://library.linode.com/hosting-website#sph_configuring-name-based-virtual-hosts) | |
• Go to ~/public/ | |
› mkdir -p sub.example.com/{public,log,backup} | |
› cd sub.example.com/public/ | |
› nano index.html | nano index.php | |
• Write 'Hello world' or whatever, we just need a html|php file to test with |
This file contains 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
$base-font-size: 16px; | |
$base-line-height: 1.5; | |
// this value may vary for each font | |
// unitless value relative to 1em | |
$cap-height: 0.68; | |
@mixin baseline($font-size, $scale: 2) { |
This file contains 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
/** | |
* Calculates numbers to the mathmatical power (exponent) | |
* | |
* @since 1.0.0 | |
* | |
* @param int $number The number to increase | |
* @param int $exponent The power to increase the number by | |
* | |
* @return int The new number | |
*/ |
This file contains 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
/** | |
* Fix for vw, vh, vmin, vmax on iOS 7. | |
* http://caniuse.com/#feat=viewport-units | |
* | |
* This fix works by replacing viewport units with px values on known screen sizes. | |
* | |
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix. | |
* Target devices running iOS 8+ will incidentally execute the media query, | |
* but this will still produce the expected result; so this is not a problem. |
This file contains 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
$.fn.format = function() { | |
return this.each(function() { | |
var $this = $(this); | |
var time = $this.attr("datetime"); | |
var localTime = moment.utc(time).local().format(); | |
$this.attr("datetime", localTime).timeago(); | |
return this; | |
}); |
This file contains 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
[ | |
{ "name": "Afghanistan", "code": "AF" }, | |
{ "name": "Åland Islands", "code": "AX" }, | |
{ "name": "Albania", "code": "AL" }, | |
{ "name": "Algeria", "code": "DZ" }, | |
{ "name": "American Samoa", "code": "AS" }, | |
{ "name": "Andorra", "code": "AD" }, | |
{ "name": "Angola", "code": "AO" }, | |
{ "name": "Anguilla", "code": "AI" }, | |
{ "name": "Antarctica", "code": "AQ" }, |
This file contains 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
/** | |
* @ngdoc Directive | |
* @name app.confirmOnExit | |
* | |
* @description | |
* Prompts user while he navigating away from the current route (or, as long as this directive | |
* is not destroyed) if any unsaved form changes present. | |
* | |
* @element Attribute | |
* @scope |
This file contains 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
/** | |
* Format datetime | |
* Usage: | |
* new Date().format('yyyy/MM/dd'), new Date().format('hh:mm:ss') | |
* @param {String} format | |
* @return {String} | |
*/ | |
Date.prototype.format = function(format) { | |
var self = this; |
This file contains 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
<span>Local date & time converted from UTC: {{vm.myUtcDate | utcToLocal:'dd.MM.yy - hh.mm a'}}</span> | |
<!-- Where vm.myUtcLocal = '2016-03-31T00:11:31' (utc) --> |
NewerOlder