Skip to content

Instantly share code, notes, and snippets.

View dgmike's full-sized avatar

Michael dgmike

View GitHub Profile
<?php
if (!function_exists('http_build_url'))
{
define('HTTP_URL_REPLACE', 1); // Replace every part of the first URL when there's one of the second URL
define('HTTP_URL_JOIN_PATH', 2); // Join relative paths
define('HTTP_URL_JOIN_QUERY', 4); // Join query strings
define('HTTP_URL_STRIP_USER', 8); // Strip any user authentication information
define('HTTP_URL_STRIP_PASS', 16); // Strip any password authentication information
define('HTTP_URL_STRIP_AUTH', 32); // Strip any authentication information
define('HTTP_URL_STRIP_PORT', 64); // Strip explicit port numbers
@dgmike
dgmike / gist:3748700
Created September 19, 2012 09:32 — forked from davidalexander/gist:1086455
Magento Snippets

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

@19h
19h / sha512.js
Created October 1, 2012 12:31
SHA512 Javascript
var b;
if (!(b = t)) {
var w = Math,
y = {}, B = y.p = {}, aa = function () {}, C = B.A = {
extend: function (a) {
aa.prototype = this;
var c = new aa;
a && c.u(a);
c.z = this;
return c
@goodo
goodo / about.md
Created October 2, 2012 02:16 — forked from coylums/about.md
Programming Achievements: How to Level Up as a Developer
import random
notas = ['C', 'D', 'E', 'F', 'G', 'A', 'B']
while True:
nota = random.randint(0, len(notas) - 1)
if nota == (len(notas) - 1):
nota = 0
@wehrhaus
wehrhaus / Super_Sub_Constructor_Pattern
Last active August 29, 2015 14:01
Superconstructor / Subconstructor Example
// Superconstructor
function Person(name) {
this.name = name;
}
Person.prototype.sayHelloTo = function (otherName) {
console.log(this.name + ' says hello to ' + otherName);
};
Person.prototype.describe = function () {
return 'Person name ' + this.name;
};
@jdan
jdan / README.md
Last active August 29, 2015 14:01

domino

quick-n-dirty HTML markup generator

examples

var dom = require('./domino');
dom.ul.li.span.class('note')
@tomhicks
tomhicks / plink-plonk.js
Last active November 12, 2024 19:08
Listen to your web pages