Skip to content

Instantly share code, notes, and snippets.

View carlosezam's full-sized avatar

Carlos Ezam carlosezam

  • Análisis móvil - Programación
View GitHub Profile
@carlosezam
carlosezam / Git SSH.md
Last active August 30, 2025 14:29
SSH

Generate SSH key

Generate a new SSH key

ssh-keygen -t ed25519 -C "your_email@example.com"

if the system doesn't support Ed25519

ssh-keygen -t rsa -b 4096 -C "your_email@youremail.com"
@rponte
rponte / git-revert-multiple-commits.sh
Created September 25, 2019 16:07
Git: reverting a range of commits
##
# Reverting a range of commits
#
# git --pretty=oneline --abbrev-commit older_commit..newer_commit # not includes the oldest commit
# git --pretty=oneline --abbrev-commit older_commit^..newer_commit # includes the oldest commit
##
# just to be sure about the commits, list them
git log --pretty=oneline --abbrev-commit 1f80548^..4b293d5
@Razeeman
Razeeman / Singletons.md
Last active February 23, 2025 03:15
Thread safe singleton implementations in java and kotlin.

Java

Not thread safe.

class SimpleSingleton {
    private static SimpleSingleton sInstance;
  
    private SimpleSingleton() {}
 
@Yousha
Yousha / .gitattributes
Last active February 13, 2024 07:32
.gitattributes for Android(Java/C++) developers.
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@oldergod
oldergod / XmlOrJsonConverterFactory.java
Last active July 6, 2023 23:48
Retrofit: Xml or Json converter
public class XmlOrJsonConverterFactory extends Converter.Factory {
final Converter.Factory xml = SimpleXmlConverterFactory.create();
final Converter.Factory gson = GsonConverterFactory.create();
@Override
public Converter<ResponseBody, ?> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
// Retrofit gives us all the annotations so we just need to check
for (Annotation annotation : annotations) {