package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) | |
func main() { |
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "Usage: git pr [clean] [<remote>] <id-or-url>" | |
echo "" | |
echo "Examples:" | |
echo "git pr 42 --> git fetch origin pull/42/head:pr/origin/42" | |
echo "git pr upstream 42 --> git fetch upstream pull/42/head:pr/upstream/42" | |
echo "git pr https://github.com/peerigon/phridge/pull/1 --> git fetch https://github.com/peerigon/phridge.git pull/1/head:pr/peerigon/phridge/1" | |
echo "git pr clean --> Deletes all branches that match pr/*/* and pr/*/*/*" |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
I’m a web app that wants to allow other web apps access to my users’ information, but I want to ensure that the user says it’s ok.
I can’t trust the other web apps, so I must interact with my users directly. I’ll let them know that the other app is trying to get their info, and ask whether they want to grant that permission. Oauth defines a way to initiate that permission verification from the other app’s site so that the user experience is smooth. If the user grants permission, I issue an AuthToken to the other app which it can use to make requests for that user's info.
Oauth2 has nothing to do with encryption -- it relies upon SSL to keep things (like the client app’s shared_secret) secure.
#!/usr/bin/env python | |
""" | |
git fuzzy-checkout | |
Same as `git checkout branch`, but with fuzzy matching if checkout fails. | |
Turns `git checkout barnch` into `git checkout branch`, | |
assuming `branch` is a branch. | |
""" | |
import difflib |
NOTE: This is tested on the versions mentioned in the title, and NOT earlier or later versions. YMMV.
Run the following commands in Terminal…
Backup the original driver:
sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage-backup
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |