Skip to content

Instantly share code, notes, and snippets.

<?php get_header();
/*
Template Name: Calculate Page
*/
if(isset($_POST['submit'])){
$amount = $_POST['amount'];
$price = $_POST['price'];
$total = $amount * $price;
@trevorgreenleaf
trevorgreenleaf / gist:3463efa8b38dc6f727d45f2896816856
Created April 27, 2016 03:19
Colors with Decimals and Hex as an array
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<?php
function toColor($n){
Inspiration Websites
http://lovelypackage.com/
http://batt-mobile.tumblr.com/
http://designyoutrust.com/
http://www.mr-cup.com/work.html
http://www.fromupnorth.com/
http://zurb.com/patterntap
Free Image Sites
https://unsplash.com/
#!/bin/bash
# Installation script for a Wordpress 3.0 website on Ubuntu 10.04
#
# Josh Kersey
# Created: May 15, 2012
# Last Update: June 13, 2012
# get setup parameters
echo "apache vhost name (one word):"
See who logged in last:
lastlog
View all of the log files on the server:
ls -l /var/log
<?php
ini_set('display_errors', 'On');
require 'vendor/autoload.php';
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\CssSelector\CssSelectorConverter;
$client = new GuzzleHttp\Client();
$url = 'https://us.fotolia.com/search?k=cats&filters%5Bcontent_type%3Aphoto%5D=1&search-submit=Search&limit=5';
$data = $client->get($url);
@trevorgreenleaf
trevorgreenleaf / Laravel Homestead add another site
Last active March 19, 2016 03:34
Laravel / Homestead add more sites
Trevor this is super easy. Yes I am talkign to you, I mean me. Wait you or me?
in terminal-> homestead edit
add the site
- map: cat.dev
to: /home/vagrant/Code/cat/public
save it. Then open up the etc/hosts file on your mac not on the server.
Edit the Ip to point to your url
192.168.10.10 cat.dev
point domain name servers to digital ocean
create domain in digital ocean
add site in forge
enter domain name and for the folder make it the project name
next add your github repo and select the branch
@trevorgreenleaf
trevorgreenleaf / Laravel Packages
Created October 20, 2015 23:11
A bunch of packages I use on projects
Comments:
https://github.com/RoumenDamianoff/laravel-disqus
Scape:
https://github.com/guzzle/guzzle
https://github.com/symfony/dom-crawler
https://github.com/symfony/css-selector
Newsletters:
@trevorgreenleaf
trevorgreenleaf / scripts.js
Last active September 1, 2015 02:32
jQuery: Start Project
(function($) {
// Lets Begin :)
})(jQuery);