Skip to content

Instantly share code, notes, and snippets.

View zspine's full-sized avatar
🎯
Focusing

M#3 zspine

🎯
Focusing
View GitHub Profile
@zspine
zspine / Vagrantfile
Created November 20, 2017 06:13
Ubuntu, Setting up a docker development env with Vagrant
$script = <<SCRIPT
# Set up the repository
echo “Update the apt package index...”
sudo apt-get update -y
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
<div class="row">
<?
$i = 0;
foreach ($cars as $car) {
?>
Your code here
<?
$i++;
if ($i % 3 == 0) {
echo '</div><div class="row">';
@zspine
zspine / codeception-commands.md
Last active August 1, 2018 13:22
Codeception Console Commands

Run Tests

php bin/codecept run
php bin/codecept run unit
php bin/codecept run acceptance
php bin/codecept run functional

Acceptance Test with PhantomJs

#restart
sudo reboot
#shutdown
sudo poweroff
#copy from local to remote server
#scp target file user@ip-address destination
scp /home/migration/backup/example.txt root@1.1.1.1:/var/www/vhosts/example.com/backup
@zspine
zspine / app.js
Created November 4, 2015 04:19 — forked from jrmoran/app.js
AngularJS - Charting with Flot
var App = angular.module('App', []);
http://blog.anorgan.com/2015/01/15/using-google-analytics-api-with-php/
@zspine
zspine / .htaccess
Last active July 6, 2019 02:09
htaccess cheatsheet
#Hide directories and files
Options -Indexes
#Set Enviroment Varaibles
SetEnv APPLICATION_ENV "development"
# Enable the rewrite engine
RewriteEngine On
# redirect non www to www
@zspine
zspine / CallerPermission.php
Created August 30, 2015 16:19
BeatSwitch lock doctrine example
<?php
//src/library/App/Entity/CallerPermission.php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="lock_caller_permission")
*/
@zspine
zspine / world-countries
Last active October 15, 2022 02:29
World Countries - iso2, iso3, nationality, code and phone prefix
{
"AF": {
"name": "Afghanistan",
"iso2": "AF",
"iso3": "AFG",
"nationality": "Afghan",
"code": "004",
"prefix": "93"
},
"AL": {
@import "https://fonts.googleapis.com/css?family=Lato:400,300,400italic,700,700italic";
@import "https://fonts.googleapis.com/css?family=Roboto+Slab:700,400";
#header .aui-header
{
background-color: #343131;
border-bottom: 1px solid #222222;
}
#title-text a
{