Skip to content

Instantly share code, notes, and snippets.

View freekmurze's full-sized avatar

Freek Van der Herten freekmurze

View GitHub Profile
@taylorotwell
taylorotwell / alert.php
Created November 11, 2016 22:39
Components And Slots
<div class="alert">
{{ $slot }}
</div>
<?php
namespace Studiow\Util;
class MatchAll
{
private $result;
private $matches = [];
public function __construct($pattern, $subject, $flags = PREG_PATTERN_ORDER, $offset = 0)
@bramus
bramus / DataStore.php
Created April 6, 2016 15:05
Simple PHP Key-Value DataStore
<?php
namespace Bramus;
/**
* Simple Key-Value DataStore to keep variables on
*/
class Datastore {
private $data = array();
@petericebear
petericebear / .php_cs
Last active June 26, 2023 02:32
Laravel 5.x php-cs-fixer config file
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
@fideloper
fideloper / update_curl.sh
Last active January 11, 2024 15:23
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@driesvints
driesvints / new-relic-deployment-notifications-in-envoyer.md
Last active October 26, 2020 14:17
Setup New Relic deployment notifications in Envoyer

While Envoyer comes with Slack and Hipchat notifications out of the box we'll have to setup New Relic notifications ourselves. Luckily it's as easy as adding a deployment hook. Here's how to:

  1. Add a new hook after the "Activate New Release" hook.
  2. Add the following curl command as the script:
curl -H "x-api-key:REPLACE_WITH_YOUR_API_KEY" -d "deployment[app_name]=REPLACE_WITH_YOUR_APP_NAME" https://api.newrelic.com/deployments.xml

And that's it! Envoyer will now let New Relic know each time a deployment's made. You can be sure the deployment succeeded because it happens after the new release has been made active.

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 28, 2024 08:25
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jatubio
jatubio / .php_cs
Created June 13, 2015 11:51
Config file to pass PHP-CS-Fixer with Laravel 5.1 custom and PSR-2 styles coding
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@michaeldyrynda
michaeldyrynda / Envoy.blade.php
Last active July 13, 2023 17:40
Laravel 5 Envoy deploy configuration
@servers([ 'remote' => 'server.example.com', ])
@setup
if ( ! isset($repo) )
{
throw new Exception('--repo must be specified');
}
if ( ! isset($base_dir) )
{