Skip to content

Instantly share code, notes, and snippets.

View luceos's full-sized avatar
👨‍🎨
Painting web

Daniël Klabbers luceos

👨‍🎨
Painting web
View GitHub Profile
@luceos
luceos / composer.sh
Created September 24, 2018 12:38 — forked from iWader/composer.sh
Laravel Unit and Dusk tests on CircleCI 2.0 https://iwader.co.uk/post/laravel-unit-dusk-tests-circleci
#!/bin/sh
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
git log --pretty='format:%B' master..
| egrep -o "PROJ-[[:digit:]]{1,}"
| sort
| uniq
| xargs -I % sh -c 'curl -u $JIRA_AUTH -H "Content-Type: application/json" https://yourjira.atlassian.net/rest/api/2/issue/%'
| jq -r '[.key, .fields.issuetype.name, .fields.assignee.displayName, .fields.status.name, .fields.summary] | "\(.[0]): (\(.[1]), \(.[3])) \(.[4]) | \(.[2])"'
# output:
#
# PROJ-1234: (Story, Done) The summary of the ticket | Assignee Name
@luceos
luceos / config.yaml
Created August 27, 2018 06:01
CircleCI config for laravel and forge token deployment
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: phpdocker/phpdocker:7.1
@luceos
luceos / recompile.sh
Created June 7, 2018 14:51
recompile all extensions of flarum
#!/usr/bin/env bash
base=$PWD
for PACKAGE in `find vendor -mindepth 2 -maxdepth 2 -type d`
do
cd $PACKAGE
PACKAGE_PATH=$PWD
@luceos
luceos / yaff.md
Last active June 14, 2017 14:10
Forking Flarum

Roadmap

  • Decide on a name & motto.
  • Open a community forum.
  • Create a new design.
  • Get 0.1.0 released asap.

Direct improvements

  • Work with a monthly release cycle, Gitlab style.
@luceos
luceos / post-checkout
Last active April 27, 2023 17:19 — forked from mariusGundersen/post-checkout
runs composer install after doing a git pull
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` or `git checkout` if a specified file was changed
# Run `chmod +x post-checkout` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && echo " * changes detected in $1" && echo " * running $2" && eval "$2"
nginx['custom_gitlab_server_config'] = "location ~ ^\/satis\/ {\n root /var/www/satis/public;\n index index.html index.php;\n rewrite ^\/satis(.*\.[json|html])$ $1 break;\n try_files $uri @satis;\n }\n location @satis {\n root /var/www/satis/public;\n fastcgi_pass unix:/var/run/php/php-fpm.sock;\n include /etc/gitlab/nginx/fastcgi_params;\n }\n"
@luceos
luceos / gist:d1fdcd0e8a3419c567ad
Created March 24, 2016 11:48
flarum/core beat 5 changelog - 20160324
* a5c8ef0 Tweak user email confirmation alert
* cb428f1 Make StyleCI happy
* 3d11309 Merge pull request #862 from sijad/confirm-msg
|\
| * b13adfe Show alert for unverified User
|/
* b2b5789 info: Show commit hashes for Flarum core and extensions
* 673a78a info: Show loaded PHP extensions
* 31caced info: Show installation path
* 5d88ad2 info: Show base URL
@luceos
luceos / Flarum.xml
Created March 2, 2016 08:13
PHP Storm Style guide for Flarum
<code_scheme name="Flarum">
<option name="AUTODETECT_INDENTS" value="false" />
<option name="HTML_ATTRIBUTE_WRAP" value="0" />
<PHPCodeStyleSettings>
<option name="ALIGN_KEY_VALUE_PAIRS" value="true" />
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
<option name="ALIGN_PHPDOC_COMMENTS" value="true" />
<option name="CONCAT_SPACES" value="false" />
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
@luceos
luceos / friends-of-flarum.md
Last active December 23, 2015 10:21
friends of flarum

:name

:name is a collaboration of Flarum extension developers, who want to share their experiences to help others at building Flarum extensions and improve the documentation from an outsider viewpoint.

Our checklist

In order to provide quality extensions and snippets, we follow this checklist as closely as possible;

  • Namespaces consist of the :name vendor and a unique package name prefixed by flarum: :name/flarum-package-name.
  • Packages are hosted on [Github][github] and registered on [Packagist][packagist], making it easily available through [Composer][composer].