Skip to content

Instantly share code, notes, and snippets.

View driesvints's full-sized avatar

Dries Vints driesvints

View GitHub Profile
proxy | 2024/05/06 07:45:32 proxy starting, commit: d85fbd08cee81b78b7f408b09b558cac7a0cee5c
proxy | 2024/05/06 07:45:32 Listening (:1080)
updater | 2024-05-06T07:45:32.428980552 [824129777:main:WARN:src/devices/src/legacy/serial.rs:222] Detached the serial input due to peer close/error.
updater | time="2024-05-06T07:45:34Z" level=info msg="guest starting" commit=7ae3c8b6b9717f8ad3c56d9958b08ec3c5b6c903
updater | time="2024-05-06T07:45:34Z" level=info msg="starting job..." fetcher_timeout=10m0s job_id=824129777 updater_timeout=45m0s updater_version=41076f97339018d9609e338bdc9c505b58212028-composer
updater | /home/dependabot/dependabot-updater/vendor/ruby/3.3.0/gems/httparty-0.21.0/lib/httparty.rb:10: warning: csv was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add csv to your Gemfile or gemspec. Also contact author of httparty-0.21.0 to add csv into its gemspec.
updater | 2024/05/06 07:45:38 INFO <job_824129777> Starting job processing
updater | 2024/
@driesvints
driesvints / composer.json
Created November 19, 2020 10:02
Pass options to specific packages
{
"require": {
"foo/bar": {
"version": "^1.0",
"ignore-platform-req": ["php"]
}
}
}
<?php
class CashierSubscriptions implements Subscriptions
{
public function startSubscription($billable, $subscription, $plan)
{
return $billable->newSubscription($subscription, $plan)->create();
}
}
@driesvints
driesvints / config.yml
Last active September 5, 2018 09:29
Put this in a `.circleci` directory
experimental:
notify:
branches:
only:
- master
version: 2
jobs:
php7.1-5.5:
docker:
@component('mail::button', ['color' => 'green'])
Button text
@endcomponent
@driesvints
driesvints / SearchThreads.php
Created July 3, 2017 07:37
Multiple method query objects
<?php
namespace App\Queries;
use App\Models\Thread;
use Illuminate\Contracts\Pagination\Paginator;
class SearchThreads
{
public function __construct()
@driesvints
driesvints / SearchThreads.php
Last active February 13, 2020 11:13
Invokable query object
<?php
namespace App\Queries;
use App\Models\Thread;
use Illuminate\Contracts\Pagination\Paginator;
class SearchThreads
{
public function __construct()
<?php
use Illuminate\Contracts\Validation\Rule;
class ValidPaymentToken implements Rule;
{
private $gateway;
private $param1;
private $param2;
<?php
use Illuminate\Contracts\Validation\Rule;
class ValidPaymentToken implements Rule;
{
/**
* @var \CreditCardGateway
*/
private $gateway;
@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.