Skip to content

Instantly share code, notes, and snippets.


Chris Hartjes chartjes

View GitHub Profile
View wk01-2023.txt
All games played via MIS
NJR 6 4 6
MAD 2 5 0
chartjes / cycle-list.php
Created March 27, 2017 20:32
My PHP script for creating a Twitter list where people cycle on and off it based on 30 days of interaction
View cycle-list.php
require "vendor/autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;
// You can get all these via
$consumer_key = "";
$consumer_secret = "";
$access_token = "";
$access_token_secret = "";
$user_id = 0; // Twitter user ID
chartjes / gist:5518698
Last active October 11, 2020 13:49
Sample PHPUnit test showing how to test actual queries
View gist:5518698
require_once '../lib/LieMapper.php';
require_once '../lib/LieEntity.php';
require_once './PDOMock.php';
class LieMapperTest extends PHPUnit_Framework_TestCase
* @test
View gist:77e31d6bb572a8a32e92c4da885a7dfc
Symfony\Component\DependencyInjection\Exception\RuntimeException : Cannot autowire service "App\Scanner\FileScanner": argument "$fs" of method "__construct()" references class "League\Flysystem\Filesystem" but no such service exists. You should maybe alias this class to the existing "" service.
View gist:6f92f91f1f1c35ab677f635a8d18e1ee
yarn install
yarn install v1.19.1
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
✨ Done in 14.48s.
╭─ chartjes@grumpiermbp   ~/Sites/opencfp    ch-laravel    4  PHP 7.3.10     10728  17:21:47 
╰─ yarn run watch
yarn run v1.19.1
View gist:74db424013e90b46a884510d78c4563b
Problem 2
- Installation request for hhvm 4.28.1 -> satisfiable by hhvm[4.28.1].
- wouterj/eloquent-bundle 1.0.2 conflicts with hhvm[4.28.1].
- Installation request for wouterj/eloquent-bundle 1.0.2 -> satisfiable by wouterj/eloquent-bundle[1.0.2].
View gist:b0c8497a4e399706cb3611dbad8fde61
/usr/local/bin/php -dxdebug.remote_mode=jit ./vendor/bin/phpunit /Users/chartjes/Sites/opencfp-central/vendor/phpunit/phpunit/phpunit --configuration /Users/chartjes/Sites/opencfp-central/phpunit.xml --filter "/(::testExample)( .*)?$/" Tests\Feature\HomePageTest /Users/chartjes/Sites/opencfp-central/tests/Feature/HomePageTest.php --teamcity
Could not open input file: ./vendor/bin/phpunit
View gist:a462fa4d581f153e9c329797d1ae2eb4
I am using a Vuejs component as a date range picker
It is being used in a Laravel Blade template like this:
<v2-datepicker-range v-model="event_date_range" format="yyyy-MM-DD" lang="en" default="YYYY-mm-dd"></v2-datepicker-range>
<input :value="event_date_range" name="event_date_range" type="hidden"/>
<v2-datepicker-range v-model="cfp_date_range" format="yyyy-MM-DD" lang="en"></v2-datepicker-range>
<input :value="cfp_date_range" name="cfp_date_range" type="hidden"/>
View grumpy-environment.txt
I work 100% remote for Mozilla as part of the Ecosystem QA group (testing services and other items used internally) and my always-messy desk contains the following:
2016 MacBook Pro 13” laptop with touch bar running closed
Dell P2715Q display
Advantage2 LF Kinesis ergonomic keyboard
Logitech MX Master 2S bluetooth mouse
CR3 Multimedia Monitors as speakers connected through an AudioQuest Dragonfly Black 1.5 (I listen to a lot of Spotify)
Blue Yeti USB mic on a Rode microphone boom arm (I do an irregular podcast and have meetings almost every day at work)
An old pair of Sennheiser 558 headphones that I use when I don’t want to disturb my family members
Logitech HD Pro webcam that sits on top of my monitor for meetings
View form.blade.php
<div class="form-group">
<label for="event_id">Event ID (eg</label>
<input type="text" class="form-control" name="event_id" placeholder="myconf2020"/>
<div class="form-group">
<label for="event_title">Event title</label>
<input type="text" class="form-control" name="event_title" placeholder="My Conference 2020"/>
<div class="form-group">
<label for="event_date_range">Event date</label><br>