This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="https://your.domainna.me/path/to/widget.js"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Syncronization Sequence (Phase 1) | |
User->App: Open & Login | |
App->Server: GET ToDos | |
Server->App: 200 OK\n{title:eat breakfast, updated:02:00} | |
Web->Server: Update ToDo #1 via web at 02:30\n{title:eat lunch} | |
User->App: Update ToDo #1 in app at 03:00 | |
App->Server: PUT update ToDo #1\n{title:eat dinner} | |
note over Server | |
The web changes are overwritten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Add this file to your ~/.rvm/hooks/ directory to auto-initiate hitch | |
# whenever you cd into a project where the hitch gem is installed in the current rvm gemset. | |
if [[ -r ./.rvmrc && -n $(which hitch) && -x $(which hitch) ]]; then | |
echo 'Starting hitch' | |
hitch | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make your life even easier by adding this line to your .bash_login (or equivalent) file. | |
alias firefox-bin-profile='~/.bash_profile_scripts/firefox-bin-profile.rb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'oauth' | |
require 'xmlsimple' | |
# Create an OAuth Consumer with the appropriate API key and secret. | |
@consumer = OAuth::Consumer.new("api_key_EUNzNgVkrpFUFg", "api_secret_KBq6hTvjjvqAWOPz6c4WnQHN6jvkU8", { :site=>"https://my-domain.haikulearning.com" }) | |
# Create an OAuth Access Token using your personal key and secret. | |
@access_token = OAuth::AccessToken.new(@consumer, "token_959b3659b65ddbb6f8552c3401", "secret_40ec1d3617e7f58811c2f1e4416dcf2f7") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'oembed' | |
OEmbed::Providers.register(OEmbed::Providers::Youtube) | |
OEmbed::Providers.get("http://www.youtube.com/watch?v=2BYXBC8WQ5k").html #=> expected HTML | |
OEmbed::Providers.get("http://vimeo.com/19231255").html #=> An OEmbed::NotFound error | |
OEmbed::Providers.register(OEmbed::Providers::Vimeo) | |
OEmbed::Providers.get("http://vimeo.com/19231255").html #=> expected HTML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gemdoc via http://stephencelis.com/archive/2008/6/bashfully-yours-gem-shortcuts | |
# needs to happen | |
gemdoc() { | |
open $GEM_HOME/doc/`$(which ls) $GEM_HOME/doc | grep $1 | sort | tail -1`/rdoc/index.html | |
} | |
_completegemlist() { | |
local cmd=${COMP_WORDS[0]} | |
local subcmd=${COMP_WORDS[1]} | |
local cur=${COMP_WORDS[COMP_CWORD]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on code from the following sources: | |
// * http://www.voiceoftech.com/swhitley/index.php/2009/03/twitter-oauth-with-net/ | |
// * http://oauth.googlecode.com/svn/code/csharp/ | |
// Note: if you're using mono the following command will compile this code `gmcs -r:System.Web.dll this_file.cs` | |
using System; | |
using System.Security.Cryptography; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Net; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on code from the following sources: | |
// * http://www.voiceoftech.com/swhitley/index.php/2009/03/twitter-oauth-with-net/ | |
// * http://oauth.googlecode.com/svn/code/csharp/ | |
// Note: if you're using mono the following command will compile this code `gmcs -r:System.Web.dll this_file.cs` | |
using System; | |
using System.Security.Cryptography; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Net; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on code from the following sources: | |
// * http://www.voiceoftech.com/swhitley/index.php/2009/03/twitter-oauth-with-net/ | |
// * http://oauth.googlecode.com/svn/code/csharp/ | |
// Note: if you're using mono the following command will compile this code `gmcs -r:System.Web.dll this_file.cs` | |
using System; | |
using System.Security.Cryptography; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Net; |