Skip to content

Instantly share code, notes, and snippets.

@nijikokun
nijikokun / Retinafy.md
Created July 24, 2012 01:42
Retinafy your site, a free book

Retinafy Your Site / Device

By Nijiko Yonskai

=====

I made a book, its one page.

Table Of Contents

@imbrish
imbrish / MacroServiceProvider.php
Created January 30, 2018 14:46
Locale-aware & multi-key sorting of arrays
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Support\ServiceProvider;
class MacroServiceProvider extends ServiceProvider
{
/**
@craychee
craychee / Are you Ready to Hire an Engineer?.md
Last active May 17, 2018 13:53
A plain English checklist to help non-technical people decide if the business is ready to engage the services of an engineer or a consulting firm. This checklist was made to accompany the following blog post: http://craychee.io/blog/2015/09/17/are-you-ready-to-hire-an-engineer/

Are you Ready to Hire an Engineer?

A plain English checklist


This checklist is intended to help non-technical people decide if the business is ready to engage the services of an engineer or a consulting firm. It is the goal of this checklist to give non-technical folks a leg up in these conversations so that they are less likely to get into lengthy (and very expensive) engagements.


###Content Content pertains to information that you already provide customers or plan to make available to anyone who comes to your site.

<?php
namespace Vehikl\Feature\Tests;
use PHPUnit\Framework\TestCase;
class FeatureToggleTest extends TestCase
{
public function test_it_executes_the_on_method_when_the_feature_is_on()
{
<?php
namespace Vehikl\Feature\Tests;
use PHPUnit\Framework\TestCase;
class FeatureToggleTest extends TestCase
{
public function test_it_executes_the_on_method_when_the_feature_is_on()
@meganlkm
meganlkm / laravel5_shared_hosting_project.sh
Last active January 3, 2019 19:49
setup a laravel5 project to deploy to a shared hosting provider
#!/bin/bash
myproject='myproject'
mywww='public_html'
# initialize project
composer create-project laravel/laravel $myproject --prefer-dist
cd $myproject
# fix paths to public
@taylorotwell
taylorotwell / global-homestead.sh
Created September 23, 2015 21:40
Global Homestead Without Composer
alias homestead='function __homestead() { (cd ~/Documents/Code/Homestead && vagrant $*); unset -f __homestead; }; __homestead'
# Usage
homestead up
homestead halt
# etc...
@vicgonvt
vicgonvt / Xdebug.md
Last active April 5, 2019 18:29
Instructions for Installing Xdebug in a Mac with Laravel, Valet and Sublime Text

NOTE: This assumes that you have Valet, Homebrew, Sublime Text and PHP properly installed and functioning and will only focus on the setup and installation and setup of Xdebug. There are other tutorials that go into great depth explaining how to get those tools installed on your mac.

Let's get started right away!

Installing Xdebug

You need to know which version of PHP you are running in your machine. To do so, from the terminal run the command php -v and this will display something like this

PHP 7.0.14 (cli) (built: Dec  8 2016 23:34:17) ( NTS )
@reinink
reinink / in-memory-sqlite-database.php
Created September 26, 2017 00:13
Give users completely safe sandboxed raw SQL reporting abilities
<?php
// Create in-memory SQLite database
$sqlite = new PDO('sqlite::memory:');
// Generate schema (for whatever tables you want)
$sqlite->prepare('CREATE TABLE users(id, family_id, first_name, last_name, email)')->execute();
$sqlite->prepare('CREATE TABLE families(id, name, phone, address)')->execute();
// Insert pre-defined data
/tests export-ignore
/stubs export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/phpunit.xml export-ignore
/changelog.md export-ignore
/readme.md export-ignore