Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chipcerio's full-sized avatar
🏠
Working from home

Chip Cerio chipcerio

🏠
Working from home
View GitHub Profile
$ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
# WARNING!!!
# flashing factory images using this method erases the user data
# including third-party apps installed
# make sure you have downloaded the Android SDK to perform adb & fastboot commands
$ adb reboot bootloader
# some devices may not have radio.img
$ fastboot flash bootloader bootloader.img
# to create SSH key, you do this
# https://help.github.com/articles/generating-ssh-keys/
#
# assuming,
# john.doe@gmail.com is your personal email and
# john.doe@sym.ph is your company email
# $ ssh-keygen -t rsa -b 4096 -C "john.doe@gmail.com"
# create another SSH key for specific company following the above command
$ ssh-keygen -t rsa -f -b 4096 ~/.ssh/id_rsa_symph -C "john.doe@sym.ph"
# facebook development key hash
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
# facebook release key hash
keytool -exportcert -alias YOUR_RELEASE_KEY_ALIAS -keystore YOUR_RELEASE_KEY_PATH | openssl sha1 -binary | openssl base64
@chipcerio
chipcerio / multiple_ssh_setting.md
Created September 21, 2016 06:41 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@chipcerio
chipcerio / README.md
Created September 26, 2016 14:55 — forked from polbins/README.md
Android Studio as default Git Diff Tool

Create Android Studio Command-line Launcher

  1. Open Android Studio
  2. Go to: Tools > Create Command-line Launcher
  3. Leave as default, Press OK

Configure Git to use Android Studio as default Diff Tool

  1. Add the following lines to your .gitconfig
@chipcerio
chipcerio / git-loglive
Created September 29, 2016 05:00 — forked from tlberglund/git-loglive
Log Live Git Command
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
sleep 1
done
@chipcerio
chipcerio / Cheese.java
Created October 18, 2016 11:40
cheese list
public class Cheese {
public static final String[] LIST = {
"Abbaye de Belloc", "Abbaye du Mont des Cats", "Abertam", "Abondance", "Ackawi",
"Acorn", "Adelost", "Affidelice au Chablis", "Afuega'l Pitu", "Airag", "Airedale",
"Aisy Cendre", "Allgauer Emmentaler", "Alverca", "Ambert", "American Cheese",
"Ami du Chambertin", "Anejo Enchilado", "Anneau du Vic-Bilh", "Anthoriro", "Appenzell",
"Aragon", "Ardi Gasna", "Ardrahan", "Armenian String", "Aromes au Gene de Marc",
"Asadero", "Asiago", "Aubisque Pyrenees", "Autun", "Avaxtskyr", "Baby Swiss",
"Babybel", "Baguette Laonnaise", "Bakers", "Baladi", "Balaton", "Bandal", "Banon",
@chipcerio
chipcerio / generate-pushid.js
Created April 14, 2017 04:02 — forked from mikelehen/generate-pushid.js
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/
@chipcerio
chipcerio / Cheese.kt
Created July 5, 2017 06:37
cheese list in kotlin
object Cheese {
val LIST = arrayOf(
"Abbaye de Belloc", "Abbaye du Mont des Cats", "Abertam", "Abondance", "Ackawi",
"Acorn", "Adelost", "Affidelice au Chablis", "Afuega'l Pitu", "Airag", "Airedale",
"Aisy Cendre", "Allgauer Emmentaler", "Alverca", "Ambert", "American Cheese",
"Ami du Chambertin", "Anejo Enchilado", "Anneau du Vic-Bilh", "Anthoriro", "Appenzell",
"Aragon", "Ardi Gasna", "Ardrahan", "Armenian String", "Aromes au Gene de Marc",
"Asadero", "Asiago", "Aubisque Pyrenees", "Autun", "Avaxtskyr", "Baby Swiss", "Babybel",
"Baguette Laonnaise", "Bakers", "Baladi", "Balaton", "Bandal", "Banon", "Barry's Bay Cheddar",