A Pen by Captain Anonymous on CodePen.
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
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
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
'use strict'; | |
var gulp = require('gulp'); | |
var typescript = require('gulp-tsc'); | |
var mocha = require('gulp-mocha'); | |
var growl = require('gulp-notify-growl'); | |
var async = require('async'); | |
var notify = growl(); | |
var paths = { |
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 | |
use Nette\Application\UI\Presenter; | |
use Nette\DI\CompilerExtension; | |
/** | |
* Auto register presenters as services | |
* @author Martin Bažík <[email protected]> |
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
$domains = parse_ini_file(__DIR__.'/../app/config/domains.ini'); | |
$localDomainsFile = __DIR__.'/../app/local/domains.ini'; | |
if(file_exists($localDomainsFile)) { | |
$localDomains = parse_ini_file($localDomainsFile); | |
$domains = array_merge($domains, $localDomains); | |
} | |
$site = $domains[filter_input(INPUT_SERVER, 'SERVER_NAME')]; | |
define('SITE', $site); |
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
{ | |
"USD": "$", | |
"EUR": "€", | |
"GBP": "£", | |
"INR": "₹", | |
"AUD": "$", | |
"CAD": "$", | |
"SGD": "$", | |
"CHF": "CHF", | |
"MYR": "RM", |
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
#!/usr/bin/env php | |
<?php | |
use Symfony\Component\Console\Application; | |
// Let bootstrap create Dependency Injection container. | |
$configurator = require __DIR__ . '/app/bootstrap.php'; | |
$configurator->addConfig(__DIR__ . '/app/config/console.neon'); |
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
$di->set('translator', function() use ($config, $di) { | |
$locale = $di->get('locale'); | |
$whitelist = ['de', 'en']; | |
$fallback = ['de', 'en']; | |
$chainResolver = new \Kdyby\Translation\LocaleResolver\ChainResolver;//new \LocaleResolver($locale); | |
$localeResolver = new \LocaleResolver($locale); | |
$chainResolver->addResolver($localeResolver); |
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
const renderBooleanFeature = (packages, title, feature) => { | |
let tds = []; | |
for (let $package of packages) { | |
const data = $package[1]; | |
const code = $package[0]; | |
if (data.hasOwnProperty(feature) && data[feature] === true) { | |
tds.push( | |
<td key={code+feature} className={code}> | |
<span className="glyphicon glyphicon-ok"></span> |
To be able to use PHP5 PDO with MS Access mdb files the following is required
(the same applies for the PHP4 style of using odbc_X
except for the
obviously PDO specific requirements):
In Linux this is achieved by intalling the php5-odbc
package: