Skip to content

Instantly share code, notes, and snippets.

View fabiopalumbo's full-sized avatar
🎯
Focusing

Fabio Palumbo fabiopalumbo

🎯
Focusing
View GitHub Profile
@fabiopalumbo
fabiopalumbo / advanced-formatting-github-markdown.md
Created July 17, 2020 22:30 — forked from apaskulin/advanced-formatting-github-markdown.md
Tips and tricks for more formatting options in GitHub Markdown

Advanced Formatting in GitHub Markdown

GitHub Flavored Markdown lets you create useful documents in GitHub and GitHub Enterprise using .md files. Like other varieties of markdown, GitHub Markdown tries to be as readable as possible in its raw form, resulting in an intentionally limited set of formatting options. However, these options can feel restrictive when dealing with complex content.

Although GitHub Markdown strips out most HTML tags, here are a few tricks that can give you more flexibility when formatting your documents. These advanced formatting options can make your documents more useable, but they come at the expense of plain text readability, so use with caution.

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@fabiopalumbo
fabiopalumbo / pr.md
Created July 2, 2020 14:22 — forked from piscisaureus/pr.md
Checkout github pull requests locally

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 = git@github.com: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:

Keybase proof

I hereby claim:

  • I am fabiopalumbo on github.
  • I am fppalumbo (https://keybase.io/fppalumbo) on keybase.
  • I have a public key ASDOqN99BSkUZQocNjDYoipQa10C3cGGHoTVyxNSHmczoQo

To claim this, I am signing this object:

@fabiopalumbo
fabiopalumbo / Jenkinsfile
Created June 13, 2018 14:28 — forked from chinshr/Jenkinsfile
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}