Skip to content

Instantly share code, notes, and snippets.

View alfrekjv's full-sized avatar

Alfredo Juárez alfrekjv

View GitHub Profile
@alfrekjv
alfrekjv / composer.json
Last active December 14, 2015 18:39
I'm getting this error while doing composer install
{
"require": {
"guzzle/guzzle": "~3.1",
"stripe/stripe-php": "1.*",
"swiftmailer/swiftmailer": ">=4.2.0,<4.3-dev",
"ppi/framework": "2.0"
},
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
@alfrekjv
alfrekjv / ssh.sh
Created December 10, 2014 00:00
Generate SSL Cert Files
#!/bin/bash
mkdir /etc/httpd/ssl
cd /etc/httpd/ssl
echo -e "Enter your virtual host FQDN: \nThis will generate the default name for Apache SSL Certificate and Key!"
read cert
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out $cert.key
chmod 600 $cert.key
openssl req -new -key $cert.key -out $cert.csr
@alfrekjv
alfrekjv / gist:5439415
Created April 22, 2013 23:17
Redis.php
<?php
/**
* @author Paul Dragoonis <dragoonis@php.net>
* @license http://opensource.org/licenses/mit-license.php MIT
* @package Cache
* @link http://www.ppiframework.com/docs/cache.html
* @link https://github.com/nicolasff/phpredis
*/
namespace PPI\Cache;
// Object calisthenics...
// actual version
public function checkExistsAction()
{
$email = $this->post('email');
$customerID = 1;
$accountHelper = $this->getService('user.account.helper');
Foursquare_Index:
pattern: /foursquare/
defaults: { _controller: "FourSquareModule:Index:index" }
var map = null,
latitude = null,
longitude = null,
infoWindow = null;
function initialize() {
var latlng = null;
var myOptions = {
mapTypeId:google.maps.MapTypeId.ROADMAP
var map = null,
latitude = null,
longitude = null,
infoWindow = null;
function useDefaultLocation() {
latitude = 31.8391;
longitude = -106.5631;
}
<?php
namespace FourSquareModule\Controller;
use FourSquareModule\Controller\Shared as SharedController;
class Index extends SharedController
{
public function indexAction()
{
@alfrekjv
alfrekjv / Index.js
Last active December 10, 2015 22:58
var map = null,
latitude = null,
longitude = null,
infoWindow = null;
function initialize() {
var latlng = null;
var myOptions = {
mapTypeId:google.maps.MapTypeId.ROADMAP
<?php
namespace FourSquareModule\Classes;
class ApiHandler
{
protected $secret;
protected $key;
protected $cache;