Skip to content

Instantly share code, notes, and snippets.

View phen0menon's full-sized avatar
🥝
Working from home

Roland Ibragimov phen0menon

🥝
Working from home
View GitHub Profile
@phen0menon
phen0menon / reducer_helper.ts
Last active May 9, 2020 13:42
Reducer helper for convenient reducer creation
export interface Action {
type: string;
}
export type CreateReducerReducer<S, A> = (state: S, action: A) => S;
export type CreateReducerComponents<S, A> = Record<
string,
CreateReducerReducer<S, A>
>;
@phen0menon
phen0menon / History|-1caf6ca8|entries.json
Last active September 11, 2023 18:53
My VS Code configuration files.
{"version":1,"resource":"file:///Users/phen0menon/Development/platform-worker-scores-service/worker/settings.py","entries":[{"id":"UuUH.py","timestamp":1693833299024}]}
@phen0menon
phen0menon / Adapter.kt
Last active June 22, 2018 17:07
Recycler Adapter in Kotlin
/**
* @param items data which will be displayed by recyclerview
* @param context the activity where recyclerview displayed on
*/
class Adapter(val items: ArrayList<Object>, val context: Context) : RecyclerView.Adapter<ViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(LayoutInflater.from(context).inflate(R.layout.recyclerview_item, parent, false))
}