Skip to content

Instantly share code, notes, and snippets.

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

Mikołaj Pich mklkj

🏠
Working from home
View GitHub Profile
@mklkj
mklkj / 20-intel_tearing.conf
Created March 15, 2020 14:27
Fix intel g4560 hd tearing
# /usr/share/X11/xorg.conf.d/20-intel_tearing.conf
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TripleBuffer" "true"
Option "TearFree" "true"
EndSection
@mklkj
mklkj / snippet.kt
Created May 19, 2021 15:08
Reverse lookup of android resource id
R.id::class.java.declaredFields.map { it[0] to it.name }.toMap()[2131296765]
import android.view.ViewGroup
import androidx.recyclerview.widget.ConcatAdapter
import androidx.recyclerview.widget.RecyclerView
import com.jay.widget.StickyHeaders
class StickyConcatAdapter(
private val concatAdapter: ConcatAdapter
) : RecyclerView.Adapter<RecyclerView.ViewHolder>(), StickyHeaders {
override fun isStickyHeader(position: Int): Boolean = position == 1
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="-1"/>
<meta http-equiv="CacheControl" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="shortcut icon" href="data:;base64,iVBORw0KGgo="/>
<APM_DO_NOT_TOUCH>
<script>//<![CDATA[