Skip to content

Instantly share code, notes, and snippets.

View paulywill's full-sized avatar
:octocat:
= (👨‍💻? 🐝 : 🐵 )☕️ + 🎧

Paul Gamble paulywill

:octocat:
= (👨‍💻? 🐝 : 🐵 )☕️ + 🎧
View GitHub Profile
@vkWeb
vkWeb / ReviewPRCommands.md
Last active December 2, 2022 10:46
To review PRs these commands are helpful. 🚀

Every open source contributor at some point reviews pull requests. Pulling the contents of the PR locally is important to test the code. Many a times reviewers themselves want to fix stuff on the PR like merge conflicts, typos. GitHub has documentation to deal with this but I never found those simple enough so here's the way I suggest reviewing PRs:

Keep in mind upstream refers to the original repository from which you forked and your own forked copy is called origin.

Note: Things in UPPERCASE are placeholders for some GitHub specific values. You'll understand them by reading.

# Fetch PR
git fetch upstream refs/pull/PULLREQ_NUMBER/head:pr-PULLREQ_NUMBER
@parmentf
parmentf / GitCommitEmoji.md
Last active May 24, 2024 00:27
Git Commit message Emoji
@arjunvenkat
arjunvenkat / gist:1115bc41bf395a162084
Last active January 12, 2024 05:04
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

When you modify a file in your repository, the change is initially unstaged. In order to commit it, you must stage it—that is, add it to the index—using git add. When you make a commit, the changes that are committed are those that have been added to the index.

git reset changes, at minimum, where your current branch is pointing. The difference between --mixed and --soft is whether or not your index is also modified. So, if we're on branch master with this series of commits:

- A - B - C (master)

HEADpoints to C and the index matches C.

--soft

@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"

Welcome to #rubyonrails

Please behave in a polite, considerate and inclusive manner in the channel at all times. People volunteer their time in the channel to help people like you with your Rails problems and some respect (in both directions) will go an extremely long way.

These rules are in place so that you can get the quickest and best support from #rubyonrails.

Rule #0: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.

  1. Do your research before hand. Your question may be answerable with a quick Google search or by simply experimenting. If you're using a method in Rails, look it up in the API Docs or in the Official Guides.
  2. If you've tried Googling, explain what terms you've tried to use so people can better help you.