Skip to content

Instantly share code, notes, and snippets.

View michaelfox's full-sized avatar
🦊

Michael Fox michaelfox

🦊
  • Kirschbaum Development Group
View GitHub Profile
@michaelfox
michaelfox / quix.txt
Created June 20, 2011 20:57
Quix Commands
>
> Author: Michael Fox
> Website: http://www.michaelfox.name
>
> Quix: http://quixapp.com
>
@Quixearches Quick Searches
acronym javascript:q%20=%20""%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt("You%20didn't%20select%20any%20text.%20%20Enter%20a%20search%20phrase:",%20"");%20if%20(q!=null)%20location="http://www.acronymfinder.com/af-query.asp?Find=find&string=exact&Acronym="%20+%20escape(q);%20void%200 Acronym Search
@michaelfox
michaelfox / gleebox.conf.json
Created September 1, 2011 22:09
My GleeBox Settings for Google Chrome (http://thegleebox.com)
{
"searchEngine": "http://www.google.com/search?q=",
"commandEngine": "quix",
"quixUrl": "https://dl.dropbox.com/s/jpc1gu600xunbs5/quix.txt",
"searchBookmarks": true,
"scrollingSpeed": "500",
"outsideScrolling": false,
"shortcutKey": "71",
"upScrollingKey": "87",
"downScrollingKey": "83",
@michaelfox
michaelfox / README.md
Created September 9, 2011 16:06
Notational Velocity (nvAlt) Custom Stylesheet and Markup HTML

Usage

Copy these files to your ~/Library/Application Support/Notational Velocity/ folder

@michaelfox
michaelfox / textmate_update_system_bundles.php
Created September 19, 2011 15:14
TextMate Update System Bundles (old)
#!/usr/bin/env php
<?php
$system_support_dir = '/Library/Application Support/TextMate';
$system_bundles_dir = $system_support_dir . "/Bundles";
$official_bundles = array(
"ActionScript" => "https://github.com/textmate/actionscript.tmbundle",
"Apache" => "https://github.com/textmate/apache.tmbundle",
"AppleScript" => "https://github.com/textmate/applescript.tmbundle",
@michaelfox
michaelfox / vimrc
Created January 6, 2012 19:35
Basic / Simple vimrc config file
set nocompatible
set encoding=utf-8
set hidden
filetype plugin indent on
syntax on
set synmaxcol=2048 " Don't syntax highlight super-long lines (for performance)
set autoindent " automatically indent lines and try to do it intelligently
set smartindent
set backspace=indent,eol,start " backspace behaves 'normally'
@michaelfox
michaelfox / email-regex.md
Created June 14, 2012 20:49
HTML5 Email Regex Pattern

See html5.org/r/6884

/^[a-zA-Z0-9.!#$%&'*+-/=?\^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
@michaelfox
michaelfox / brettquix.txt
Created June 28, 2012 13:43 — forked from ttscoff/brettquix.txt
Brett's Quix File
@Brett's searches
@Brett's custom searches
go https://duckduckgo.com/?q=%21%20%s Open first result (DuckDuckGo)
b https://duckduckgo.com/?q=%21%s Bang search (DuckDuckGo)
grep https://www.cueup.com/?q=%s&fq=1 Greplin
ss https://duckduckgo.com/site:%d%20%s Current site (DuckDuckGo)
bt https://duckduckgo.com/site:brettterpstra.com%20%s BrettTerpstra.com (DuckDuckGo)
gh http://github.com/search?q=%s&type=Everything&repo=&langOverride=&start_value=1 Search GitHub (everything)
hints http://hints.macworld.com/search.php?query=%s&keyType=all&datestart=&dateend=&topic=0&type=stories&results=50&mode=search Search Mac OS X Hints
mu http://www.macupdate.com/find/mac/%s Search MacUpdate (Software)
@michaelfox
michaelfox / .htaccess
Created November 8, 2012 21:46
Force WWW
<IfModule mod_rewrite.c>
# Force www
RewriteEngine on
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
RewriteRule ^ http(?%1s)://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
@michaelfox
michaelfox / dev-vhost.conf
Created February 12, 2013 16:41
Basic apache vhost template for use on local development environments.
# Site: sitename.local
<VirtualHost *:80>
ServerName sitename.local
ServerAlias *.sitename.local
DirectoryIndex index.php index.html
DocumentRoot "/www/sitename/web"
@michaelfox
michaelfox / MY_Model-sort_literal.php
Created February 22, 2013 21:20
Function for MY_Model that allows you to do FIND_IN_SET() Ordering via the CodeIgniter Active Record Class.
<?php
/**
* http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_find-in-set
*
* @param field
* @param first_value, second_value, ...
*/
public function sort_literal() {
$args = func_get_args();