Skip to content

Instantly share code, notes, and snippets.

View itspriddle's full-sized avatar
🤘
clickity clack

Josh Priddle itspriddle

🤘
clickity clack
View GitHub Profile
/**
* Titanium Mobile Utility Functions
*
* @author Joshua Priddle <[email protected]>
* @version 0.0.0
*/
var $ = {};
/**
/**
* jQuery Time Helpers
*
* @author Joshua Priddle <[email protected]>
* @copyright Copyright (c) 2010, ViaTalk, LLC
* @version 0.0.1
*/
;(function($) {
$.toTimestamp = function(seconds) {
# Dropbox.app removes ~/Library/Contextual\ Menu\ Items/DropboxPlugin.plugin each time it's opened.
# Putting the plugin in /Library/Contextual\ Menu\ Items and chowning it to root:admin seems to fix it.
cd /Library/Contextual\ Menu\ Items
sudo cp /Applications/Dropbox.app/Contents/Resources/DropboxPlugin.plugin.tgz .
sudo tar -vzxf DropboxPlugin.plugin.tgz
sudo rm DropboxPlugin.plugin.tgz
sudo chown -R root:admin DropboxPlugin.plugin
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<title>CSS3 button example</title>
<link rel="stylesheet" href="css/reset.css" media="screen">
<style>
body {
background: #ddd;
A is for awk, which runs like a snail, and
B is for biff, which reads all your mail.
C is for cc, as hackers recall, while
D is for dd, the command that does all.
E is for emacs, which rebinds your keys, and
F is for fsck, which rebuilds your trees.
G is for grep, a clever detective, while
H is for halt, which may seem defective.
I is for indent, which rarely amuses, and
J is for join, which nobody uses.
@powdahound
powdahound / hipchat_bot.js
Created April 25, 2011 18:35
Basic XMPP bot example for HipChat using node.js
// Basic XMPP bot example for HipChat using node.js
// To use:
// 1. Set config variables
// 2. Run `node hipchat_bot.js`
// 3. Send a message like "!weather 94085" in the room with the bot
var request = require('request'); // github.com/mikeal/request
var sys = require('sys');
var util = require('util');
@drichert
drichert / post-checkout
Created April 27, 2011 21:18
git post-checkout hook for compressing javascript (via uglifyjs)
#!/bin/bash
branch=$(git symbolic-ref -q HEAD |sed 's/refs\/heads\///')
gitroot=$(git rev-parse --show-toplevel)
jsdir="js"
targetdir="$gitroot/$jsdir"
files=$(find $targetdir -maxdepth 1 -type f -name '*.js' ! \( -name '*.min.js' \))
echo -n "Uglifying javascript... "
for f in $files; do

http://hea-www.harvard.edu/~fine/OSX/unicode_apple_logo.html

  •  - &#xF8FF; - &#63743; - the Apple Symbol
  • ⌘ - &#x2318; - &#8984; - the Command Key symbol
  • ⌥ - &#x2325; - &#8997; - the Option Key symbol
  • ⇧ - &#x21E7; - &#8679; - the Shift Key symbol
  • ⎋ - &#x238B; - &#9099; - the Escape Key symbol

And while we're at it, some related (not mac-specific):

module AttrReaderWriter
def attr_reader_or_writer(*keys)
keys.flatten.each do |key|
class_eval <<-RUBY, __FILE__, __LINE__
def #{key}(val = nil)
@#{key} = val || @#{key}
end
RUBY
end
end
@itspriddle
itspriddle / gist:1106724
Created July 26, 2011 13:13
Ruby Style Guide
Original Source: https://github.com/chneukirchen/styleguide
= Christian Neukirchen's Ruby Style Guide
You may not like all rules presented here, but they work very well for
me and have helped producing high quality code. Everyone is free to
code however they want, write and follow their own style guides, but
when you contribute to my code, please follow these rules: