Skip to content

Instantly share code, notes, and snippets.

View fakiolinho's full-sized avatar
🤘
Leading as usual...

Fakiolas Marios fakiolinho

🤘
Leading as usual...
View GitHub Profile
@fakiolinho
fakiolinho / jQuery: IE Placeholder Issue
Last active December 16, 2015 11:59
jQuery: IE Placeholder Issue
/* If browser doesn't recognize attr placeholder change inputs value on focus/blur with the placeholder value */
/* Works for jQuery version > 1.9 were $.browser was deprecated and cannot be used anymore */
function iePlaceholder() {
if(document.createElement("input").placeholder == undefined)
{
$(':input').each(function() {
var input = $(this);
$(input).val(input.attr('placeholder'));
@fakiolinho
fakiolinho / CSS: Reset CSS
Created April 22, 2013 13:14
CSS: Reset CSS
/*
|--------------------------------------------------------------------------
| XHTML, HTML4, HTML5 Reset CSS
|--------------------------------------------------------------------------
*/
a,
abbr,
acronym,
address,
@fakiolinho
fakiolinho / JS: Single Custom Object
Created May 12, 2013 00:01
JS: Single Custom Object
//Create a single custom object
var object = {
attribute1: 'value1',
attribute2: 'value2',
method1: function() {
return this.attribute1 + ' ' + this.attribute2;
}
};
@fakiolinho
fakiolinho / JS: Custom Object for Multiple Instances
Last active December 17, 2015 05:59
JS: Custom Object for Multiple Instances
//Create a custom object for multiple instances
function object(attribute1, attribute2) {
this.attribute1 = attribute1;
this.attribute2 = attribute2;
this.method1 = function() {
return this.attribute1 + ' ' + this.attribute2;
};
}
@fakiolinho
fakiolinho / Bootstrap 3 Template
Last active December 27, 2015 14:09
Bootstrap 3 Template
<!doctype html>
<html lang="en">
<head>
<title>Bootstrap 3.3.2 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="row">
@fakiolinho
fakiolinho / AngularJS: Default Template
Created December 17, 2013 10:08
AngularJS: Default Template
<!doctype html>
<html lang="en" ng-app="myApp">
<head>
<meta charset="UTF-8">
<title>AngularJS</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css">
</head>
<body>
<script src="http://code.angularjs.org/1.2.5/angular.js"></script>
@fakiolinho
fakiolinho / Laravel - php-fpm - nginx - ssl - www to non-www setup
Last active March 27, 2017 07:42
Laravel - php-fpm - nginx - ssl - www to non-www setup
## HTTP Server
server {
listen 80;
server_name www.mydomain.gr;
return 301 http://mydomain.gr$request_uri;
}
server {
API_URL=https://example.com/api/
"scripts": {
"development": "cross-env NODE_ENV=development webpack-dev-server --config ./webpack",
"production": "cross-env NODE_ENV=production webpack --config ./webpack",
"test": "cross-env NODE_ENV=test jest --config ./jest.config.json"
}
if (process.env.NODE_ENV === 'production') {
module.exports = require('./webpack.production.config');
} else {
module.exports = require('./webpack.development.config');
}