Skip to content

Instantly share code, notes, and snippets.

View grzesiek2010's full-sized avatar

Grzegorz Orczykowski grzesiek2010

View GitHub Profile
@grzesiek2010
grzesiek2010 / gist:cc70591d077e3ce7d7f936841e0391c4
Created January 29, 2020 13:14
Preparing apks for firebase
./gradlew assembleDebug
./gradlew assembleDebugAndroidTest
@grzesiek2010
grzesiek2010 / gist:2b35de7febd96f5771e6470d1d52ff2c
Created January 22, 2020 21:33
Pushing to someone else's pull request on GitHub
git remote add kkrawczyk123 https://github.com/kkrawczyk123/collect.git
git fetch kkrawczyk123
git checkout pr/3605
[change and commit]
git push kkrawczyk123 pr/3605:add-and-update-settings-tests
Generate private key:
openssl genrsa -out privkey.pem 4096
Generate public key:
openssl rsa -in privkey.pem -pubout -out pubkey.pem
Encrypt file:
openssl rsautl -encrypt -in test.txt -out testEncrypted.txt -pubin -inkey pubkey.pem
Decrypt file:
@grzesiek2010
grzesiek2010 / pr.md
Created August 30, 2017 06:48 — 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 = [email protected]: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:

### 1. Clone your fork:
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
### 2. Add remote from original repository in your forked repository:
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream