Skip to content

Instantly share code, notes, and snippets.

View martinjoiner's full-sized avatar

Martin Joiner martinjoiner

View GitHub Profile

The issue

When a fixture is not used but needs to be included for some reasons, pylint will rightfully issue a warning. For instance, a fixture setup a specific database state and another fixture include it to ensure database is in a specific state.

@pytest.fixture
def init_database():
    """Setup database state"""
    ...
@jamescreate
jamescreate / gist:c70a05bb07e66e2f317f9ce34b2307d4
Created June 1, 2017 15:26
Rename files in current directory, replacing space char with hyphen
#!/bin/bash
ls -1 | while read file;
do
if [[ $file =~ " " ]]; then
newname=` echo "$file" | tr ' ' '-' | tr -s '-' `
printf "Renaming %s to %s \n" "$file" "$newname"
mv "$file" "$newname"
fi
done
@vluzrmos
vluzrmos / paginate.php
Created July 20, 2016 14:31
Laravel Paginate Collection or Array
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator
@johnblackmore
johnblackmore / jobspec.md
Last active August 20, 2017 11:03
PHP Developer Job at Upad

Talented PHP Developers with Laravel Experience (x3)

Upad are Hiring! We are looking for talented PHP Developers to help grow our tech team. You will be working to help migrate our legacy Zend components application over to Laravel using Modern PHP best practises. Led by someone who's "done it all before" we have the plan, we know what we want to achieve and how we are going to get there.

We are looking for experienced PHP developers in particularly mid-level or senior, although we also have roles for emerging talent so if you're looking to move into your second or third PHP job, we have roles for you too.

We are primarily looking for candidates based in the UK and are especially interested in hearing from people in the South-West. This is a full time permanent position and you must be eligible to work in the UK to apply.

The Platform