Skip to content

Instantly share code, notes, and snippets.

View michaelcullum's full-sized avatar

Michael Cullum michaelcullum

View GitHub Profile
Base:
{% block javascript %}
<script src="{{ asset('js/script.js') }}" type="text/javascript" />
{% endblock %}
Page's Template extending base:
{% block javascript %}
This application requires an update to Adobe AIR that is not available for your system. Please view the system requirements for Adobe AIR and update your system accordingly.
@michaelcullum
michaelcullum / gist:4133243
Created November 22, 2012 23:03
Check for wrappers and ssl stuff
<?php
$w = stream_get_wrappers();
echo 'openssl: ', extension_loaded ('openssl') ? 'yes':'no', "\n";
echo 'http wrapper: ', in_array('http', $w) ? 'yes':'no', "\n";
echo 'https wrapper: ', in_array('https', $w) ? 'yes':'no', "\n";
echo 'wrappers: ', var_dump($w);
@michaelcullum
michaelcullum / symfony_cache.sh
Created November 22, 2012 23:05
Symfony Cache Update
php app/console cache:clear
php app/console cache:warmup
@michaelcullum
michaelcullum / gist:4133251
Last active October 13, 2015 03:37
Composer Update Deps Script
echo "Git Status:"
git status -sb
echo ""
echo "composer.phar Update:"
php composer.phar self-update
# Comment this line if no phar in path
composer self-update
echo ""
echo "Deps update:"
# If no composer in your path then comment this line and uncomment Ln 12
@michaelcullum
michaelcullum / gist:5276433
Last active December 15, 2015 14:39
#symfony-devs license log
<ocramius> \o/ https://github.com/symfony/symfony/pull/7527
<jrobeson> well good freakin job ocramius
<jrobeson> ocramius: if i had the choice.. i'd be opposed to symfony having a non MIT licensed dependency
<jrobeson> as it makes it incompatible with any gpl 2 version
<jrobeson> err any gpl2 software it is integrated with
<jrobeson> so it'd a no go for drupal i think..
<igorw> is apache2 problematic? it's annoying that it's different but I don't know the actual details of how it interops
<jrobeson> oh sorry they are 2.0 and higher
<igorw> and drupal is gpl which is problematic
<jrobeson> apache 2.0 is only compatible with gpl 3.0 .. not 2
<!DOCTYPE html>
<html>
<head>
<title> Introduction to Object-Oriented Programming </title>
<link type='text/css' rel='stylesheet' href='style.css'/>
</head>
<body>
<p>
<?php
// The code below creates the class
@michaelcullum
michaelcullum / gist:6126565
Last active December 20, 2015 11:49
Voting Time IRC Log
<MichaelC> can you vote if you join in the middle of a voting period? You can I think?
<Crell> I don't know that we have an existing rule on that front. I'd think the membership as of when the vote is called is what matters.
<Crell> Although Typo3 changed reps mid-vote, not changed its membership, so Karsten should be able to vote on open votes right now.
<MichaelC> yeah
<MichaelC> if Abbas gets through can he vote on Beau though. ;)
<Crell> No, Beau's vote started before Abbas was a member.
<Crell> Or am I confused about who you mean... That's the OWASP guy, right?
<MichaelC> but Abbas' vote will finish before Beaus'
<Crell> But OWASP won't be a member as of when Beau's vote began.
<MichaelC> oh
@michaelcullum
michaelcullum / contact.html.twig
Created August 23, 2013 16:31
Contact Form for Silex
{% extends layout %}
{% block body %}
<div id="main">
<h2>Contact me</h2>
<p>For queries about anything on this website, or for job quotations, please contact me using the contact form below or via <a href="mailto:email@email.com">email</a>.</p>
<form action="#" method="post">
{{ form_start(form) }}
{{ form_errors(form) }}
Michael@MICHAEL-MAIN /c/wamp/ (master)
$ php -r "var_dump(version_compare('3.1.0-dev', '3.1-a1', '<'));"
bool(false)
Michael@MICHAEL-MAIN /c/wamp/ (master)
$ php -r "var_dump(version_compare('3.1.0-dev', '3.1.0-a1', '<'));"
bool(true)
Michael@MICHAEL-MAIN /c/wamp/ (master)
$ php -r "var_dump(version_compare('3.1.0', '3.1.0-a1', '<'));"