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 | |
/** | |
* Offers a way to save files as a cleaned, unique version of the original filename. | |
* | |
* Use this as the 'validated_file_class' option on sfValidatorFile. | |
* | |
* Bad characters are replaced by the replaceCharacter string. Unique filenames | |
* are created by appending an increasing -# to the end of the basename | |
* of the uploaded file. |
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 | |
for cfg in `git config -f .gitmodules -l` | |
do | |
url=`echo $cfg | awk -F"submodule.*.url=" '{print $2}'`; | |
if [ -n "$url" ]; then | |
echo "git submodule add $url $path"; | |
git submodule add $url $path; |
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
#!/usr/bin/env sh | |
# File extension to check for changes | |
OBSERVE='dist' | |
# check if user configured mergetool | |
mergetool=`git config --get merge.tool` | |
if [[ -n "$mergetool" ]]; then | |
PROG=$mergetool | |
else |
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
find . -type f -name "*.html.twig" | xargs perl -pi -e "s/>([^\s<{>].*?)</>{{ '\1'|trans }}</g" |
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 | |
namespace Ormigo\Bundle\OrmigoBundle; | |
use Symfony\Component\HttpKernel\Bundle\Bundle; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Ormigo\Bundle\OrmigoBundle\DependencyInjection\Compiler\RegisterStreamsPass; | |
/** |
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
# Microsoft IE OVA images from http://www.modern.ie/en-us/virtualization-tools | |
# VirtualBox for Mac: | |
http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/IE6_WinXP.ova.zip | |
http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/IE7_Vista.ova.zip | |
http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/IE8_Win7.zip | |
http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/IE9_Win7.zip | |
http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/IE10_Win8.ova.zip |
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
listen-address=127.0.0.1 | |
# interface=lo | |
address=/dev/127.0.0.1 | |
address=/local/127.0.0.1 | |
no-dhcp-interface=no |
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 | |
$num = floatval($argv[1] ?? '1e6'); | |
echo "iterations: $num\n"; | |
function noop() { | |
} | |
$start = microtime(true); | |
printf("starting raw at:\t\t%.3F s\n", $start); |
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
const puppeteer = require('puppeteer'); | |
const { defineSupportCode } = require('cucumber') | |
defineSupportCode(({ Before, Given, When, Then }) => { | |
Before({ timeout: 60 * 1000 }, async function testCase() { | |
this.browser = await puppeteer.launch() | |
}) | |
Given('I am on google with puppeteer', { timeout: 60 * 1000 }, async function testCase() { | |
this.page = await this.browser.newPage() |
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
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE NumericUnderscores #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeApplications #-} | |
-- | | |
-- To reproduce with curl, run mainTls (from ghci) and use | |
-- | |
-- @ |
OlderNewer