Skip to content

Instantly share code, notes, and snippets.

View chrisjacob's full-sized avatar

Chris Jacob chrisjacob

View GitHub Profile
@chrisjacob
chrisjacob / sitemap.xml
Created February 3, 2011 16:28
cldwalker.github.com / sitemap.xml
---
layout: nil
site_pages:
- /
- /about.html
- /projects.html
- /blog.html
- /hirb/
- /has_machine_tags/
- /console_update/
#!/bin/sh
#
# Post-update hook to checkout working copy and publish it with jekyll
#
# To enable this hook, make this file executable by "chmod +x post-update".
git-update-server-info
is_bare=$(git-config --get --bool core.bare)
# TextMate dotfiles filter
# use this filter in Preferences -> Advanced -> Folder References -> File Pattern
# to show .gitignore, .gems (useful for Heroku), .bundle in your project
!(/\.(?!(htaccess|gitignore|gems|bundle))[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text
<html>
<head>
<title>Test</title>
</head>
<body>
<div id="test">
Test this
</div>
</body>
</html>
<b>wow</b>
Wish!
@chrisjacob
chrisjacob / email_validation.php
Created May 31, 2011 02:47
PHP Email Validation
<?php
const VALID_EMAIL = '/^[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2}|aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel)$/i';
function validateEmail( $email )
{
if ( !preg_match(VALID_EMAIL, $email) )
{
return false;
}
@chrisjacob
chrisjacob / gem
Created June 10, 2011 00:58 — forked from shanaver/gem
installing the mysql gem on Snow Leopard with MAMP - mileage may vary - verify the locations of your respective files first
gem install mysql -- --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
OR
bundle config build.mysql --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
Test c
and a new line
here
and here
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title>
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script>
<script type="text/javascript" charset="utf-8">
$(function () {
var extractToken = function(hash) {