Skip to content

Instantly share code, notes, and snippets.

View lmuzinic's full-sized avatar

Luka Muzinic lmuzinic

View GitHub Profile
@lmuzinic
lmuzinic / composer.json
Last active August 29, 2015 14:16
Rename sculpin.json to composer.json and add the following
"require": {
"sculpin/sculpin": "~2.0",
"dflydev/embedded-composer-console": "@dev",
"dflydev/embedded-composer-core": "@dev",
"composer/composer": "@dev",
},
@lmuzinic
lmuzinic / .travis.yml
Created March 12, 2015 10:03
Prepare repository for Travis CI
language: php
php:
- 5.6
install:
- composer install
script:
- vendor/bin/sculpin generate
# on Linux use
base64 --wrap=0 travis_id_rsa > travis_id_rsa_base64
# on Mac OS X use
base64 --break=0 travis_id_rsa > travis_id_rsa_base64
# make sure you replace organisation/repo-name with your own
ENCRYPTION_FILTER="echo \$(echo \"- secure: \")\$(travis encrypt \"\$FILE='\`cat $FILE\`'\" -r organisation/repo-name)"
# on Linux use
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" travis_id_rsa_base64 id_rsa_ >> .travis.yml
# on Mac OS X use
gsplit --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" travis_id_rsa_base64 id_rsa_ >> .travis.yml
before_script:
- 'echo -n $id_rsa_{00..30} >> ~/.ssh/id_rsa_base64'
- 'base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa'
- 'chmod 600 ~/.ssh/id_rsa'
- 'echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config'
ssh-keygen -t rsa -C "travis_ci" -f travis_id_rsa
# Generating public/private rsa key pair.
# Enter passphrase (empty for no passphrase):
# Enter same passphrase again:
# Your identification has been saved in travis_id_rsa.
# Your public key has been saved in travis_id_rsa.pub.

Keybase proof

I hereby claim:

  • I am lmuzinic on github.
  • I am lmuzinic (https://keybase.io/lmuzinic) on keybase.
  • I have a public key whose fingerprint is 9C74 980C C325 2990 2B9F 40BB 72BB AC5B 0ED1 2F67

To claim this, I am signing this object:

<?php
class User
{
// ...
public function isAdmin()
{
if ($this->status === self::ADMIN) {
return true;
@lmuzinic
lmuzinic / User.php
Created January 29, 2018 15:02
Infection
<?php
class User
{
// ...
public function isAdmin()
{
if ($this->status === self::ADMIN) {
return true;
<?php
class LegalAgeTest extends TestCase
{
use \Eris\TestTrait;
public function setUp()
{
$this->legalAge = new LegalAge();
}