Skip to content

Instantly share code, notes, and snippets.

View navitronic's full-sized avatar
👋

Adrian Palmer navitronic

👋
View GitHub Profile
@navitronic
navitronic / composer.json
Last active August 29, 2015 14:20
Fresh symfony composer.json
{
"name": "adrian/installer-test",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-0": {
"": "src/",
"SymfonyStandard": "app/"
}
},
@navitronic
navitronic / pre-push
Created April 1, 2015 23:32
pre-push hook
#!/bin/sh
CMD="make php-cs"
# Check if we actually have commits to push
commits=`git log @{u}..`
if [ -z "$commits" ]; then
exit 0
fi
@navitronic
navitronic / gist:9679452
Created March 21, 2014 04:21
Display all hexadecimal colours within a less or css file.
<?php
$less = file_get_contents(__DIR__ . '/app.less');
preg_match_all('/#([a-fA-F0-9]){3}(([a-fA-F0-9]){3})?\b/', $less, $matches);
$colors = array_values($matches[0]);
$colors = array_map(function($color){ return strtolower($color); }, $colors);
$colors = array_unique($colors);
sort($colors);