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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "hashicorp/precise64" | |
config.vm.network :private_network, ip: "192.168.33.21" | |
config.vm.provision :shell, :path => "install.sh" |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "hashicorp/precise64" | |
config.vm.network :forwarded_port, guest: 80, host: 8080 | |
config.vm.provision :shell, :path => "install.sh" |
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
/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/ |
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
/* Additional method for jquery validate | |
Valiate dates in the format dd.mm.yyyy | |
------------------------------------- */ | |
jQuery.validator.addMethod( | |
"dateDECH", | |
function(value, element) { | |
var check = false; | |
var re = /^\d{1,2}\.\d{1,2}\.\d{4}$/; | |
if( re.test(value)){ | |
var adata = value.split('.'); |
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
// REM output based on the $em-base variable with pixel fallback | |
@mixin font-size($pxVal) { | |
@if not unitless($pxVal) { | |
$pxVal: strip-unit($pxVal); | |
} | |
font-size: $pxVal * 1px; | |
font-size: rem($pxVal); | |
} |
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
// Center a block element | |
@mixin center-block { | |
display: block; | |
margin-right: auto; | |
margin-left: auto; | |
} |
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
window.onblur = function () { document.title = 'you went?'; } | |
window.onfocus = function () { document.title = 'you came back'; } |
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 | |
/** | |
* Class SubmenuFirstWalker | |
* This walker changes the order of elements, if they have a submenu | |
* Standard is anchor than the submenu. Wth this walker, the submenu gets rendered first. | |
* There is one new filter 'walker_nav_menu_end_el' | |
* @author Markus Schober | |
*/ | |
class SubmenuFirstWalker extends Walker_Nav_Menu { |
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 | |
/** | |
* Generate Password with a given length and strength | |
* | |
* @param int $length | |
* @param int $strength | |
* @return string | |
*/ | |
function generatePassword($length = 9, $strength = 4) |
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 | |
/** | |
* Echo an ACF Field if it is present | |
* @param bool|int $field Name of the field | |
* @param string $before prepend the field with this string. HTML for example | |
* @param string $after append the field with this string. HTML for example | |
* @param bool|int $post_id | |
* | |
* @return bool|void |
OlderNewer