Skip to content

Instantly share code, notes, and snippets.

View muhammedesadcomert's full-sized avatar
🎯
Focusing

Muhammed Esad Cömert muhammedesadcomert

🎯
Focusing
View GitHub Profile
@cxyxlxdm
cxyxlxdm / GridSpacingItemDecoration.md
Last active April 19, 2024 08:43
Add column spacing in RecyclerView with GridLayoutManager

Android Recyclerview GridLayoutManager column spacing Here is the question, the first answer does not work well in my project,and it makes the spacing bigger between item and item. the second answer is quite perfect.But if RecyclerView has headers,it does not work well. Then I fixed it.

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
@lopspower
lopspower / README.md
Last active June 22, 2024 03:58
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

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 21, 2024 21:39
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@turbo
turbo / std.md
Last active May 24, 2024 16:55
Git Commit Message Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
  • The body copy must be wrapped at 72 columns
  • The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.
@JoseAlcerreca
JoseAlcerreca / Event.kt
Created April 26, 2018 10:25
An event wrapper for data that is exposed via a LiveData that represents an event.
/**
* Used as a wrapper for data that is exposed via a LiveData that represents an event.
*/
open class Event<out T>(private val content: T) {
var hasBeenHandled = false
private set // Allow external read but not write
/**
* Returns the content and prevents its use again.
@madkoding
madkoding / pair-dual-boot-bluetooth.md
Last active June 18, 2024 12:18
Pairing bluetooth devices in dual boot with Linux Ubuntu and Windows 10/11

Pairing Bluetooth Devices in Dual Boot with Linux Ubuntu and Windows 10/11

Introduction

This guide provides updated instructions for pairing Bluetooth devices (such as keyboards or mice) in a dual-boot environment with Linux Ubuntu and Windows 10/11, incorporating community feedback and suggestions.

Instructions

1. Pair in Linux First

  • Pair your Bluetooth device in Linux. This is crucial to ensure the LinkKey remains consistent.
  • Note: Do not re-pair the device in Linux after completing the pairing in Windows.
@Darkere
Darkere / gist:9e2ebda80a92a91d9257cfc2bcc016a5
Last active April 8, 2024 02:05
Finding and editing chunks with NBT Explorer

Finding and editing chunks with NBT Explorer

Download: https://github.com/jaquadro/NBTExplorer/releases

Alternatively NBT Studio is much faster and cleaner but works the same way https://github.com/tryashtar/nbt-studio/releases/

1. Figure out which chunk you are going for.

1.a If you are crashing due to an entitiy or tileentity the crashlog might contain the exact coordinates

1.b If you have a waypoint there for example checking your map files can be helpful

1.c If your player is in the same chunk you can look up your players position

@dellisd
dellisd / Test.kt
Created June 9, 2022 16:37
Explicit Backing Fields
class Test {
val names: List<String>
field: MutableList<String> = mutableListOf<String>()
fun doThing() {
names.add("Hello!")
}
}
fun main() {