# 1. add the contributor as a remote
$ git remote add <contributor-name> <contributor-url>
# 2. create a throw-away branch for the merge in case we mess up
$ git checkout -b test-merge
# 3. fetch the remote and reset to the branch they made the PR from
$ git fetch <contributor-name>
$ git reset --hard /
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
Started by timer | |
Building on master in workspace /mnt/jenkins/data/jobs/Mirror Selenium to GitHub/workspace | |
[workspace] $ /bin/sh -xe /tmp/hudson6358920160239539462.sh | |
+ cd selenium | |
+ git pull | |
Already up-to-date. | |
+ git push --mirror gh | |
To [email protected]:SeleniumHQ/selenium | |
- [deleted] jruby-174 | |
* [new branch] gh/master -> gh/master |
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
def edit_distance(a, b) | |
return 0 if !a || !b || a == b | |
return (a.length - b.length).abs if a.length == 0 || b.length == 0 | |
m = [[0]] | |
1.upto(a.length) { |i| m[i] = [i] } | |
1.upto(b.length) { |j| m[0][j] = j } | |
1.upto(a.length) do |i| | |
1.upto(b.length) do |j| | |
m[i][j] = | |
[ m[i-1][j-1] + (a[i-1] == b[j-1] ? 0 : 1), |
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
POST /session HTTP/1.1 | |
Accept: application/json | |
Content-Type: application/json; charset=utf-8 | |
Content-Length: 246 | |
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3 | |
User-Agent: Ruby | |
Connection: close | |
Host: 127.0.0.1:9515 | |
{"desiredCapabilities":{"browserName":"chrome","version":"","platform":"ANY","javascriptEnabled":true,"cssSelectorsEnabled":true,"takesScreenshot":false,"nativeEvents":false,"rotatable":false,"chromeOptions":{"detach":true},"chrome.detach":true}} |
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 'selenium-webdriver' | |
driver = Selenium::WebDriver.for :firefox | |
frame_html = <<-HTML | |
<a id="submit" href="#" onclick="window.top.location = 'http://www.google.no/'; return false;">Continue</a> | |
HTML | |
page = <<-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
def vote_result_groups | |
{ | |
:for => {...} | |
:against => {...} | |
:absent => {...} | |
} | |
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
ssh-dss AAAAB3NzaC1kc3MAAACBAJqLMUT8klGAt5VEIYAzsCNcG/8FsxBhFuCYSdvf9P5j7I84dOZsmGLHiqxcNEgrXkXMo4smJstYXSSdIVWF+RhSe4P7gH94D78mQS2dfGyXsWsJdqY7obEih76L0HCxhF8fcu4FBBCE3n1cQLfYTqAr6Crm3Rng3mTjUYQ/J8RFAAAAFQDqrN3s3nVO+2Fi6CnRw52IKpBMwQAAAIBTPpoQjYAKMMQuU0mJ/POmH4kzTeCLdyrv8v3pjJ8bOoyF6qMXqRVqlGgKmSEtmSlWD6fmnIyh34c5NiAGaJOySnkLUOLwjUvz2PkJpqazKRa1KkZblg69iKto7IpR2BID3b2gAorpJmNAtexlyn2vTrR3Ai3hCqAGy9rrnkrTEwAAAIAtwepHaG0mGPoYHzkoCNSu6Xzx3mdxFa10CxOj1BXtK5UsVysd5wWOqtYQNq4JZe9mSqk5+KRc1Q2aUAFHCgemMAP2C8RYaT+TiesFs5e+jEFG4HM6T0FDcOV6/+CVwM+IavYRC71ZkE1cM0o9Ycs79h5flNOS7unhSIlIM8OFsg== [email protected] |
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
$ curl -i localhost:9200/ | |
HTTP/1.1 200 OK | |
Content-Type: application/json; charset=UTF-8 | |
Content-Length: 179 | |
{ | |
"ok" : true, | |
"status" : 200, | |
"name" : "Tarleton, George", | |
"version" : { |
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
Tidspunkt : "00:26:00" | |
For : 8 | |
Mot : 162 | |
Ikke tilstede: 2 | |
1 : F. de Ruiter A : M | |
2 : I. Godskesen FRP : M | |
3 : S. Harberg H : M | |
4 : K. I. Ropstad KRF : M | |
5 : T. S. Utsogn FRP : M |
- Download
git-fixws.rb
to~/bin/git-fixws.rb
chmod +x ~/bin/git-fixws.rb
git config --global alias.fixws '!ruby ~/bin/git-fixws.rb'
With a dirty tree, you can then run git fixws
to have trailing whitespace removed.