Skip to content

Instantly share code, notes, and snippets.

View cherrypj's full-sized avatar

Michael Hessling cherrypj

View GitHub Profile
@cherrypj
cherrypj / dabblet.css
Created January 8, 2012 13:56 — forked from chriscoyier/dabblet.css
Based on email I got from andrea ricci
/* Based on email I got from andrea ricci */
a[href^="mailto:"]:before { content: "\2709"; }
.phone:before { content: "\2706"; }
.important:before { content: "\27BD"; }
blockquote:before { content: "\275D"; }
blockquote:after { content: "\275E"; }
.alert:before { content: "\26A0"; }
:before, :after {
@cherrypj
cherrypj / mtwf.markdown
Created December 5, 2011 02:48
What should you write about?

Something you can teach others! Here are some ideas:

  • Why do the <br> and <hr> elements (or any element) exist?
  • How to create a slideshow with the least amount of code?
  • What is the DOM? Why does it exist?
  • Check how browsers implement a specific property and compare it to the spec.
  • How a popular website implements their homepage (with suggestions for improvement)
  • How you would fix a popular website's faults (long load-time, invalid JS, etc...)
  • Take a popular demo and make it something else (or use it practically).
  • Make a summary of popular ideas around the web lately
@cherrypj
cherrypj / vi-vim_cheatsheet.markdown
Created September 17, 2011 19:21
Commands for using/learning VI/VIM

##Cursor movement

  • h - move left
  • j - move down
  • k - move up
  • l - move right
  • w - jump by start of words (punctuation considered words)
  • W - jump by words (spaces separate words)
  • e - jump to end of words (punctuation considered words)
  • E - jump to end of words (no punctuation)
  • b - jump backward by words (punctuation considered words)
@cherrypj
cherrypj / getfit.markdown
Created September 15, 2011 21:53
Leslie Camacho's Killer Exercises
@cherrypj
cherrypj / eecms_config.php
Created August 30, 2011 16:59
ExpressionEngine Master config.php (from http://pastie.org/private/njwqsvl8pi6trdrrawadkw)
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| ExpressionEngine Config Items
|--------------------------------------------------------------------------
|
| The following items are for use with ExpressionEngine. The rest of
| the config items are for use with CodeIgniter, some of which are not
| observed by ExpressionEngine, e.g. 'permitted_uri_chars'
@cherrypj
cherrypj / eecms_databasephp
Created August 30, 2011 16:57
ExpressionEngine Master (single) database.php (from http://pastie.org/private/tkthw6jle6yaiqr0rgdjma)
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$active_group = 'expressionengine';
$active_record = TRUE;
$db['expressionengine']['hostname'] = "localhost"; // Change the Database Location if required
$db['expressionengine']['username'] = "dbuser"; // Change the Database User Name
$db['expressionengine']['password'] = "dbpass"; // Change the Database Pasword
$db['expressionengine']['database'] = "db_name"; // Change the Database Name
$db['expressionengine']['dbdriver'] = "mysql";
@cherrypj
cherrypj / jQuery XML
Created March 19, 2011 19:51
Using jQuery to grab a same-domain XML feed and insert into HTML
<script src="jquery.js"></script>
<script>
$(function(){
// Grab an XML feed
var end=0;
function get_RSS(feedurl,feeddiv){
$.ajax({
type: "GET", url: feedurl, dataType: "xml", success: function(xml){
$(xml).find("item").each(function(i){
var title = $(this).find("title").text();