Skip to content

Instantly share code, notes, and snippets.

Gabriel Birke gbirke

Block or report user

Report or block gbirke

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
@gbirke
gbirke / .drone.yml
Last active Oct 18, 2019
Notes from my experimentation with Drone CI
View .drone.yml
---
kind: pipeline
type: docker
name: default
steps:
- name: deploy
image: wikimediade/fundraising-ansible-deploy
pull: never # Until we publish the image
user: ansible
@gbirke
gbirke / dependencies.md
Last active Jun 7, 2019
A Wikibase interactive MUD
View dependencies.md

Node dependencies:

  • wikibase-sdk
  • bluereq
  • vorpal
@gbirke
gbirke / test.md
Last active Sep 12, 2018
testing hashes in syntax highlighting
View test.md

Follow these steps:

if [ -f test ]; then
  echo "exists!"
else 
  echo "missing!"
fi
@gbirke
gbirke / fdeploy.sh
Last active May 13, 2019
WMDE Fundraising deployment shell menu
View fdeploy.sh
#!/bin/bash
HEIGHT=15
WIDTH=40
CHOICE_HEIGHT=4
TITLE="Deploy fundraising apps"
MENU="Choose one of the following options:"
OPTIONS=(T "Fundraising Frontend TEST "
L "Fundraising Frontend LAIKA SKIN"
@gbirke
gbirke / php_feature_toggle_review.md
Last active Jun 11, 2018
Overview of PHP feature toggle libraries
View php_feature_toggle_review.md

Overview of PHP feature toggle libraries

Ordered by personal preference, while thinking about using them for https://github.com/wmde/FundraisingFrontend

remotelyliving/doorkeeper

Pro:

  • Common checks based on user/environment/date are already defined.
  • Provides logging/audit
  • Allows caching of feature sets so feature config does not need to be read on every request
  • Uses PHP 7
@gbirke
gbirke / update_all.sh
Created Feb 19, 2018
Update a mediawiki installation from git repositories
View update_all.sh
#!/bin/sh
echo "Updating core"
git pull
composer update
for e in extensions/*; do
if [ -d "$e" ]; then
cd $e
echo "Updating $(pwd)"
@gbirke
gbirke / svg-background-test.html
Created Dec 29, 2017
Testing SVG background images
View svg-background-test.html
<!DOCTYPE html>
<html>
<head>
<title>SVG-Test</title>
<style>
.foo {
background:url('Thank-you-2017-background-900.svg') no-repeat top center;
background:url('https://upload.wikimedia.org/wikipedia/commons/9/9b/Thank-you-2017-background-1200.svg') no-repeat>
background-size: cover;
height:300px;
View count_error_severities.jq
reduce inputs as $obj (
{};
if $obj.severity == "E" then
. + {
($obj.severity): (.[$obj.severity] + 1)
}
else
.
end
)
@gbirke
gbirke / adduser_github_sshpub_key.yml
Created Mar 27, 2017 — forked from shohey1226/adduser_github_sshpub_key.yml
Ansible playbook add user using public ssh key on Github
View adduser_github_sshpub_key.yml
---
- name: add user and create ssh key
user: name=shohei
- name: dowanload pubkey from Github and placed as authorized_keys
get_url: url=https://github.com/shohey1226.keys dest=/tmp/shohei.authorized_keys
delegate_to: 127.0.0.1
- name: Create authorized_keys from the file that just downloaded
authorized_key: user=shohei key="{{ lookup('file', '/tmp/shohei.authorized_keys') }}"
@gbirke
gbirke / php.service
Created Nov 16, 2016
Example systemd config for local PHP server
View php.service
[Unit]
Description=PHP Server
After=home.mount network.target
[Service]
User=vagrant
Group=vagrant
ExecStart=/usr/bin/php -S 127.0.0.1:8000 -t /vagrant/www
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
You can’t perform that action at this time.