Skip to content

Instantly share code, notes, and snippets.

Jamie Hollern jamiehollern

  • Dùn Phris/Zürich
Block or report user

Report or block jamiehollern

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jamiehollern
jamiehollern / app.php
Created Jun 22, 2017 — forked from drefined/app.php
This is the simple silex app.
View app.php
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
$app = new Silex\Application();
View send_nudes.sh
#!/bin/bash
sudo apt-get update
echo '
/$$$$$$ /$$ /$$
/$$__ $$ | $$ | $$
| $$ \__/ /$$$$$$ /$$$$$$$ /$$$$$$$ /$$$$$$$ /$$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$
| $$$$$$ /$$__ $$| $$__ $$ /$$__ $$ | $$__ $$| $$ | $$ /$$__ $$ /$$__ $$ /$$_____/
\____ $$| $$$$$$$$| $$ \ $$| $$ | $$ | $$ \ $$| $$ | $$| $$ | $$| $$$$$$$$| $$$$$$
View gist:d0b50914e7f90b97d9fc496e9ee09d1f
Jamies-MBP:gdms jamiehollern$ vagrant up
Bringing machine 'gdms' up with 'virtualbox' provider...
==> gdms: Importing base box 'geerlingguy/ubuntu1604'...
==> gdms: Matching MAC address for NAT networking...
==> gdms: Checking if box 'geerlingguy/ubuntu1604' is up to date...
==> gdms: Setting the name of the VM: gdms.dev
==> gdms: Clearing any previously set network interfaces...
==> gdms: Preparing network interfaces based on configuration...
gdms: Adapter 1: nat
gdms: Adapter 2: hostonly
View gist:530f80dc092d11ebae5fa4046f27e3f1
jamiemacbook:test-cms-fork jamie.hollern$ vagrant up
Bringing machine 'test-cms' up with 'virtualbox' provider...
==> test-cms: Cloning VM...
==> test-cms: Matching MAC address for NAT networking...
==> test-cms: Setting the name of the VM: test-cms.local
==> test-cms: Clearing any previously set network interfaces...
==> test-cms: Preparing network interfaces based on configuration...
test-cms: Adapter 1: nat
test-cms: Adapter 2: hostonly
==> test-cms: Forwarding ports...
@jamiehollern
jamiehollern / drush_config_shortcut.php
Created Jul 26, 2016
Drush config shortcuts for settings.local.php
View drush_config_shortcut.php
<?php
// Config import shortcuts.
$dirs = array(
'base',
'dev',
'stage',
'prod',
);
foreach ($dirs as $dir) {
@jamiehollern
jamiehollern / iOSRegex.php
Created Jan 20, 2016
Regular expression to get the iOS version from the user agent string in PHP
View iOSRegex.php
<?php
// Sample user agent strings available at http://www.webapps-online.com/online-tools/user-agent-strings/dv/operatingsystem51849/ios.
$user_agent = 'Mozilla/5.0 (iPod touch; CPU iPhone OS 7_0_3 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B511 Safari/9537.53';
// Returns 7.0 with the above user agent string.
$version = preg_replace("/(.+)(iPhone|iPad|iPod)(.+)OS[\s|\_](\d)\_?(\d)?[\_]?(\d)?.+/i", "$4.$5", $user_agent);
You can’t perform that action at this time.