Skip to content

Instantly share code, notes, and snippets.

View nmaupu's full-sized avatar

Nicolas Maupu nmaupu

View GitHub Profile
@anoopmaddasseri
anoopmaddasseri / Generic StartActivityForResult contract - JAVA
Last active December 5, 2022 22:13
Generic StartActivityForResult contract - JAVA & Kotlin
ActivityResultLauncher<Intent> mStartForResult = registerForActivityResult(new StartActivityForResult(),
new ActivityResultCallback<ActivityResult>() {
@Override
public void onActivityResult(ActivityResult result) {
if (result.getResultCode() == Activity.RESULT_OK) {
Intent intent = result.getIntent();
// Handle the Intent
}
}
});
@laszlomiklosik
laszlomiklosik / curl send multi-line JSON payload example
Created July 24, 2019 08:28
curl request with inline multiline JSON payload
curl -X PATCH http://localhost:8080/Users/7234e4cd-eb7f-4a96-953e-3bd11439efcf -H 'Content-Type: application/json' -d @- <<BODY
{
"emails": [
"a@b.com",
"b@c.com"
]
}
BODY
@65c22
65c22 / tuto_atmosphere_fr.md
Last active August 1, 2023 14:39
Tutoriel - Installer Atmosphère sur votre Nintendo Switch

Tutoriel - Comprendre et utiliser le CFW Atmosphère sur Nintendo Switch (+bonus)

Atmosphère est un CFW (Custom FirmWare - Logiciel modifié) opensource avec un développement très active. Son nom n'a pas été choisi par hazard, effet les developpeurs ont découpés le code en plusieurs couches (comme celle de l'atmosphère), vous n'allez pas tout comprendre mais vous allez pouvoir retenir les quelques features les plus importantes pour une utilisation lambda.

Les couches d'Atmosphère

  • Fusée - le custom bootloader, c'est la première couche lors de l'amorçage du CFW, elle permet le chargement des fichiers KIPs, le chargement d'un kernel personalisé... La configuration de ce composant se situe dans le fichier atmosphere/BCT.ini

  • Exosphère - le custom secure monitor, c'est une réplimentation complète de la TrustZone du firmware de la Switch, permettant la récuperation d'une multitude d'informations pour les Homebrews par exemple.

diff --git a/src/rxvtfont.C b/src/rxvtfont.C
index 4b266bd..99130fa 100644
--- a/src/rxvtfont.C
+++ b/src/rxvtfont.C
@@ -1326,31 +1326,7 @@ bool
rxvt_font_xft::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &careful) const
{
careful = false;
-
- if (!XftCharExists (term->dpy, f, unicode))
@kjantzer
kjantzer / previous-git-tag.sh
Created March 2, 2015 20:01
Get Previous Git Tag (the one before the latest tag)
# http://stackoverflow.com/a/28818420/484780
git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`
bind-key C-b send-prefix
bind-key C-o rotate-window
bind-key C-z suspend-client
bind-key Space next-layout
bind-key ! break-pane
bind-key " split-window
bind-key # list-buffers
bind-key $ command-prompt -I #S "rename-session '%%'"
bind-key % split-window -h
bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window
@ejdyksen
ejdyksen / patch-edid.md
Last active April 6, 2024 15:59
A script to fix EDID problems on external monitors in macOS

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):

@hwei
hwei / cavesh3.c
Created January 29, 2012 13:24
cave sh3 driver for mame 0144u6 mame plus r4973
/*
Cave CV1000 hardware
Games by Cave ID number:
CA011 Mushihime-Sama
CA012 Ibara
CA012B Ibara Kuro Black Label
CA013 Espgaluda II