Skip to content

Instantly share code, notes, and snippets.

<?php
define( 'REDDIT_API_USER_HASH', 'reddit_api' );
class Reddit_Api_Bot{
//@mixed Set after successful login, otherwise false
public $user_hash;
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.reddit.com/r/philadelphia/.json");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
<?php
class Jemoon_Htmlminify_Model_Observer {
public function Htmlminify($observer) {
// Fetches the current event
$event = $observer->getEvent();
$controller = $event->getControllerAction();
$allHtml = $controller->getResponse()->getBody();
@ryaan-anthony
ryaan-anthony / elasticsearch-healthcheck.php
Created May 21, 2015 14:21
Simple PHP healthcheck for elasticsearch (add to crontab)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "127.0.0.1");
curl_setopt($ch, CURLOPT_PORT, "9200");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""

1. Download Magento 2

    git clone https://github.com/magento/magento2.git
Navigate to magento2 directory...
    cd magento2
@ryaan-anthony
ryaan-anthony / cache.php
Last active August 29, 2015 14:19 — forked from bjarneo/cache.php
<?php
/**
* Clear cache cli style
*
*
* @category Mage
* @package Mage_Shell
* @copyright Copyright (c) 2015 Bjarne Oeverli (http://bjarneo.codes)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/