Skip to content

Instantly share code, notes, and snippets.

View svpernova09's full-sized avatar
🚀
In Transit

Joe Ferguson svpernova09

🚀
In Transit
View GitHub Profile
@svpernova09
svpernova09 / gist:3f085c684150896b1384
Created June 18, 2015 19:19
Ansible task to copy file
- name: "Copy some file"
copy:
src=file-name.ext
dest=/tmp
owner=root
group=root
mode=0775
tags:
- tag
@svpernova09
svpernova09 / Option A
Created July 5, 2015 17:43
Style question
public function execute(InputInterface $input, OutputInterface $output)
{
copy(__DIR__.'/stubs/LocalizedVagrantfile', $this->basePath.'/Vagrantfile');
if (!file_exists($this->basePath.'/Homestead.yaml')) {
copy( __DIR__ . '/stubs/Homestead.yaml', $this->basePath . '/Homestead.yaml' );
}
else
{
$this->error('Homestead.yaml exists, please delete this file before continuing.');
@svpernova09
svpernova09 / Vagrant up Log
Last active August 29, 2015 14:24
Vagrant up Log
vagrant destroy -f && vagrant up ─(07/10/15)─┘
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
==> default: Running cleanup tasks for 'ansible' provisioner...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Setting the name of the VM: ansible-octane_default_1436561486014_32479
==> default: Clearing any previously set forwarded ports...
array(4) {
[0]=>
array(5) {
["id"]=>
int(339)
["name"]=>
string(7) "Item 1"
["date"]=>
string(19) "2015-04-16 16:09:40"
["clicks"]=>

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Verifying that +joepferguson is my blockchain ID. https://onename.com/joepferguson

Adventures in Laravel 5 - Joe Ferguson -

If you want to follow along and work on the exercises your laptop or VM will need:

  • PHP 5.6+
  • a way to set up virtual hosts
  • a way to set up MySQL.

Vagrant + VirtualBox would be easier but are not required.

@svpernova09
svpernova09 / AsteriskComposerServiceProvider.php
Created February 9, 2016 18:54
Using Asterisks for all views in a path?
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class ComposerServiceProvider extends ServiceProvider
{
/**
* Register bindings in the container.
<html lang="fi">
<head>
<meta charset="utf-8">
<style>
table { width: 100%; }
</style>
</head>
<body>
<form action="<? $_SERVER['PHP_SELF'] ?>" method="post">
<?php
/**
App stuff
**/
$container['db'] = function ($container) {
$capsule = new \Illuminate\Database\Capsule\Manager;
$capsule->addConnection([
'driver' => 'mysql',