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
<?php | |
ob_start(); | |
session_start(); | |
var_dump(session_status()); | |
var_dump(PHP_SESSION_ACTIVE); | |
var_dump(session_status() == PHP_SESSION_ACTIVE); //(true means active, false means no) | |
var_dump(session_id() !== ''); |
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
<?php | |
//this migration demonstrates a potential migration that changes snake case column names to camelcase names | |
//the reverse is in the down function | |
class Migration_camel_tables extends CI_Migration { | |
public function up(){ | |
$tables = $this->db->list_tables(); |
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
<?php defined('BASEPATH') OR exit('No direct script access allowed'); | |
//this migration can only be ran when you have switched off session use tables, then after migrating, switch it back on! | |
class Migration_add_sessions extends CI_Migration { | |
public function up(){ | |
$this->dbforge->add_field(array( | |
'session_id' => array( | |
'type' => 'VARCHAR', |
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
define(['angular'], function(angular){ | |
'use strict'; | |
/** | |
* Equalise Heights | |
* | |
* @param string jQuery Selector of which to equalise | |
*/ | |
angular.module('Directives') |
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
bower_components,node_modules,vendor,img,image,fonts,project_design,system,secrets,c9revisions,bin,README.md,js |
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
define(['angular', 'masonry', 'imagesLoaded', 'lodash'], function(angular, Masonry, imagesLoaded, _){ | |
'use strict'; | |
/** | |
* Masonry Directive for a wall of item. | |
* This directive is intended to be used along with ng-repeat directive. | |
* Put masonryWallDir on the container element and pass in a class selector for each item to be laid out. | |
* Pass in optional options via masonryWallOptions. | |
* Put the masonryItemDir next to ng-repeat directive on the item to be repeated. |
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
.transparent-background(@red: 0, @green: 0, @blue: 0, @alpha: 0.5){ | |
background: transparent; | |
background: rgba(@red, @green, @blue, @alpha); | |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=argb(rgba(@red, @green, @blue, @alpha)), endColorstr=argb(rgba(@red, @green, @blue, @alpha)))"; | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=argb(rgba(@red, @green, @blue, @alpha)), endColorstr=argb(rgba(@red, @green, @blue, @alpha))); | |
} |
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
<html> | |
<head> | |
<link rel="shortcut icon" href="favicon.ico"> | |
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/apple-touch-icon-144x144-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="img/apple-touch-icon-120x120-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/apple-touch-icon-114x114-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/apple-touch-icon-72x72-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" href="img/apple-touch-icon-57x57-precomposed.png"> | |
</head> | |
</html> |
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
When ever you start an AngularJS project and you wish to use HTML5 urls. It is a | |
good practice to use the base tag. The base tag will set all your URLs relative | |
to what is set in the base, and that value could be set by your server side | |
templating language. | |
Example: | |
<html> | |
<head> | |
<base href="ENTER HOST ROOT" /> |
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
define(['angular'], function(angular){ | |
/** | |
* Converts any links inside the passed in text parameter into HTML links. | |
*/ | |
angular.module('Filters') | |
.filter('Autolink', function(){ | |
var urlPattern = /(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/gi; |
OlderNewer