This file contains hidden or 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
div.ie-container { | |
display: inline-block; | |
position: relative; | |
} | |
div.ie-container:before { | |
display: block; | |
content: ''; | |
position: absolute; | |
top: 4px; |
This file contains hidden or 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
// serializing the inputs to object | |
$.fn.serializeObject = function() | |
{ | |
var o = {}; | |
var a = this.serializeArray(); | |
$.each(a, function() { | |
if (o[this.name] !== undefined) { | |
if (!o[this.name].push) { | |
o[this.name] = [o[this.name]]; | |
} |
This file contains hidden or 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
# Virtual host configuration for apache | |
# Windows location : C:\xampp\apache\config\extra\httpd-vhosts.config | |
# | |
# incase you have installed in some other stack or installed in other location, find in appropriate directory | |
# | |
# after setting up the httpd-vhosts.config, add the site name to hosts file located at | |
# 'C:\Windows\System32\drivers\etc\hosts' , it is a text file with no extension, if it do not exist, create the file. | |
# and your site's name at the end of it - | |
# 127.0.0.1 laravel.dev | |
# 127.0.0.1 mysite.dev |
This file contains hidden or 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
$local = array( | |
'127.0.0.1', | |
'::1' | |
); // localhost | |
if(!in_array($_SERVER['REMOTE_ADDR'], $local)){ | |
require_once('connection-db.php'); // db connection details for server | |
} | |
else{ | |
require_once('db-connect-local.php'); // db connection details for localhost |
This file contains hidden or 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
function onEdit(e){ | |
var range = e.range; | |
range.setNote('Last modified: ' + new Date()); | |
} |
This file contains hidden or 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 | |
# $ php -f db-connect-test.php | |
# a quick and easy script for db connectivity | |
$dbname = 'name'; // DB name | |
$dbuser = 'user'; // user name | |
$dbpass = 'pass'; // password | |
$dbhost = 'host'; // host | |
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
This file contains hidden or 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
/* | |
* Most web browsers these days do not explicitly handle | |
* html text styling - SUB, SUP, B, I and so on - they (kinda | |
* sorta) are converted into SPAN elements with appropriate CSS | |
* properties, and the rendering engine only deals with that. | |
* | |
*/ | |
/* B for bold */ | |
.bold { |
This file contains hidden or 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
class Migration_Create_Sessions extends CI_Migration { | |
// The session table structure changed for CI 3.0 | |
public function up() | |
{ | |
$fields = array( | |
'id VARCHAR(40) DEFAULT \'0\' NOT NULL', | |
'ip_address VARCHAR(45) DEFAULT \'0\' NOT NULL', | |
'timestamp INT(10) unsigned DEFAULT 0 NOT NULL', | |
'data blob NOT NULL' |
This file contains hidden or 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 | |
class Migration_Create_Sessions extends CI_Migration { | |
public function up() | |
{ | |
$fields = array( | |
'id VARCHAR(40) DEFAULT \'0\' NOT NULL', | |
'ip_address VARCHAR(45) DEFAULT \'0\' NOT NULL', | |
'timestamp INT(10) unsigned DEFAULT 0 NOT NULL', |
This file contains hidden or 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
/* | |
* Dabblet: Font Awesome Icon test | |
*/ | |
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css); | |
/* just to center align div */ | |
.row{ | |
width: 100%; | |
text-align: center; | |
} | |
.cols{ |