Skip to content

Instantly share code, notes, and snippets.

View rpandey1234's full-sized avatar
🎯
Helping engineers grow their careers

Rahul Pandey rpandey1234

🎯
Helping engineers grow their careers
View GitHub Profile
{
"videos": [{
"name": "[Case Study] Building A Meta Internal Tool To Empower An Entire Org: Staff Promotion Story",
"img": "https://firebasestorage.googleapis.com/v0/b/tech-career-growth.appspot.com/o/thumbnails%2FTaroPremiumSessions%2Fpremium_session_2_updated.png?alt=media&token=1e1432b5-b1f2-4b29-be27-8d0bab06cca2&w=1920&q=75",
"tags": [
"Meta",
"Performance Review"
],
"views": "9.5K Views",
"likes": "77 Likes",
import android.content.Context
import android.widget.ImageView
import android.widget.Toast
import com.bumptech.glide.Glide
// From the Kotlin docs
fun <T> MutableList<T>?.swap(index1: Int, index2: Int) {
if (this == null) return
val tmp = this[index1] // 'this' corresponds to the list
this[index1] = this[index2]
@rpandey1234
rpandey1234 / MainActivity.kt
Created November 26, 2020 19:03
Update of Tippy Project to Android Studio 4.1 (no more kotlin android extensions)
class MainActivity : AppCompatActivity() {
// ADD VIEW VARIABLE DECLARATIONS HERE
private lateinit var tvTipPercent: TextView
private lateinit var etBase: EditText
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// SET THE VIEWS HERE
tvTipPercent = findViewById(R.id.tvTipPercent)
data class ExamResult(val name: String, val score: Int)
fun main() {
runTests()
}
// Return "A" if the score is b/w 90 and 100
// "B" if the score is b/w 80 and 89
// "C" if the score is b/w 70 and 79
// "F" for anything else
data class ExamResult(val name: String, val score: Int)
fun main() {
runTests()
}
// Return "A" if the score is b/w 90 and 100
// "B" if the score is b/w 80 and 89
// "C" if the score is b/w 70 and 79
// "F" for anything else
@rpandey1234
rpandey1234 / README.md
Created September 22, 2020 23:13
Github README for bigger number demo

Bigger Number App

Your name here

Bigger Number App (aka "Cal Admission Test") prompts the user to select which of the two numbers presented is larger. The background color is updated depending on if the correct answer is chosen. New numbers are randomly selected after a user selection.

Time spent: X hours spent in total

Functionality

@rpandey1234
rpandey1234 / activity_main.xml
Created June 13, 2020 14:42
Layout file for the Magic 8 Ball Android app
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical"
tools:context=".MainActivity">
<TextView
@rpandey1234
rpandey1234 / README.md
Created May 12, 2020 05:30
Yelp clone README template

Yelp Clone

Your name here

Yelp clone displays a list of search results from the Yelp API and displays the results in a scrollable list.

Time spent: X hours spent in total

Functionality

@rpandey1234
rpandey1234 / ASEditingShortcuts2.csv
Created April 28, 2020 07:15
Android Studio Shortcuts: Code Editing++
Optimize imports Control+Alt+O Control+Option+O
Delete whole line Control+Y Command+Backspace
Duplicate line/selection Control+D Command+D
Show toolbar hint about params for a method call Control+P Command+P
Complete statement Control+Shift+Enter Command+Shift+Enter
Clipboard History Control+Shift+V Command+Shift+V