Skip to content

Instantly share code, notes, and snippets.

@oodavid
oodavid / README.md
Last active March 11, 2025 21:41 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@highruned
highruned / .gitignore
Created February 29, 2012 21:52
.gitignore for LemonStand (keeping LS version controlled)
# Ignore metadata
.DS_Store
*.svn*
Thumbs.db
# Ignore /logs directory contents
/logs/*
!/logs/.htaccess
# Ignore /temp directory contents
@BronsonQuick
BronsonQuick / add_anchor_to_tinymce.php
Created March 4, 2012 07:03
Add the anchor button back to the TinyMCE editor in WordPress
<?php /*
* Add the anchor link button back to the TinyMCE Editor in WordPress
*/
function sennza_mce_buttons( $buttons ){
array_push( $buttons, "anchor" );
return $buttons;
}
add_filter( 'mce_buttons', 'sennza_mce_buttons' ); ?>
@GreatPotato
GreatPotato / gist:1978941
Created March 5, 2012 15:52
Cloud SSL Infinite Redirection
<?php
/**
* Cloud load balancer sets these for us so we know we're secure,
* preventing LemonStand from performing a redirect loop.
**/
if( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' )
{
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = 443;
}
@GreatPotato
GreatPotato / List unique attributes in category
Created May 31, 2012 16:06
Gets a list of attributes that are unique to the products in a given category
public static function list_unique_values_in_category($name, $category = NULL)
{
$category = (int) $category;
$values = Db_DbHelper::scalarArray('
SELECT DISTINCT value, t4.name
FROM shop_product_properties t1
LEFT JOIN shop_products_categories t3
ON t1.product_id = t3.shop_product_id
LEFT JOIN shop_categories t4
@jhuttner
jhuttner / git-dropbox.py
Created June 5, 2012 22:49
Easily create Dropbox remotes for your Git repositories.
#!/usr/bin/env python
import getpass
import os
import subprocess
import sys
###############################################################################
#
@nfreear
nfreear / .gitconfig--.npmrc
Last active May 1, 2020 05:27
Per-user ~/.gitconfig and per-REPO/.git/config on OU servers (hence smart HTTPS protocol) — plus .npmrc
# See: http://draconianoverlord.com/2010/03/04/git-config.html
# See: https://github.com/rtomayko/git-sh
# See: https://gist.github.com/502434
# REPO/.git/config
[remote "origin"]
# Generic by default.
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://[email protected]/IET-OU/pd-open-ac-uk.git
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 19, 2025 17:31 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@EHLOVader
EHLOVader / Vuln Disclosure.md
Last active October 7, 2023 17:36
Lemonstand vulnerability report: Customer session injection/hijacking

Security Vulnerability Disclosure Report

Session injection/hijacking LemonStand ecommerce platform

Originally reported by Joseph Richardson @EHLOVader on 2011-11-30 disclosure policy (RFv2.0)

WHAT

A session injection/hijacking vulnerability through cookie manipulation

AFFECTED SYSTEMS

Lemonstand specific

@EHLOVader
EHLOVader / Vuln Disclosure.md
Last active October 7, 2023 17:36
Lemonstand vulnerability report: NULL byte poisoning

Security Vulnerability Disclosure Report

Null Byte Poisoning within LemonStand ecommerce platform

Originally reported by Joseph Richardson @EHLOVader on 2011-11-07 disclosure policy (RFv2.0)

WHAT

A NULL byte poisoning in URL for both CSS and JS combination script

AFFECTED SYSTEMS

PHP < 5.3.4