Skip to content

Instantly share code, notes, and snippets.

View jeffreyroberts's full-sized avatar

Jeffrey L. Roberts jeffreyroberts

  • PHP DevOps
  • Miami, Florida
View GitHub Profile
┌─[✗]─[jlroberts@Jeffreys-Mac-Pro-3]─[~/Projects/Shred/Laravel]
└──╼ composer require guzzle/guzzle
Using version ^3.9 for guzzle/guzzle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install guzzle/guzzle v3.9.3
@jeffreyroberts
jeffreyroberts / scraper.py
Created November 11, 2018 19:32
WallPaper Scraper
from requests import get
from requests.exceptions import RequestException
from contextlib import closing
from bs4 import BeautifulSoup
from urllib.request import urlopen
import urllib.request
import ssl
def simple_get(url):
"""
@jeffreyroberts
jeffreyroberts / samples.php
Created December 9, 2017 12:39
Gist for Mohd
public function receive()
{
// https://developer.authorize.net/api/reference/features/webhooks.html#Event_Types_and_Payloads
}
public function createWebHook()
{
$omh_webhook_api_endpoint = 'https://{yourserver.com}/webhooks/receive';
$json = '
@jeffreyroberts
jeffreyroberts / bootstrap.php
Last active August 29, 2015 14:07
PHP Vars not being passed from bootstrap to view
<?php
/**
* Created by PhpStorm.
* User: jlroberts
* Date: 10/18/14
* Time: 12:42 PM
*/
define('JLR_ROOT', '/vagrant/web');
$siteName = "Jeff's Site";
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<Placemark>
<name>2014-03-05T09:56:58.630Z</name>
<Point><coordinates>169.8222,-14.7347,0</coordinates></Point>
</Placemark>
<Placemark>
<name>2014-03-02T20:11:22.640Z</name>
<Point><coordinates>127.3354,27.4052,0</coordinates></Point>
@jeffreyroberts
jeffreyroberts / README.md
Created February 27, 2014 22:49
git gist plugin example readme file for including as a gist module in a git repo

This is an example readme file to include as a 'gist module' in a git repository

@jeffreyroberts
jeffreyroberts / git_push_multiple.sh
Created January 16, 2014 11:12
Push to multiple repos with a single command
[ /jlr/sites/legophp.com/framework ]
[ jlroberts@iMac ] $ git remote set-url --add --push origin ssh://git@bitbucket.org/jeffreylroberts/legophp-com-framework.git
[ /jlr/sites/legophp.com/framework ]
[ jlroberts@iMac ] $ git remote set-url --add --push origin git@github.com:LegoPHP/LegoPHP.git
[ /jlr/sites/legophp.com/framework ]
[ jlroberts@iMac ] $ git remote -v
github git@github.com:LegoPHP/LegoPHP.git (fetch)
github git@github.com:LegoPHP/LegoPHP.git (push)
origin ssh://git@bitbucket.org/jeffreylroberts/legophp-com-framework.git (fetch)
origin ssh://git@bitbucket.org/jeffreylroberts/legophp-com-framework.git (push)
'Twas the night before Christmas, when all through the racks
Not a server was alerting, not even Compaqs.
The backups were written to tapes with care
In hopes that later the data would be there.
The machines were nestled all snug in their sleds
Whilst visions of vengeance danced in their heads;
And oncall in his three-wolf and I in my rack.
Had just settled down for some syn and some ack.
#!/usr/bin/env bash
# repository
cd /tmp
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# system update
yum -y update
yum -y groupinstall "Development Tools"
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick
#get root access
$su -
$ cd /tmp
#Remove old Ruby
$ yum remove ruby
# Install dependencies
$ yum groupinstall "Development Tools"
$ yum install zlib zlib-devel