Skip to content

Instantly share code, notes, and snippets.

View jxub's full-sized avatar
🏯

Jakub Janarek jxub

🏯
View GitHub Profile
@jxub
jxub / how-to-squash-commits-in-git.md
Created July 13, 2018 14:54 — forked from patik/how-to-squash-commits-in-git.md
How to squash commits in git

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@jxub
jxub / README.md
Created April 1, 2017 14:17 — forked from bih/README.md
Intro to Rails 5 Workshop

Intro to Rails 5 Workshop

0. Configuration

Ruby 2.4.0 & Rails 5.2.0

How to install Ruby 2.4.0

$ curl -sSL https://get.rvm.io | bash -s stable --ruby=2.4.0
@jxub
jxub / StreamToString.go
Last active March 20, 2017 12:07 — forked from tejainece/StreamToString.go
Golang: io.Reader stream to string or byte slice
import "bytes"
func StreamToByte(stream io.Reader) []byte {
buf := new(bytes.Buffer)
buf.ReadFrom(stream)
return buf.Bytes()
}
func StreamToString(stream io.Reader) string {
buf := new(bytes.Buffer)
@jxub
jxub / bottle.sh
Created November 23, 2016 19:42 — forked from mjhea0/bottle.sh
mkdir bottle
cd bottle
pip install virtualenv==12.0.7
virtualenv venv
source venv/bin/activate
pip install bottle==0.12.8
pip freeze > requirements.txt
git init
git add .
git commit -m "initial commit"