Skip to content

Instantly share code, notes, and snippets.

View davidhemphill's full-sized avatar
🏠
Working from home

Hemp davidhemphill

🏠
Working from home
View GitHub Profile
@dawsontoth
dawsontoth / tweetView.js
Created February 10, 2011 04:07
Make tweets and links clickable in Titanium Mobile! Here I make a tweet look just like it does on Twitter, and interact the same too.
/**
* Define our parser class. It takes in some text, and then you can call "linkifyURLs", or one of the other methods,
* and then call "getHTML" to get the fully parsed text back as HTML!
* @param text that you want parsed
*/
function Parser(text) {
var html = text;
var urlRegex = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;
@nickfloyd
nickfloyd / recipe: deleting branches
Created December 13, 2010 17:56
To delete local and remote branches
-delete the remote
>> git push [remote] :[branch]
-delete the local
>> git branch -d [branch]
ex.
git push origin :dev1
git branch -d dev1
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Border Image Test</title>
<style type="text/css">
#slider {
/*This shows how to use border-image to mimic the behavior
of stretchableImageWithLeftCapWidth:topCapHeight: in CSS.
This example has a border-left and border-right width of 15px.
@soffes
soffes / install.markdown
Last active June 9, 2025 07:18
New computer setup

New Machine

Updated this for the first time in awhile in late 2020.

System Preferences

  • Enable iCloud
  • Disable iCloud mail
  • Display to medium
  • Turn up trackpad speed
@damien
damien / wp-config-extras.php
Created August 24, 2009 01:26
Some helpful settings for WordPress development, to be appended to wp-config.php
<?php
/** Development settings.
*
* These are some customs settings that allow us to import arbitrary WordPress
* databases and run them within our development environment without any additional
* configuration. Append this to your regular wp-config.php file and customize as needed.
*
* @link http://gist.github.com/gists/173574
*/