⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
<% iterations.each do |iteration| %> | |
<h2 id='Sprint_<%= iteration.number %>' style='display:inline'>Sprint <%= iteration.number %></h2><i> - ends <%= iteration.finish.strftime("%Y-%m-%d") %></i><a href='#Sprint_<%= iteration.number %>' class='anchor'> ¶</a> | |
<ul> | |
<% iteration.stories.each do |story| %> | |
<li class='story'><h3 style='display:inline'><i>Story <%= story.id %> (<%= story.current_state %>)</i></h3> | |
<small class='taskCount'><i><%= " - #{story.tasks.size} tasks defined" if story.respond_to?(:tasks) %></i></small> | |
<p class='storyDescription'><span class="storyIngress"><%= story.name%></span><br><span class="storyRest" style="color:grey"></span></p> | |
<% end %> | |
</ul> | |
<% end %> |
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
class ImportedContactsController << ApplicationController | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
#THIS METHOD TO SEND USER TO THE GOOGLE AUTHENTICATION PAGE. | |
def authenticate | |
# initiate authentication w/ gmail | |
# create url with url-encoded params to initiate connection with contacts api | |
# next - The URL of the page that Google should redirect the user to after authentication. | |
# scope - Indicates that the application is requesting a token to access contacts feeds. |
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
# encoding: utf-8 | |
require 'test_helper' | |
class Users::OmniauthCallbacksControllerTest < ActionController::TestCase | |
context "Facebook callback" do | |
setup do | |
# This a Devise specific thing for functional tests. See https://github.com/plataformatec/devise/issues/closed#issue/608 | |
request.env["devise.mapping"] = Devise.mappings[:user] | |
end | |
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
namespace :assets do | |
task :rebuild do | |
# Config the base names of all the jammit CSS packages you have defined | |
# in assets.yml. Could probably parse assets.yml to get this if | |
# we wanted to. | |
packages = ['common'] | |
# This is because on OS X, you have to put an explicit empty string to the | |
# required extension argument with the -i parameter, but on Linux you | |
# do not. |
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 ruby | |
require 'rubygems' | |
require 'FasterCSV' | |
require 'httparty' | |
require 'json' | |
class GitHub | |
include HTTParty | |
base_uri 'https://api.github.com' |
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
Sometimes the easiest option is to give someone a key to your instance and revoke it after they are done. | |
We create a key pair, put the public key on the server, give them the private key. | |
To create the key pair for suzy, | |
cd ~/.ssh | |
ssh-keygen -b 1024 -f suzy -t dsa | |
cat suzy.pub >> authorized_keys | |
cat suzy | |
rm suzy* |
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
context 'performance' do | |
before do | |
require 'benchmark' | |
@posts = [] | |
@users = [] | |
8.times do |n| | |
user = Factory.create(:user) | |
@users << user | |
aspect = user.aspects.create(:name => 'people') | |
connect_users(@user, @aspect0, user, aspect) |
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
(function(window, undefined){ | |
window.Document = Backbone.Model.extend({ | |
url: function () { | |
var self = this, | |
base = '/' + self.database; | |
if (self.isNew()) |
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
#################### | |
### Dependencies ### | |
#################### | |
require "optparse" | |
require "cinch" | |
require "cinch/logger/null_logger" | |
###################### |
OlderNewer