Skip to content

Instantly share code, notes, and snippets.

View hwrdprkns's full-sized avatar
💭
I may be slow to respond.

Taylor H. Perkins hwrdprkns

💭
I may be slow to respond.
View GitHub Profile
@ctrochalakis
ctrochalakis / dalton.rb
Created June 11, 2010 12:17
facebook, google, twitter, yahoo warden strategies
require 'dalton/strategies/skroutz'
require 'dalton/strategies/facebook'
require 'dalton/strategies/openid' # yahoo, #google
require 'dalton/strategies/twitter'
# Setup OpenId file storage, don't change the storage engine!
require 'openid/store/filesystem'
Rails.configuration.middleware.use(Rack::OpenID,
OpenID::Store::Filesystem.new(Rails.root + 'tmp/openid'))
@thorikawa
thorikawa / Top.java
Created June 6, 2011 14:04
Android DrmFramework Sample
package com.polysfactory.DrmFrameworkTest;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import android.app.Activity;
import android.drm.DrmManagerClient;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@panuta
panuta / gist:1852087
Last active June 16, 2024 18:15
How to setup Django/Postgresql on OS X Mountain Lion using Homebrew

Command Line Tools for Xcode

Command line tools comes bundle with Xcode prior to 4.3 version. After 4.3, you need to install a separated command line tools yourself.

First, go to this url and login using Apple Developer account (Free to register)

https://developer.apple.com/downloads/index.action
@romannurik
romannurik / button_bar_layout.xml
Created April 10, 2012 04:24
How to make a proper button bar on ICS
<!--
A button bar is a set of buttons at the bottom of an activity.
An example is an AlertDialog with OK/Cancel buttons.
Note that something similar can be accomplished using a
split action bar and text-only action buttons, but this is an
alternate presentation that's often preferred.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@digitaljhelms
digitaljhelms / gist:4287848
Last active July 25, 2024 08:06
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
commit 5115d4348ee720be3db77ae54a06c492049e5ea3
Author: Naseer Ahmed <naseer@codeaurora.org>
Date: Mon Nov 19 19:27:37 2012 -0500
msm_mdp: Update header for 4 layer support
Bug: 7626586
Change-Id: I37730470dc09b7a9d6336b1603f87efd98f45e97
Signed-off-by: Iliyan Malchev <malchev@google.com>
commit fbef8b9578aaa422d5bd3153eb50df739815672c
@jelder
jelder / iteration.rb
Last active November 28, 2020 19:24
The difference between `for` and `each` in Ruby: scope.

for should only be used when you actually want the iteratee to be accessible after you leave the block. for pollutes the parent scope with old iteratees. For this reason, each should be your default.

@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software