Skip to content

Instantly share code, notes, and snippets.

View tonyhuynh's full-sized avatar

Tony Huynh tonyhuynh

  • 29FX, LLC
  • Washington D.C. metro area
View GitHub Profile

ID.me Refresh Token

When an access token is returned from from the https://api.id.me/oauth/token endpoint, the payload includes a refresh token that can be used when the access token expires.

Access Token Payload

{
    "access_token" = 9df898298cd2ec4ad5f0e24a09f020a0393b4ee119c2106fb323882195dc598c;
    "expires_in" = 300;
@tonyhuynh
tonyhuynh / jruby-pow.txt
Last active August 29, 2015 14:01
jRuby + Pow
Pow does not support jRuby. The error you'll hit is "IOError: Socket is not connected". This PR describes a hack to get around it: https://github.com/josh/nack/pull/32
Here are the steps:
1. Open ~/Library/Application\ Support/Pow/Current/node_modules/nack/lib/nack/server.rb
2. Replace line #132 with the following:
# OLD: sock.close_read
begin
@tonyhuynh
tonyhuynh / ID.me-Senior-Rails-Developer.md
Last active August 29, 2015 13:56
ID.me Senior Rails Developer job description

Senior Ruby on Rails Developer at ID.me

Location: Tyson's Corner, VA

TL;DR

ID.me is seeking a talented Ruby on Rails developer to add to our team. Applicants should have 5+ years of experience developing for the web with a solid command of Ruby, Rails and related technologies.

About ID.me

@tonyhuynh
tonyhuynh / gist:4511875
Created January 11, 2013 16:14
create symlink for Sublime Text 2
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
export PS1="\n\[\033[38m\]\u@\[\033[01;34m\] \w \[\033[31m\]\n\`ruby -e \"print (%x{git branch 2> /dev/null}.split(%r{\n}).grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1)')\"\`\[\033[37m\]$\[\033[00m\] "
# git
alias gs='git status'
alias gc='git commit'
alias gcm='git commit -m'
alias gco='git checkout'
alias gl='git pull'
alias gpm='git push origin master'
alias gpd='git push origin development'
@tonyhuynh
tonyhuynh / Bulletproof font-face
Created January 28, 2011 00:00
Bulletproof font-face syntax for cross-browser compatibility
@font-face {
font-family: 'ChunkFiveRegular;
src: url('Chunkfive-webfont.eot);
src: local(‚ò∫'),
url('Chunkfive-webfont.woff') format('woff'),
url('Chunkfive-webfont.ttf') format('truetype'),
url('Chunkfive-webfont.svg#webfont') format('svg');
font-weight: normal;
font-style: normal;
}
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/33needs_dev.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".