Skip to content

Instantly share code, notes, and snippets.

View rafsanjani's full-sized avatar

Rafsanjani Aziz rafsanjani

View GitHub Profile
@rafsanjani
rafsanjani / aliases.zsh
Created December 4, 2021 10:38
My most used terminal commands, converted into aliases
alias pull="echo \"git pull\" && git pull"
alias stash="echo \"git stash\" && git stash"
alias stashd="echo \"git stash && git stash drop\" && git stash && git stash drop"
alias push="echo \"git push\" && git push"
alias mirror="echo \"scrcpy --stay-awake\" && scrcpy --stay-awake"
alias rebase1="echo \"git rebase -i HEAD~1\" && git rebase -i HEAD~1"
alias rebase2="echo \"git rebase -i HEAD~2\" && git rebase -i HEAD~2"
alias rebase3="echo \"git rebase -i HEAD~3\" && git rebase -i HEAD~3"
alias rebase4="echo \"git rebase -i HEAD~4\" && git rebase -i HEAD~4"
alias rebase5="echo \"git rebase -i HEAD~5\" && git rebase -i HEAD~5"
{
"questions": [
{
"description": "Who was the president of <strong>Ghana</strong> between <u>2016 and 2020</u>",
"answers":[
"John Agyekum Kuffour",
"John Dramani Mahama",
"Nana Addo Dankwa Akuffo-Addo",
"Jerry John Rawlings"
],
@rafsanjani
rafsanjani / SharedPrefs.kt
Last active January 29, 2020 10:47
Shared Preference with type safety
package com.example.application.util
// Created by Rafsanjani on 01/24/2020.
import android.content.Context
class SharedPrefs(context: Context) {
companion object {
//declare all constants here for things you would like to persist
private const val IS_FIRST_TIME_LAUNCH = "com.example.application.is_first_time_launch"
}