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
@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)
@zchee
zchee / actionlist.vim
Last active May 16, 2025 16:02
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@tracker1
tracker1 / 01-directory-structure.md
Last active May 3, 2025 04:36
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
@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);