Skip to content

Instantly share code, notes, and snippets.

View skoskie's full-sized avatar

Shelton Koskie skoskie

View GitHub Profile
@croxton
croxton / gist:4073583
Last active March 29, 2021 12:34
Install xdebug 2.2.0 for AMPPS on OSX
Grab the 'PHP Remote Debugging Client' (the pre-complied xdebug binary for OSX) from here:
http://code.activestate.com/komodo/remotedebugging/
Unzip it, find the folder that corresponds to the version of PHP you want to install it for and copy the xdebug.so file from there into your php extensions folder in the relevant PHP version directory. E.g. for PHP 5.4:
/Applications/AMPSS/php-5.4/lib/extensions/ext/
Now open PHP.ini in a text editor:
/Applications/AMPSS/php-5.4/etc/php.ini
@kevinSuttle
kevinSuttle / .htaccess
Last active January 27, 2024 14:07
.htaccess for Wordpress
# Use PHP5 as default
AddHandler application/x-httpd-php5 .php
# 5G BLACKLIST/FIREWALL (2013)
# @ http://perishablepress.com/5g-blacklist-2013/
# 5G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
@wishfoundry
wishfoundry / gist:7036457
Last active April 1, 2022 05:18
Set OSX default text editor to sublime text 3 instead of TextEdit
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'
@tierra
tierra / gist:7095615
Created October 22, 2013 05:26
WordPress constants that should have never been constants
// Constants causing serious damage (application *states* are never constant):
DOING_AJAX
DOING_AUTOSAVE
DOING_CRON
IFRAME_REQUEST
IS_PROFILE_PAGE
WP_ADMIN
WP_BLOG_ADMIN
WP_IMPORTING
@damonjones
damonjones / UpcEan.php
Created November 20, 2013 17:10
UPC/EAN Validator
<?php
namespace Insig\UtilBundle\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
/**
* Metadata for the UpcEanValidator.
*
* @Annotation
@imlucas
imlucas / postman_scripts.js
Created February 3, 2014 13:18
notes on postman scripting
// Notes on how to extend [postman](http://www.getpostman.com/) to support
// sharing small util scripts, like fabric tasks, along with a collection
// so we have repeatables/easy access for non-tech folks.
//
// How to extend schema? Build on collection or a new ground up like
// environments? Struct looks something like:
var scripts = [
{
"name": "Continuous Health Check",
"description": "Runs health-check every 60 seconds and logs result",
@petemcw
petemcw / brew-instructions.sh
Last active July 14, 2025 23:22
Setup dnsmasq on Mac OS X
# Install `dnsmasq` and configure for *.test domains
$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf
# Reload configuration and clear cache
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
$ dscacheutil -flushcache
@mkay
mkay / update-modx.sh
Created March 8, 2014 22:57
MODX CLI updater
#!/bin/bash
########################################################
#
# MODX (modx.com) CLI updater
# Kreuder 20140308 [email protected]
#
########################################################
#
# Description: perform a MODX Basic Upgrade via CLI.
#
@sudar
sudar / package-list.txt
Created March 9, 2014 03:13
List of packages that are installed by default in DigitalOcean LAMP image. As of 09-March-2014
$ dpkg --get-selections | grep -v deinstall
acpid install
adduser install
anacron install
apache2-mpm-prefork install
apache2-utils install
apache2.2-bin install
apache2.2-common install
apt install
ProcessWire Webpage Workflow
1. Setup v-hosts, database and install processwire (usually fixate's boilerplate generator)
a. the generator already does bower install.
2. Determine project structure and install all required modules.
3. Setup all required fields and templates in PW admin.
4. Program the logic of the web page. All php that handles dynamic data. Site specific and contact controller.
5. Use styleguide to program initial css.
6. Program site css that was not done in styleguide.
7. finalize by adding javascripts that are used.