Skip to content

Instantly share code, notes, and snippets.

View beejhuff's full-sized avatar

Bryan "BJ" Hoffpauir beejhuff

View GitHub Profile
@beejhuff
beejhuff / .gitignore
Last active August 29, 2015 14:22 — forked from erfanimani/.gitignore
### MAGENTO DIRECTORIES
# Note: because of the wildcards/asterisks used, you can't do "git clean -fd ." without
# clearing everything in media and var. Also see http://stackoverflow.com/a/19442789/896657
# Ignore everything in media, except for the htaccess files
/media/*
/media/*/*
!/media/customer/.htaccess
!/media/downloadable/.htaccess
@beejhuff
beejhuff / add-magento-version.php
Last active August 29, 2015 14:26 — forked from AydinHassan/add-magento-version.php
Add a new version of Magento to a repository compatible with https://github.com/AydinHassan/magento-core-composer-installer
<?php
/**
* Script to manage to version of Magento in a git mirror
* php $argv[0] core-repository new-version-of-magento
*
* It will look for Mage.php in new-version-of-magento and parse the version
* and edition from it.
*
* It will copy the code, remove the old files, create new branches if necessary
@beejhuff
beejhuff / gist:5a75cbae03195417f060
Created March 13, 2016 00:02 — forked from mhawksey/gist:3436048
Google Spreadsheet/Apps Script custom function for getting Klout scores for Twitter screen name(s). You can File > Make a copy of this template https://docs.google.com/spreadsheet/ccc?key=0AqGkLMU9sHmLdDVzZWdLbElhM3NYM2VQZi1lYjZXUUE&usp=drive_web#gid=0 for working version of the code
/* Copyright 2012 Martin Hawksey (email : [email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
var Promise = require('bluebird');
var MongoDB = Promise.promisifyAll(require("mongodb"));
var MongoClient = Promise.promisifyAll(MongoDB.MongoClient);
var cheerio = require('cheerio');
var http = require('http');
var urls = [
'http://www.magentocommerce.com/certification/directory/index/?q=&country_id=AU&region_id=&region=vic&certificate_type=',
'http://www.magentocommerce.com/certification/directory/index/?q=&country_id=AU&region_id=&region=victoria&certificate_type='
];
@beejhuff
beejhuff / httpd.conf
Created April 3, 2016 21:01 — forked from tegansnyder/httpd.conf
Example of bringing Magento's .htaccess file into your Apache http.conf file.
#NameVirtualHost *:80
<VirtualHost *:80>
ServerName "www.domain.com"
ServerAlias domain.com
ErrorLog logs/error_log
TransferLog logs/access_log
LogLevel warn
ServerAdmin [email protected]
DocumentRoot /sites/magento
DirectoryIndex index.php index.html
@beejhuff
beejhuff / .vimrc
Created April 19, 2016 22:43 — forked from amacgregor/.vimrc
Personal Vimrc file
"""""""""""""""""""""""""""""""""""""
" Allan MacGregor Vimrc configuration
"""""""""""""""""""""""""""""""""""""
set nocompatible
syntax on
set nowrap
"""" START Vundle Configuration
" Disable file type for vundle
@beejhuff
beejhuff / .vimrc
Created April 19, 2016 22:44 — forked from amacgregor/.vimrc
"""""""""""""""""""""""""""""""""""""
" Allan MacGregor Vimrc configuration
"""""""""""""""""""""""""""""""""""""
set nocompatible
syntax on
set nowrap
"""" START Vundle Configuration
" Disable file type for vundle
require Record
defmodule RssParserTest do
Record.defrecordp :xmlElement, Record.extract(:xmlElement, from_lib: "xmerl/include/xmerl.hrl")
Record.defrecordp :xmlText, Record.extract(:xmlText, from_lib: "xmerl/include/xmerl.hrl")
Record.defrecordp :xmlAttribute, Record.extract(:xmlAttribute, from_lib: "xmerl/include/xmerl.hrl")
use ExUnit.Case
def sample_atom_xml do
"""
<?php
/**
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
*/
namespace Magento\Wishlist\Helper;
class Rss extends \Magento\Wishlist\Helper\Data
{
/**
@beejhuff
beejhuff / magento-nginx.conf
Created October 15, 2016 08:27 — forked from gwillem/magento-nginx.conf
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {