Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Hessling cherrypj

View GitHub Profile
@cherrypj
cherrypj / dabblet.css
Created Jan 8, 2012 — forked from chriscoyier/dabblet.css
Based on email I got from andrea ricci
View dabblet.css
/* 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 Dec 5, 2011
What should you write about?
View mtwf.markdown

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 Sep 17, 2011
Commands for using/learning VI/VIM
View vi-vim_cheatsheet.markdown

##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 Sep 15, 2011
Leslie Camacho's Killer Exercises
View getfit.markdown
View eecms_config.php
<?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 Aug 30, 2011
ExpressionEngine Master (single) database.php (from http://pastie.org/private/tkthw6jle6yaiqr0rgdjma)
View eecms_databasephp
<?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 Mar 19, 2011
Using jQuery to grab a same-domain XML feed and insert into HTML
View jQuery XML
<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();