Skip to content

Instantly share code, notes, and snippets.

Ben Kuhl bkuhl

Block or report user

Report or block bkuhl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:adbae2298a0db8a71a31adfd9f683e0f
deploy-to-rancher:
stage: deploy
image: cdrx/rancher-gitlab-deploy
script:
- upgrade --stack patchbot --service migrations --new-image $CLI_IMAGE_RELEASE_TAG
- upgrade --stack patchbot --service web --new-image $WEB_IMAGE_RELEASE_TAG --start-before-stopping
- upgrade --stack patchbot --service cron --new-image $CLI_IMAGE_RELEASE_TAG
- upgrade --stack patchbot --service queue --new-image $CLI_IMAGE_RELEASE_TAG
environment:
name: production
@bkuhl
bkuhl / .gitlab-ci.yml
Last active Aug 21, 2019
How to use docker-compose in GitLab CI
View .gitlab-ci.yml
# Using edge-git ensures we're always pulling the latest
# You can lock into a specific version using the *-git tags
# on https://hub.docker.com/_/docker/
image: docker:edge-git
services:
- docker:dind
# If you only need compose in a specific step definitely put this
# only in that step so it's not executed unnecessarily
before_script:
@bkuhl
bkuhl / style-ci-null-value.md
Last active Feb 7, 2017
StyleCI before/after
View style-ci-null-value.md

The repository in question is 65315616. We're not using any custom configuration. My CI is encountering an issue where a unit test, expecting a null value throws a TypeError: Return value of Operator\Telephony\Steps\Voicemail\Builder::prompt() must implement interface Operator\Telephony\Steps\Prompt or be null, none returned

Before StyleCI

    public function prompt() : ?Prompt
    {
        return null;
    }
@bkuhl
bkuhl / ClasspathToClassConstants.md
Last active Feb 20, 2016
Find/replace full classpaths to use php ::class constants
View ClasspathToClassConstants.md

Purpose: Replaces all ::mock and ::make instances with PHP class constants.

This is useful when upgrading Laravel 4 projects to Laravel 5.

Note: This find/replace assumes all mock/make instances utilize full classpaths (e.g. App::make('My\Project\Namespace\MyClass'))

Text to find:

\:\:(mock|make)\('(.+?)'\)
@bkuhl
bkuhl / gist:f44d05680d36b8f11910
Created Sep 25, 2014
Laravel 5.0 Feature Request: Advanced Dependency Injection
View gist:f44d05680d36b8f11910
<?php
/**
* Sometimes a class needs 1 specific instance of something, but several generic instances and it
* becomes a bit of a pain to instantiate. I suggest making this easier...
*/
// In Laravel 4.3 we need to do it this way
MyClass {
public function __construct(ParamOne $paramOne)
View Controller
public function __construct(Company $company, User $user)
{
$this->company = $company;
$this->user = $user;
}
/**
* Display a listing of the resource.
*
* @return Response
View gist:6321604
grunt-cli: The grunt command line interface. (v0.1.9)
Fatal error: Unable to find local grunt.
If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:
http://gruntjs.com/getting-started
@bkuhl
bkuhl / tinymce-content.css
Created Apr 24, 2012 — forked from dolzenko/tinymce-content.css
Style un-reset for TinyMCE content inserted on the pages with YUI CSS reset
View tinymce-content.css
/* Style un-reset for TinyMCE content inserted on the pages with YUI CSS reset.
* Added along with YUI CSS reset to the content_css option of TinyMCE and to the page on which TinyMCE content should be displayed.
*/
/* This part is based on tinymce-3.2.1.1\jscripts\tiny_mce\themes\advanced\skins\default\content.css */
.mceContentBody,
.mceContentBody td,
.mceContentBody pre
{
You can’t perform that action at this time.