jq is useful to slice, filter, map and transform structured json data.
brew install jq
<?php | |
use GuzzleHttp\Client; | |
use GuzzleHttp\Exception\ConnectException; | |
use GuzzleHttp\Exception\RequestException; | |
use GuzzleHttp\Handler\CurlHandler; | |
use GuzzleHttp\HandlerStack; | |
use GuzzleHttp\Psr7\Request as Psr7Request; | |
use GuzzleHttp\Psr7\Response as Psr7Response; | |
use Psr\Log\LoggerInterface; | |
const MAX_RETRIES = 2; |
#!/usr/bin/env php | |
<?php | |
if ($argc < 3) { | |
die("Usage: ./jtt.php ISSUE-1 30m optional comment here\n"); | |
} | |
$username = 'EMAIL_GOES_HERE'; | |
$token = 'API_KEY_HERE'; // see https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/ | |
$team = 'TEAM_NAME_HERE'; |
<?php | |
namespace League\Skeleton; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Routing\Router; | |
class SkeletonServiceProvider extends ServiceProvider | |
{ | |
/** |
<?php | |
trait EventGenerator | |
{ | |
protected $pendingEvents = array(); | |
protected function raise($event) | |
{ | |
$this->pendingEvents[] = $event; | |
} |
PhpStorm 7.0x
Create a file ~/.local/share/applications/jetbrains-phpstorm.desktop
With the following value:
#!/usr/bin/env bash | |
# Created by Hugo Ferreira <[email protected]> on isoD. | |
# Copyright (c) 2012 Mindclick. All Rights Reserved. | |
# Licensed under the BSD License: http://creativecommons.org/licenses/BSD | |
readonly BASEDIR=$(cd "$(dirname "$0")" && pwd) # where the script is located | |
readonly CALLDIR=$(pwd) # where it was called from | |
readonly STATUS_SUCCESS=0 # exit status for commands | |
# Script configuration |
# Vagrant Documentation | |
# @see http://docs.vagrantup.com/v2/cli/package.html | |
# @see http://stackoverflow.com/questions/19094024/is-there-any-way-to-clone-a-vagrant-box-that-is-already-installed | |
# <command-1> | |
vagrant package --base <virtual-box-name-or-uuid> ^ | |
--output </path/to/package-name.box:package.box> | |
# <command-2> | |
vagrant box add --name <box-name> ^ |
# Start the old vagrant | |
$ vagrant init centos-6.3 | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on | |
# this machine, please update the guest additions and repackage the | |
# box. |