Skip to content

Instantly share code, notes, and snippets.

View pfrenssen's full-sized avatar

Pieter Frenssen pfrenssen

  • Sofia, Bulgaria
View GitHub Profile
@pfrenssen
pfrenssen / locatedrupal.sh
Last active December 21, 2016 20:29
Get all paths to Drupal sites on a server
#!/bin/bash
# Author: Alan Ivey
# http://echodittolabs.org/blog/2011/01/are-your-drupal-sites-running-latest-core
# Default path.
WEBHOME=/var/www
# Default limit on subfolder depth to speed up the search.
MAX_DEPTH=6
@pfrenssen
pfrenssen / deletemergedbranches.sh
Last active September 22, 2017 10:02
Checks the available git branches and deletes all branches that are fully merged in the main branch.
#!/bin/bash -e
# Checks the available git branches and deletes all branches that are fully
# merged in the main branch.
#
# Source: http://devblog.springest.com/a-script-to-remove-old-git-branches
# Configuration
if [ -z ${MAIN_BRANCH} ]; then
MAIN_BRANCH=develop
@pfrenssen
pfrenssen / gist:b14b86442d188688b2d6
Last active March 27, 2020 12:07
Jira keyboard accessibility user style for Stylus
/* Jira Agile */
/* Allow to scroll the page with the keyboard in the Plan view */
#ghx-plan,
#ghx-plan-group,
#ghx-rabid,
#ghx-work,
#page,
#js-detail-nav-content {
height: auto !important;
{
init: function(elevators, floors) {
var queue = [];
elevators.forEach(function (elevator) {
elevator.on("idle", function() {
// If there is a floor in the queue, go there.
if (queue.length > 0) {
var floor = queue.shift();
goToFloor(elevator, floor);
}
@pfrenssen
pfrenssen / removecommits.sh
Last active August 29, 2015 14:22
Script to remove a range of commits from all branches in a given remote
#!/bin/bash
#
# Removes a range of commits in all remote branches.
#
# Disclaimer: this will remove data on your remote repository. Use at your own
# risk.
# The commit that precedes the oldest commit that needs to be removed.
PRECEDING_COMMIT=ab6ce03927e46ba4fc71a0ccb7ed5d9854242c64
<?php
/**
* A Phing task to run Behat commands.
*/
require_once 'phing/Task.php';
/**
* A Behat task. Runs behavior-driven development tests against a codebase.
*
#!/bin/bash -e
#
# Syncs a local Drupal dev site with the production server:
# - pulls latest code from the git repo on the server
# - downloads database from production and restores it locally
# - syncs the sites/default/files folder
#
# Required software packages: git, mysql, openssh, rsync, sudo
# Drush has to be installed on the server.
@pfrenssen
pfrenssen / README.md
Last active May 10, 2022 14:00
Git hook to check coding standards using PHP CodeSniffer before pushing

About

This is a git pre-push hook intended to help developers keep their PHP code base clean by performing a scan with PHP CodeSniffer whenever new code is pushed to the repository. When any coding standards violations are present the push is rejected, allowing the developer to fix the code before making it public.

To increase performance only the changed files are checked when new code is

@pfrenssen
pfrenssen / gist:1b55da3cabcc877d2182
Created November 9, 2015 14:57
Deezer keyboard accessibility user style for Stylish
/* Allow to scroll the page with the keyboard. */
body {
overflow: scroll !important;
}
#page_content {
overflow-x: visible !important;
overflow-y: visible !important;
}
@pfrenssen
pfrenssen / gist:7347b8a930593747e759
Created January 6, 2016 09:57
Greasemonkey script for Jira Agile keyboard accessibility
// ==UserScript==
// @name Jira Agile keyboard accessibility
// @namespace https://gist.github.com/pfrenssen
// @version 1.0
// @description Improve keyboard accessibility for Jira Agile boards
// @author Pieter Frenssen
// @include https://*/secure/RapidBoard.jspa*
// @include https://*/**/secure/RapidBoard.jspa*
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant none