Skip to content

Instantly share code, notes, and snippets.

View chartjes's full-sized avatar

Chris Hartjes chartjes

View GitHub Profile
All games played via MIS
WEEK 1
AWAY NJR
HOME MAD
SCORES
NJR 6 4 6
MAD 2 5 0
@chartjes
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
<?php
require "vendor/autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;
// You can get all these via https://dev.twitter.com/
$consumer_key = "";
$consumer_secret = "";
$access_token = "";
$access_token_secret = "";
$user_id = 0; // Twitter user ID
@chartjes
chartjes / gist:5518698
Last active October 11, 2020 13:49
Sample PHPUnit test showing how to test actual queries
<?php
require_once '../lib/LieMapper.php';
require_once '../lib/LieEntity.php';
require_once './PDOMock.php';
class LieMapperTest extends PHPUnit_Framework_TestCase
{
/**
* @test
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 "default.storage" service.
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
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].
/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
I am using a Vuejs component as a date range picker
https://github.com/dwqs/v2-datepicker
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"/>
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
<div class="form-group">
<label for="event_id">Event ID (eg https://opencfp-central.com/myconf2020)</label>
<input type="text" class="form-control" name="event_id" placeholder="myconf2020"/>
</div>
<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>
<div class="form-group">
<label for="event_date_range">Event date</label><br>