Skip to content

Instantly share code, notes, and snippets.

View ryarturogi's full-sized avatar
💻
Working Remotely!

Ricardo Guillen I. ryarturogi

💻
Working Remotely!
View GitHub Profile
@fieldoffice
fieldoffice / sass-lighten-darken
Created February 26, 2016 15:16
Sass Lighten and Darken Mixins
// Lighten a colour
@function tint($color, $percentage) {
@return mix(white, $color, $percentage);
}
// Darken a colour
@function shade($color, $percentage) {
@return mix(black, $color, $percentage);
}
@nepsilon
nepsilon / how-to-git-patch-diff.md
Last active May 18, 2024 13:26
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff > some-changes.patch
@zeuxisoo
zeuxisoo / gist:980174
Created May 19, 2011 04:15
How to use git diff to patch file

Create patch file

git diff --no-prefix > [path file name]

Apply path file

patch -p0 < [path file name]