Creating a new PHPExcel Object.
$this->PHPExcel = new PHPExcel();
Creating a new sheet:
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| OneAuth IoC | |
|-------------------------------------------------------------------------- | |
| | |
| Register Auth adapter as IoC, allow it to be replaced by any Authentication | |
| bundle that doesn't use Laravel\Auth\Drivers | |
*/ |
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
/* | |
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
*/ | |
(function() { |
CREATE TABLE `makers` ( | |
`id` int(10) unsigned NOT NULL, | |
`name` varchar(255) NOT NULL, | |
`description` varchar(255) NOT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- |
Sentry is an amazing auth system. But I really need a feature: multiple user types in the same app. And I cannot separate those in groups, because they have different table columns. After 2 days burning my head, I think I found a good solution. The magic is duplicate SentryServiceProvider with new different settings.
Lets suppose we have a fresh Sentry install with default User ambient. Now we want another ambient called Admin, with new model and different settings. How to do:
ubuntu
12.04
14.04
Reference http://stackoverflow.com/a/18490935/2037928
Login as root
Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
#https://gorails.com/setup/ubuntu/14.04 | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties | |
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc | |
rvm install 2.1.2 | |
rvm use 2.1.2 --default |