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'; | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var browserSync = require('browser-sync').create(); | |
// Static Server + watching scss/html files | |
gulp.task('serve', ['sass'], function() { | |
browserSync.init({ |
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
<!-- Behavioral Meta Data --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |
<!-- Core Meta Data --> | |
<meta name="author" content=""> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<!-- Open Graph Meta Data --> |
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
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
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
// media query event handler | |
if (matchMedia) { | |
var mq = window.matchMedia("(min-width: 500px)"); | |
mq.addListener(WidthChange); | |
WidthChange(mq); | |
} | |
// media query change | |
function WidthChange(mq) { |
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
<IfModule mod_rewrite.c> | |
Options -MultiViews | |
RewriteEngine On | |
#RewriteBase /path/to/app | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^ index.php [QSA,L] | |
</IfModule> |
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
/* | |
Usage: color: set-text-color($colorVar); | |
*/ | |
@function set-text-color($color) { | |
@if (lightness($color) > 50) { | |
@return darken($color, 40%); // lighter bg | |
} @else { | |
@return lighten($color, 40%); // darker bg | |
} | |
} |
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
Snippet: |
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
#! /bin/bash | |
TIMESTAMP=$(date +"%F") | |
BACKUP_DIR="/tmp/$TIMESTAMP/mysqldump" | |
MYSQL_USER="*********" | |
MYSQL=/usr/bin/mysql | |
MYSQL_PASSWORD="*********" | |
MYSQLDUMP=/usr/bin/mysqldump | |
mkdir -p $BACKUP_DIR |
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
/*================================================== | |
= Bootstrap 3 Media Queries = | |
==================================================*/ | |
/*========== Mobile First Method ==========*/ | |
/* Custom, iPhone Retina */ | |
@media only screen and (min-width : 320px) { |
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
function Categories(outputElement, outputID) { | |
this.outputElement = outputElement; | |
this.outputID = outputID; | |
} | |
Categories.prototype.getOptionLinks = function() { | |
var catListEl = document.getElementsByClassName(this.outputElement)[0]; | |
var items = catListEl.childNodes[1].children; | |
var html = ''; | |
for (var i = 0; i < items.length; ++i) { | |
var link = items[i].childNodes[0].href; |