- install homebrew
- place
autoconf.rb
into Formula folder:/usr/local/Library/Formula/
- run
brew install autoconf
This file contains hidden or 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 'httparty' | |
class Api::Bitly | |
include HTTParty | |
base_uri 'api.bit.ly' | |
basic_auth 'username', 'password' | |
format :json | |
def self.shorten(url) | |
response = get('/shorten', :query => required_params.merge(:longUrl => url)) |
This file contains hidden or 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
SIGN UP | |
curl -H "Content-Type:application/json" -H "Accept:application/json" \ | |
-d "{\"user\":{\"password_confirmation\":\"12345678\", \"password\":\"12345678\", \"email\":\"[email protected]\"}}" \ | |
http://your_server.com/users | |
SIGN IN | |
curl -H "Content-Type:application/json" -H "Accept:application/json" \ | |
-d "{\"user\":{\"remember_me\":\"0\", \"password\":\"12345678\", \"email\":\"[email protected]\"}}" \ | |
http://your_server.com/users/sign_in |
This file contains hidden or 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 'httparty' | |
require 'json' | |
class Party | |
include HTTParty | |
base_uri 'messageparty.net' | |
def post room, message | |
headers = { |
This file contains hidden or 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 'httparty' | |
class Webservice | |
CANDIDATE = <<XML | |
<Candidate xmlns="com.mysite/2010/10/10" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> | |
<FirstName>%s</FirstName> | |
<LastName>%s</LastName> | |
<Email>%s</Email> | |
<Gender>%s</Gender> | |
</Candidate> |
This file contains hidden or 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
/*! | |
* JavaScript whatevCache - v0.2pre - 12/30/2010 | |
* http://benalman.com/ | |
* | |
* Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*/ | |
// whatevCache.set( key, value [, ttl ] ); |
This file contains hidden or 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 "httparty" | |
class Wem | |
include HTTParty | |
debug_output $stderr | |
ssl_ca_file '/Users/jamesmead/Sites/ssltest/demoCA/ca.crt' | |
pem File.read('/Users/jamesmead/Sites/ssltest/user/hashblue.pem') | |
base_uri "https://127.0.0.1/" | |
def self.wem |
This file contains hidden or 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
# First the end result of what we want: | |
class Foo | |
before_hook :whoa | |
before_hook :amazing | |
def test | |
puts "This is kinda cool!" | |
end |
This file contains hidden or 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
1. Open Bundle editor | |
2. Select Themes -> Themes -> your theme | |
3. add to settings | |
fontName = 'Monaco'; | |
fontSize = '12px'; | |
or what you want, enjoy :) |
YARD CHEATSHEET http://yardoc.org
May 2020 - updated fork: https://gist.github.com/phansch/db18a595d2f5f1ef16646af72fe1fb0e
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
OlderNewer