Generate a new SSH Key then Add the key to your second GitHub account
In ~/.ssh/config
, add a custom host for your additional user
Host github.com-otheruser
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_otheruser
array.map { |a| "<p>#{a}</p>" }.join("\n") |
source 'https://rubygems.org' | |
gem 'octokit' | |
gem 'axlsx' |
require 'octokit.rb' | |
# export GITHUB_TOKEN=000000000000000 | |
# export GITHUB_API_ENDPOINT=http://0.0.0.0/api/v3 | |
# export GHE_HOST=0.0.0.0 | |
# export GHE_PROTOCOL=https | |
ACCESS_TOKEN = ENV.fetch("GITHUB_TOKEN") | |
API_ENDPOINT = ENV.fetch("GITHUB_API_ENDPOINT") | |
HOST = ENV.fetch("GHE_HOST") # github.com |
Paperclip.interpolates(:placehold_it) do |attachment, style| | |
# assumes using dimensions specified as integer, eg "250x250#" | |
params = attachment.styles[style][:geometry].match(/\d+x\d+/).to_s + "&text=#{attachment.instance.name}" | |
"http://www.placehold.it/" + params | |
end |
<snippet> | |
<content><![CDATA[ | |
respond_to do |format| | |
if @${1:${TM_FILENAME/(.*?)(s?)(_controller\..+)/$1/}}.save! | |
format.html { redirect_to @${1:${TM_FILENAME/(.*?)(s?)(_controller\..+)/$1/}}, notice: "${2:${TM_FILENAME/(.*?)(s?)(_controller\..+)/\u$1/}} has been saved successfully" } | |
format.json { render json: @${1:${TM_FILENAME/(.*?)(s?)(_controller\..+)/$1/}} } | |
else | |
format.html { render action: "new" } | |
format.json { render json: @${1:${TM_FILENAME/(.*?)(s?)(_controller\..+)/$1/}}.errors, status: :unprocessable_entity } | |
end |
<cfif thisTag.ExecutionMode is 'end'> | |
<cfset THISTAG.Content = THISTAG.GeneratedContent /> | |
<cfset THISTAG.GeneratedContent = "" /> | |
<cfparam name="to" default="#attributes.to#" /> | |
<cfparam name="from" default="#attributes.from#" /> | |
<cfparam name="subject" default="#attributes.subject#" /> | |
<cfparam name="cc" default="" /> | |
<cfparam name="bcc" default="" /> |
namespace :taco do | |
resources :ingredients do | |
get :search1, on: :member | |
resource :search2, only: :show | |
end | |
end | |
search1_taco_ingredient GET /taco/ingredients/:id/search1(.:format) taco/ingredients#search1 | |
taco_ingredient_search2 GET /taco/ingredients/:ingredient_id/search2(.:format) taco/search2s#show |
class RachelsPoem | |
attr_accessor :holes_per_year, :years, :split_after_years | |
attr_reader :total_holes | |
def initialize(holes_per_day:3, years:23, days_per_year:365.25, split_after_years:7) | |
@total_holes = 0 | |
self.holes_per_year = holes_per_day * days_per_year | |
self.years = years | |
self.split_after_years = split_after_years | |
end |
when using single line declaration, and a property is added later | |
#foo { width: 10px; } | |
becomes... | |
- #foo { width: 10px; } | |
+ #foo { | |
+ width: 10px; | |
+ height: 20px; |
Generate a new SSH Key then Add the key to your second GitHub account
In ~/.ssh/config
, add a custom host for your additional user
Host github.com-otheruser
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_otheruser