Skip to content

Instantly share code, notes, and snippets.

View geraldgrafik's full-sized avatar

Gerald Chen geraldgrafik

  • Mediacorp Pte Ltd
  • Singapore
View GitHub Profile
@ryansechrest
ryansechrest / php-style-guide.md
Last active March 20, 2025 17:04
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@ijy
ijy / sublime-text-3-setup.md
Last active March 7, 2025 20:44
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 20, 2025 23:00
A badass list of frontend development resources I collected over time.
@cb99999
cb99999 / php-copy-directories
Created May 2, 2013 19:37
php > copy target set of files to multiple directories
<?php
/*************************
/* copy master files to the farm
/*************************/
function full_copy( $source, $target )
{
if ( is_dir( $source ) ) {
@mkdir( $target ); $d = dir( $source );
while ( FALSE !== ( $entry = $d->read() ) ) {
if ( $entry == '.' || $entry == '..' ) { continue; }
@mardix
mardix / awesome-php.md
Created November 2, 2012 14:34 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries
@smeranda
smeranda / facebook_like-box_responsive.css
Created May 1, 2012 20:37
Flexible width layout for Facebook Like Box/Activity Stream to use in Responsive Designs
/*
Make the Facebook Like box responsive (fluid width)
https://developers.facebook.com/docs/reference/plugins/like-box/
*/
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */
#fb-root {
display: none;
}