Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Vladimir Vukanac vukanac

🎯
Focusing
View GitHub Profile
@vukanac
vukanac / install-php72-osx.md
Created Aug 20, 2017
How to install php72 on Mac OS X with homebrew.
View install-php72-osx.md

Skip this:

brew tap homebrew/dupes
brew tap homebrew/versions

As:

Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
@aknackd
aknackd / README.md
Last active Mar 5, 2020
Laravel Dusk for Selenium using Docker
View README.md

Configuring Laravel Dusk for Selenium using Docker

Start Docker containers

First, we need to run a Selenium Hub and a Firefox Selenium node:

$ docker run -d --name hub -p 4444:4444 selenium/hub
$ docker run -d --name fx --link hub:hub selenium/node-firefox
@w00fz
w00fz / sphp.sh
Last active Jun 2, 2020
PHP switcher
View sphp.sh
#!/bin/bash
# Check if command was ran as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
fi
# Usage
@tristanlins
tristanlins / iconv.docker
Created Oct 10, 2015
Docker PHP extension recipes
View iconv.docker
FROM php:5.6-cli
RUN apt-get update \
&& apt-get install -y \
libfreetype6-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install iconv \
&& apt-get remove -y \
libfreetype6-dev \
&& apt-get install -y \
@mikefrancis
mikefrancis / README.md
Last active Jan 26, 2020
PSR-2 Build System using Sublime Text
View README.md

PSR-2 Build System using Sublime Text

Installation

Open a new terminal and install Composer:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Once that has finished installing and moved, install the PHP-CS-Fixer Composer package globally:

View gist:9188393
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
@pete-otaqui
pete-otaqui / bumpversion.sh
Created Dec 2, 2012
Bump a software project's VERSION, add the CHANGES, and tag with GIT
View bumpversion.sh
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.
@tPl0ch
tPl0ch / build.xml
Created Dec 2, 2012
Ant build file for PHP projects including Behat build task
View build.xml
<?xml version="1.0" encoding="utf-8"?>
<project name="your-project-name-here" default="build">
<target name="build"
depends="prepare,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdox,phpunit,behat,phpcb"/>
<target name="build-parallel"
depends="prepare,lint,tools-parallel,phpunit,phpcb"/>
<target name="tools-parallel" description="Run tools in parallel">
<parallel threadCount="2">
@ziadoz
ziadoz / Version20121011141021.php
Created Oct 11, 2012
Doctrine DBAL and Migrations Example
View Version20121011141021.php
<?php
/*
* /path/to/migrations/directory/Version20121011141021.php
*/
namespace ExampleMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20121011141021 extends AbstractMigration
You can’t perform that action at this time.