Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Improving Processes, Products, Projects and People in Software Development.

Ben Peachey Potherca

👨‍💻
Improving Processes, Products, Projects and People in Software Development.
View GitHub Profile
View PEAR Channel Server hosted by GitHub
PEAR Channel Server hosted by GitHub
====================================
This is my PEAR Channel Server hosted by GitHub and powered by [Pirum](http://www.pirum-project.org):
[jsor.github.com/pear](http://jsor.github.com/pear)
Create your own PEAR Channel Server
-----------------------------------
@Potherca
Potherca / .bashrc
Created Aug 4, 2011
Add coloured branch or revision to prompt when in Git or SVN working directory.
View .bashrc
# ------------------------------------------------------
# Enhance prompt when inside git repos
# http://railstips.org/blog/archives/2009/02/02/bedazzle-your-bash-prompt-with-git-info/
# ------------------------------------------------------
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo -e '\E[0;34m'"\033[1m("${ref#refs/heads/}") \033[0m"
}
# ------------------------------------------------------
@Potherca
Potherca / dabblet.css
Created May 16, 2012
Floating Block on a Light Blue Small Tile Background
View dabblet.css
/**
* Floating Block on a Light Blue Small Tile Background
*/
body {
background: #CDE;
background: linear-gradient(45deg, #FFF, #AAF);
background-size: 0.75em 0.75em;
}
.grid {
@Potherca
Potherca / git-bisect-phpunit.sh
Created May 27, 2012 — forked from havvg/git-bisect-phpunit.sh
git bisect phpunit wrapper
View git-bisect-phpunit.sh
#!/bin/bash
phpunit
EXIT_CODE="$?"
if [ $EXIT_CODE -eq "255" ]; then
# Wrapping the error code to 1, so bisect marks this build as "bad" and continues.
exit 1
fi
@Potherca
Potherca / dabblet.css
Last active Feb 18, 2020
My answer to Stackoverflow Question 1261955: Inherited Text-Decoration style
View dabblet.css
/**
* My answer to Stackoverflow Question 1261955: Inherited Text-Decoration style
*
* http://stackoverflow.com/questions/1261955/inherited-text-decoration-style/4377895#4377895
*/
@import url(http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono);
body {
font-family: 'Droid Sans', sans-serif;
@Potherca
Potherca / README.md
Last active Oct 13, 2020
Create a branch on Github without access to a local git repo using http://hurl.eu/
View README.md

Ever had the need to create a branch in a repo on Github without wanting (or being able) to access a local repo?

With the aid of [the Github API][1] and [hurl.eu][2] this is a piece of cake!

Just follow these steps:

  1. Open [http://hurl.eu/][2]
  2. Find the revision you want to branch from. Either on Github itself or by doing a GET request from Hurl: https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs/heads
  3. Copy the revision hash
  4. Do a POST request from Hurl to https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs with the following as the POST body :
View CodingConvention-Dockblock.txt
/**
* Note: The variable naming scheme used in this project is an adaption of
* Systems Hungarian. More details available here:
*
* https://blog.pother.ca/VariableNamingConvention/
*
* This style guide was originally created by Ben Peachey and Sander Krause.
*/
@Potherca
Potherca / README.md
Last active Dec 17, 2015
Symfony config file compare script
View README.md

When working on a Symfony project, someone else will make a change to a config file or add new functionality that also need to be configured on my local machine for the project to work.

As I got tired of having to manually figure out what was going on I wrote a shell script to do that for me.

This script will gather all .dev files for a given directory, check whether there is an accompanying file without the .dev extension and output the diff between both.

@Potherca
Potherca / dabblet.css
Created Jun 12, 2013
Simple demonstration how nth-child works
View dabblet.css
/* Simple demonstration how nth-child works */
span {
width: 5em;
border: 0.1em solid;
display: inline-block;
text-align: center;
}
span:nth-child(5n) {
display: none;
@Potherca
Potherca / gist:6109744
Created Jul 30, 2013
Turn things of for the HTML input element.
View gist:6109744
<input type="text" name="some_name" autocomplete="off" autocorrect="off" autocapitalize="off">
You can’t perform that action at this time.