Skip to content

Instantly share code, notes, and snippets.

View iurysza's full-sized avatar
📱
Mobile stuff

iury souza iurysza

📱
Mobile stuff
View GitHub Profile
@gelitenight
gelitenight / Example.java
Last active November 8, 2023 08:42
A way to easily traverse any view hierarchy in Android
/* basic usage */
ViewGroup root = (ViewGroup) findViewById(android.R.id.content);
LayoutTraverser.build(new LayoutTraverser.Processor() {
@Override
public void process(View view) {
// do stuff with the view
}
}).traverse(root);
@tracker1
tracker1 / 01-directory-structure.md
Last active May 26, 2024 13:59
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@max-vogler
max-vogler / TravellingSalesMan.kt
Created February 5, 2016 14:19
Solving the Travelling Salesman Problem with Kotlin and JGraphT (done for AdventOfCode day 9)
// use regular Java imports: Kotlin is 100% compatible to Java
import org.jgrapht.DirectedGraph
import org.jgrapht.Graph
import org.jgrapht.graph.SimpleDirectedGraph
/**
* A class defining an Edge in the Graph. The `val`s are automatically accessible via getters.
* Additionally, the annotation `data`automatically generates equals(), hashcode() and more.
*/
data class Edge(val source: String, val target: String, val duration: Int)
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active May 4, 2024 14:06
React Native Bridging Cheatsheet
@phit
phit / gradlesigning.md
Last active May 28, 2022 08:50
Gradle Signing for Dummies
@meain
meain / loading_messages.js
Last active May 22, 2024 17:59
Funny loading messages
export default [
"Reticulating splines...",
"Generating witty dialog...",
"Swapping time and space...",
"Spinning violently around the y-axis...",
"Tokenizing real life...",
"Bending the spoon...",
"Filtering morale...",
"Don't think of purple hippos...",
"We need a new fuse...",
@skydoves
skydoves / RecyclerViewPaginator.kt
Created March 16, 2018 02:44
RecyclerViewPaginator
class RecyclerViewPaginator(val recyclerView: RecyclerView,
val isLoading: () -> Boolean,
val loadMore: (Int) -> Unit,
val onLast: () -> Boolean = { true }): RecyclerView.OnScrollListener() {
private val threshold = 10
private var currentPage: Int = 0
init {
recyclerView.addOnScrollListener(this)
@alexforrester
alexforrester / Moshi Kotlin Codegen Example with Custom Adapter
Last active August 28, 2022 19:39
Moshi Kotlin Codegen Example with Custom Adapter
//app build.gradle
apply plugin: 'kotlin-kapt'
...
dependencies {
{
//Moshi Core
implementation "com.squareup.moshi:moshi:1.8.0"
//Moshi Codegen
@CodyBohn
CodyBohn / Maxis Loading Messages.txt
Last active May 29, 2024 14:02
Compiled list of loading messages from the Sims games
Abolishing Pedestrian Posturing
Abstracting Loading Procedures
Activating Deviance Threshold
Activating Hotel Staff
Activating Story Arc
Adapting Behavioral Model
Adding Hidden Agendas
Adjusting Acceptable Apparel
Adjusting Bell Curves
Adjusting Emotional Weights