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
| composer update --profile -vvv --ignore-platform-reqs 9:22:59 ∞ | |
| [8.0MB/0.18s] Reading ./composer.json | |
| [8.0MB/0.23s] Loading config file /home/vagrant/.composer/config.json | |
| [8.0MB/0.24s] Loading config file /home/vagrant/.composer/auth.json | |
| [8.0MB/0.25s] Loading config file ./composer.json | |
| [8.0MB/0.31s] Executing command (CWD): git describe --exact-match --tags | |
| [8.0MB/0.39s] Executing command (CWD): git branch --no-color --no-abbrev -v | |
| [8.0MB/0.64s] Failed to initialize global composer: Composer could not find the config file: /home/vagrant/.composer/composer.json | |
| To initialize a project, please create a composer.json file as described in the http://getcomposer.org/ "Getting Started" section |
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 | |
| /** | |
| * Get a value from the cache or compute it using a callback | |
| * Includes cache stampede protection | |
| * @link http://en.wikipedia.org/wiki/Cache_stampede | |
| * @link http://blog.lavoie.sl/2014/12/preventing-cache-stampede-using-doctrine-cache.html | |
| * @global cache Doctrine\Common\Cache\Cache | |
| * | |
| * @param string $key Cache key |
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 Doctrine\Common\DataFixtures\Executor\ORMExecutor; | |
| use Doctrine\Common\DataFixtures\Purger\ORMPurger; | |
| use Doctrine\DBAL\Migrations\AbstractMigration; | |
| use Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader as Loader; | |
| use Symfony\Component\Console\Output\ConsoleOutput; | |
| use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |
| use Symfony\Component\DependencyInjection\ContainerInterface; |
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/python | |
| import urllib2 | |
| import json | |
| request = urllib2.urlopen('https://api.github.com/repos/composer/composer/git/refs/heads/master') | |
| obj = json.load(request) | |
| print obj["object"]["sha"] |
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
| ## | |
| # Determine if a brew is installed. | |
| # | |
| # @uses brew | |
| # @param string brew name | |
| # @returns success code | |
| # | |
| function brew_installed() { | |
| local brew="${1}" |
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
| #!/bin/bash | |
| # Starting Sublime Text from inside a Virtual Machine | |
| # @link https://gist.github.com/lavoiesl/c01b16b5f875906a6d82 | |
| # You may require to install realpath | |
| path="$(realpath "$1")" | |
| if echo "${path}" | grep -q "^/media/data/projects"; then |
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
| #!/bin/bash | |
| # @link https://gist.github.com/lavoiesl/eac60efde00c1df49c73 | |
| function usage() { | |
| echo "Homebrew manager" | |
| echo "Use dump-merge to save a list of installed brews to Dropbox" | |
| echo "Use install to install missing brews" | |
| echo "Usage: ${0} [--cask] [--directory directory] [--hostname hostname] dump|merge|dump-merge|diff|install" >&2 | |
| exit 255 | |
| } |
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
| #!/bin/bash | |
| # Drop all tables of a MySQL database | |
| # https://gist.github.com/lavoiesl/96aa8586b609daac2dad | |
| if [ -z "$@" ]; then | |
| echo "Usage: $0 database_name" >&2 | |
| echo " or : $0 -uuser -ppassword -hlocalhost database_name" >&2 | |
| exit 1 | |
| fi |
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
| #!/bin/bash | |
| ## | |
| # https://pushover.net/ CLI tool | |
| # | |
| # @license MIT | |
| # @author http://blog.lavoie.sl/ | |
| # @link https://gist.github.com/lavoiesl/e0d1d9173e25bccb63a3 | |
| # | |
| # Supports APP bookmarks, example: |
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
| #!/bin/bash | |
| # Convert file from iso-8859-* to UTF8 if needed | |
| # | |
| # @link https://gist.github.com/lavoiesl/432827990d78c3764f50 | |
| if [[ $# -lt 1 ]]; then | |
| echo "Usage: $0 input-file" >&2 | |
| exit 1 | |
| fi |