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
@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;
}
@mardix
mardix / awesome-php.md
Created November 2, 2012 14:34 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries
@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; }
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 16, 2025 11:36
A badass list of frontend development resources I collected over time.
@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 {} \;
@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:
@ryansechrest
ryansechrest / php-style-guide.md
Last active November 10, 2025 08: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
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active November 11, 2025 16:41
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@luckyshot
luckyshot / db.php
Last active August 4, 2021 04:50
PHP/MySQL (PDO Database) method with named parameters
<?php
/*
PHP/MySQL (PDO) method with named parameters
---------------------------------------------
https://gist.github.com/luckyshot/9477105
Last updated: 12 Sep 17
$config = [
@derhuerst
derhuerst / intro.md
Last active November 3, 2025 16:15
Installing Git on Linux, Mac OS X and Windows