Skip to content

Instantly share code, notes, and snippets.

View pokk's full-sized avatar
🌀

Jieyi pokk

🌀
View GitHub Profile
@tfcporciuncula
tfcporciuncula / PdfAdapter.kt
Last active March 19, 2024 11:50
PDF rendering the easy way
class PdfAdapter(
// this would come from the ViewModel so we don't need to recreate it on config change
// and the VM can close it within onCleared()
private val renderer: PdfRenderer,
// this would come from the Activity/Fragment based on the display metrics
private val pageWidth: Int
) : RecyclerView.Adapter<PdfAdapter.ViewHolder>() {
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
@radiovisual
radiovisual / .eslintrc
Last active October 30, 2021 11:55
React Native AirBnB ESLint Config
{
"parser": "babel-eslint",
"plugins": [
"react",
"react-native"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
@lopspower
lopspower / README.md
Last active May 17, 2024 04:22
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@artzub
artzub / make.sh
Last active November 30, 2022 11:41
Install JetBrains Hub + YouTrack + UpSource + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"
@dodyg
dodyg / gist:5823184
Last active March 29, 2024 03:59
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.