As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
configdocs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public - Sep 07, 2020 update docs for
npm version
| # stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb | |
| # and made a lot more robust by me | |
| # this implementation uses erb by default. if you want to use any other template mechanism | |
| # then replace `erb` on line 13 and line 17 with `haml` or whatever | |
| module Sinatra::Partials | |
| def partial(template, *args) | |
| template_array = template.to_s.split('/') | |
| template = template_array[0..-2].join('/') + "/_#{template_array[-1]}" | |
| options = args.last.is_a?(Hash) ? args.pop : {} | |
| options.merge!(:layout => false) |
| # Throw this in config/initializers and add | |
| # @import variables.sass to the top of application.sass | |
| # to have all variables in app_config.yml | |
| # available as variables in your sass stylesheets | |
| sass_variables = [] | |
| app_variables = YAML.load_file("#{Rails.root}/config/app_config.yml") | |
| app_variables.each do |key, value| | |
| sass_vars << "!#{key} = #{value}" |
As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!
$ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
First look for the primary office city.
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>App Redirection</title> | |
| </head> | |
| <body> | |
| <!-- | |
| NOTE: This was a great hack in days gone by, but now both Apple and Google have improved their support for custom | |
| protocol handlers. |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):
For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.