Skip to content

Instantly share code, notes, and snippets.

public function getMobileDeviceType()
{
//get the detector
$detect = new \Detection\MobileDetect();
$type = false;
if ($detect->isMobile()) {
$type = "phone";
if ($detect->isTablet()) {
$type = "tablet";
public function getMobileDeviceType()
{
//get the detector
$detect = new \Detection\MobileDetect();
$type = false;
if ($detect->isMobile()) {
$type = "phone";
if ($detect->isTablet()) {
$type = "tablet";
<?php
namespace Pledgevine\Db;
use Zend\Db\Sql\Select;
use Zend\Db\TableGateway\AbstractTableGateway;
//works exactly like a table gateway except it wont throw exceptions if you havent specified a table
//notice the lines are just commented
//
<?php
namespace Pledgevine\Db;
use Zend\Db\Sql\Select;
use Zend\Db\TableGateway\AbstractTableGateway;
//works exactly like a table gateway except it wont throw exceptions if you havent specified a table
//notice the lines are just commented
//
$client = $this->getServiceLocator()->get('PaypalAdaptiveHttpClient');
$client->setUri($this->getConfig()['url'] . '/' . $name);
$client->setParameterPost($queryParams);
$httpResponse = $client->send();
return json_decode($httpResponse->getBody());
ansible-playbook -i ansible/production.hosts -u deploy ansible/deploy.yml --limit staging
ansible-playbook -i ansible/production.hosts -u deploy ansible/deploy.yml --limit production
[nlundsten@localhost ~]$ uname -r
3.17.8-300.fc21.x86_64
[nlundsten@localhost ~]$ sudo yum install kmod-nvidia-3.17.8-300.fc21.x86_64-343.36-1.fc21.2
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package kmod-nvidia-3.17.8-300.fc21.x86_64.x86_64 1:343.36-1.fc21.2 will be installed
--> Processing Dependency: nvidia-kmod-common >= 1:343.36 for package: 1:kmod-nvidia-3.17.8-300.fc21.x86_64-343.36-1.fc21.2.x86_64
--> Running transaction check
---> Package xorg-x11-drv-nvidia.x86_64 1:346.35-1.fc21 will be installed
[nlundsten@localhost ~]$ yum clean all && sudo yum install kmod-nvidia
Loaded plugins: langpacks
Cleaning repos: fedora google-chrome google-talkplugin mysql56-community rpmfusion-free rpmfusion-free-updates rpmfusion-nonfree rpmfusion-nonfree-updates updates
Cleaning up everything
[sudo] password for nlundsten:
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package kmod-nvidia.x86_64 1:346.35-1.fc21 will be installed
--> Processing Dependency: kmod-nvidia-3.18.2-200.fc21.x86_64 >= 1:346.35-1.fc21 for package: 1:kmod-nvidia-346.35-1.fc21.x86_64
Section "Device"
Identifier "nvidia"
Driver "nvidia"
Option "NoLogo" "true"
Option "DPI" "96 x 96"
# Specify Nvidia PCI device
BusID "PCI:1:0:0"
# Make sure X starts also when no outputs are connected to the Nvidia chip
Option "AllowEmptyInitialConfiguration"
EndSection
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1dHgWQCfPmAMMPDPeHr4RcvSpdUaAwyC0Szl6n73fDF7KZEk3cPlp6MSmrMEW4kti81zBSuWayloqkadadkRrXa02P6UAJKfpQtQJoCpDtWgroDzBQ8G6VjouRbqiLz58hUp0K1XbxrxEEIJX46HhlhkkQMBa7YLeg0roiYPEpcsLWrLPTe8xAFLU+6mh0cwFP0/BjUFiAUj2Issa6ZqodkBhLbCgtDmNCpKBulW7/WIIZJ1jkGez60Y2qEp0xhWVpfjQM7RAXixPBQvJ0zIKuB4CHR9z13hdBAlP8UT6bjo6+9asW6QOcskPcpR9smwxoi6Ok4KXyoSM73BRiZrF