Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chrisjlee's full-sized avatar
💭
🏈

Chris J. Lee chrisjlee

💭
🏈
View GitHub Profile
@chrisjlee
chrisjlee / drupal-views-share-global-text-field
Last active April 23, 2024 04:07
share url's for facebook, twitter, pinterest with just get variables
<ul>
<li class="share-text">Share this>/li>
<li class="share-tw"><a href="http://twitter.com/share?text=[title]"><span></span></a></li>
<li class="share-fb"><a href="http://www.facebook.com/sharer.php?u=/node/[nid]&p=[title]"><span></span></a></li>
<li class="share-pinterest"><a href="http://pinterest.com/pin/create/button/?url=/node/[nid]&description=[title]"><span></span></a></li>
</ul>
@chrisjlee
chrisjlee / my.cnf
Created June 22, 2012 15:28
my.cnf file optimized for InnoDB 64bit setups
# forked from http://forge.mysql.com/tools/tool.php?id=137
[client]
#password = [your_password]
port = 3306
socket = /tmp/mysqld.sock
# *** Application-specific options follow here ***
#
@chrisjlee
chrisjlee / media-queries.scss
Last active January 6, 2024 12:36
All Media Queries breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@chrisjlee
chrisjlee / Readme.md
Last active December 19, 2023 20:48
In javascript, Convert date object to period or 12 hour notation.
@chrisjlee
chrisjlee / example.build.xml
Created July 3, 2012 18:02
example build.xml file used for phing - from, "expert php tools" by Dirk Merkel
<?xml version="1.0"?>
<project name="waferthin.com" description="Targets for maintaining and deploying the waferthin.com web site." default="deploy">
<!-- See book here: http://www.packtpub.com/expert-php-5-tools/book -->
<!-- initialize timestamp that will be used in naming of various files & directories -->
<tstamp/>
<target name="deploy" depends="get-env,create-skeleton,svn-export,stamp-config,disp-maint,backup-db,deploy-db,publish-site" description="Deploy the site to the web server and perform necessary build and upgrade tasks.">
</target>
<target name="get-env" description="get the environment for an action">
@chrisjlee
chrisjlee / querySelector.polyfill.js
Created February 12, 2014 17:39
IE document.querySelector() polyfill
if (!document.querySelectorAll) {
document.querySelectorAll = function (selectors) {
var style = document.createElement('style'), elements = [], element;
document.documentElement.firstChild.appendChild(style);
document._qsa = [];
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';
window.scrollBy(0, 0);
style.parentNode.removeChild(style);
@chrisjlee
chrisjlee / rhel-recommended-partition-sizes.txt
Last active March 4, 2023 01:18
ubuntu recommended partition sizes
@chrisjlee
chrisjlee / conditional-head-tag.html
Created June 13, 2012 03:26
conditional head tag
<!--[if IE 6]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ie6 no-js"><![endif]-->
<!--[if lt IE 7]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ie ie6 lte9 lte8 lte7 no-js"><![endif]-->
<!--[if IE 7]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ie ie7 lte9 lte8 lte7 no-js"> <![endif]-->
<!--[if IE 8]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ie ie8 lte9 lte8 no-js"><![endif]-->
<!--[if IE 9]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ie ie9 lte9 no-js"><![endif]-->
<!--[if gt IE 9]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="gtie9 ie9 no-js"><![endif]-->
<!--[if !IE]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="not-ie no-js"><![endif]-->
@chrisjlee
chrisjlee / append.settings.php
Created August 23, 2012 03:40
local.settings.php - default local drupal settings file; because i'm tired of creating them. :)
/**
* Use *.settings.php
*/
// Localhost
if (file_exists(dirname(__FILE__) . '/local.settings.php')) {
include dirname(__FILE__) . '/local.settings.php';
}
@chrisjlee
chrisjlee / app.js
Created December 19, 2013 19:37
Creating the simple static file server using node.js and express
var express = require('express'),
htmlDir = './html/'
var app = express();
//Log all requests
app.use(express.logger());
//Set content directories
app.use(express.static(__dirname + '/html'));
app.use('/js',express.static(__dirname + '/js'));