Skip to content

Instantly share code, notes, and snippets.

View christophengelmayer's full-sized avatar

Christoph Engelmayer christophengelmayer

View GitHub Profile
@christophengelmayer
christophengelmayer / style.scss
Last active November 5, 2015 16:05
InuitCSS - All modules imported in single scss file with bower install commands
// bower install --S inuit-starter-kit
/**
* #SETTINGS
*/
@import "bower_components/inuit-defaults/settings.defaults";
// @import "settings.project";
// @import "bower_components/inuit-responsive-settings/settings.responsive"; // bower install -S inuit-responsive-settings
@christophengelmayer
christophengelmayer / form.php
Created March 12, 2013 19:55
Simple PHP Form with validation
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>PHP Normform</title>
</head>
<body>
<?php
<?php
/********************************************************
* Usage:
* - include this file in any document
* - use the following PHP tags to show / hide content:
*
* <?php if( LIKED ): ?>
* Welcome my friend
* <?php else: ?>
@christophengelmayer
christophengelmayer / responsive.scss
Created March 18, 2013 15:24
SASS port of Contao responsive Grid
/**
* Contao Open Source CMS
*
* Copyright (C) 2005-2013 Leo Feyer
*
* Sass port by Christoph Engelmayer
*
* @package Core
* @link https://contao.org
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
# Apache configuration file
# http://httpd.apache.org/docs/2.2/mod/quickreference.html
# Note: ".htaccess" files are an overhead for each request. This logic should
# be placed in your Apache config whenever possible.
# http://httpd.apache.org/docs/2.2/howto/htaccess.html
# Turning on the rewrite engine is necessary for the following rules and
# features. "+FollowSymLinks" must be enabled for this to work symbolically.
// Define a class like this
function Person(name, gender){
// Add object properties like this
this.name = name;
this.gender = gender;
}
// Add methods like this. All Person objects will be able to invoke this
Person.prototype.speak = function(){
@christophengelmayer
christophengelmayer / SpriteEmbed.js
Last active November 9, 2016 13:56
SVG Sprites Workflow
export default class SvgSpriteEmbed {
constructor(url) {
var ajax = new XMLHttpRequest();
ajax.open("GET", url, true);
ajax.responseType = "document";
ajax.onload = function(e) {
var element = ajax.responseXML.documentElement;
element.setAttribute("class", "u-hidden-visually");
document.body.insertBefore(element, document.body.childNodes[0]);
}
@christophengelmayer
christophengelmayer / Vagrantfile
Created November 22, 2016 15:52
Vagrant Scotchbox customized
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.hostname = "scotchbox"
config.vm.synced_folder ".", "/var/www/public", :mount_options => ["dmode=777", "fmode=666"]
@christophengelmayer
christophengelmayer / gulpfile.js
Last active December 15, 2016 09:00
Bootstrap Gulp Workflow
var gulp = require('gulp'),
autoprefixer = require('gulp-autoprefixer'),
browserSync = require('browser-sync').create(),
concat = require("gulp-concat"),
imagemin = require('gulp-imagemin'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
browserify = require('browserify'),
babelify = require('babelify'),
source = require('vinyl-source-stream'),
@christophengelmayer
christophengelmayer / Makefile
Last active January 2, 2017 16:40
Makefile Rsync ProcessWire
rsync:
rsync -avzuhO --delete \
--exclude '.git*' \
--exclude '.DS_Store' \
--exclude 'Makefile' \
--exclude '/src' \
--exclude '/node_modules' \
--exclude '/site/config.php' \
--exclude '/site/assets/sessions' \
--exclude '/site/assets/files' \