Skip to content

Instantly share code, notes, and snippets.

View program247365's full-sized avatar
💭
YOLO 💯

Kevin Ridgway program247365

💭
YOLO 💯
View GitHub Profile
/* =IE7 & IE8 hax
---------------------------------------------- */
#heroku-header {
min-width/*\**/: 991px\9;
}
/* ------------------------------------------- */
@program247365
program247365 / findSSN.php
Created December 3, 2010 19:54
Simple regular expression to find SSN in a string.
<?php
$string = '123-23-1234';
$pattern = '^\d{3}-\d{2}-\d{4}^';
preg_match($pattern, $string, $matches);
print_r($matches);
?>
// Provides a device_scale class on iOS devices for scaling user
// interface elements relative to the current zoom factor.
//
// http://37signals.com/svn/posts/2407-device-scale-user-interface-elements-in-ios-mobile-safari
// Copyright (c) 2010 37signals.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// <summary>
/// Folder Name (For Preparing Folders to be Moved to SharePoint)
/// You cannot use the following characters anywhere in a folder name or a server name: ~ # % & * { } \ : < > ? / | "
/// Cannot be longer than 128 characters
/// You cannot use the period character consecutively in the middle of a folder name
/// You cannot use the period character at the end of a folder name
/// You cannot start a folder name with the period character
/// </summary>
/// <param name="folderName">vomit</param>
/// <returns>vomit</returns>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Michael Sheets</string>
<key>name</key>
<string>Twilight</string>
<key>settings</key>
<array>
@program247365
program247365 / iPadUserAgent.txt
Created April 3, 2010 22:28
iPad User Agent String
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10
# first you'll want to create a gist then `git clone` the private url
# second you'll want to run this script in the gist's directory
loop do
`git commit -a -m save && git push origin master`
sleep 60 * 4
end
defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1
# .gitignore for .NET projects
# Thanks to Derick Bailey
# http://www.lostechies.com/blogs/derickbailey/archive/2009/05/18/a-net-c-developer-s-gitignore-file.aspx
# Additional Thanks to
# - Alexey Abramov
# Standard VS.NET and ReSharper Foo
obj
bin
*.csproj.user
@program247365
program247365 / .bashrc
Created September 15, 2009 02:11 — forked from justintv/.bashrc
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"