Skip to content

Instantly share code, notes, and snippets.

@devnoname120
devnoname120 / Locale.getDefault.json
Last active March 14, 2024 21:50
XPrivacyLua Pro — Override system locale/language — java.util.Location.getDefault()
{
"script": [
{
"name": "Privacy.Locale.getDefault",
"code": "function after(hook, param)\n local myLocale = luajava.newInstance(\"java.util.Locale\", \"fr\", \"FR\")\n\tparam:setResult(myLocale)\n\treturn true\nend"
}
],
"definition": [
{
"builtin": false,
@devnoname120
devnoname120 / temp-mail-fake-loading-bypass.user.js
Last active February 23, 2024 12:08
Userscript — temp-mail.org fake loading bypass
// ==UserScript==
// @name temp-mail.org fake loading bypass
// @namespace devnoname120
// @version 2024-02-23
// @description Get rid of the fake 7s loading time that temp-mail.org puts on mailboxes
// @author devnoname120
// @match *://temp-mail.org/*
// @icon https://temp-mail.org/images/favicon.ico
// @run-at document-end
// @grant none
@devnoname120
devnoname120 / README.md
Last active January 9, 2024 14:30
Karabiner-Elements — Microsoft Teams — Don't quit when pressing cmd-w on main window

Note: you need to add /Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_console_user_server in System SettingsPrivacy & SecurityAccessibility+

@devnoname120
devnoname120 / powerpoint-force-reapply-note-master.vba
Created January 15, 2023 14:40
PowerPoint — Force to reapply the master note to all the slides
Sub RestoreNotesPages()
Dim oSld As Slide
Dim oShp As Shape
Dim lIdx As Long
On Error Resume Next
With ActivePresentation
For Each oSld In .Slides
With oSld.NotesPage.Shapes
@devnoname120
devnoname120 / ruby_remove_accents.rb
Last active January 12, 2024 14:04
[Ruby] Remove accents from UTF-8 string
class String
# See https://www.unicode.org/versions/Unicode15.0.0/UnicodeStandard-15.0.pdf#page=355
COMBINING_DIACRITICS = [*0x1DC0..0x1DFF, *0x0300..0x036F, *0xFE20..0xFE2F].pack('U*')
def removeaccents
self
.unicode_normalize(:nfd) # Decompose characters
.tr(COMBINING_DIACRITICS, '')
.unicode_normalize(:nfc) # Recompose characters
end
@devnoname120
devnoname120 / Accord du participe passé d'un verbe pronominal.md
Last active March 9, 2022 16:29
French grammar — Accord du participe passé d'un verbe pronominal

ACCORD :

  1. Avec le COD placé avant le verbe : verbes pronominaux réfléchis / réciproques + « s'arroger ».
  • « Ma mère s'est blessée en coupant le pain. » (Ma mère a blessé qui ? Ma mère.)
  • « Ma sœur s'est donné la peine d'aider ces enfants. » (Ma sœur a donné quoi ? La peine (COD placé après le verbe).)
  • « Les fiancés se sont écrit pendant de longs mois » (Ils se sont écrit quoi ? Une lettre (à priori).)

👌  Ici on voit que le sujet a souvent valeur de COD (mais pas toujours sinon ça serait trop facile).

Pour info, les verbes suivants ont jamais de COD (mais ça sert à rien de retenir) : se plaire, se complaire, se déplaire, se rire, se sourire, se succéder, se ressembler, se parler, se nuire, se survivre, se suffire, se convenir.

@devnoname120
devnoname120 / My macOS setup.md
Last active March 4, 2024 04:45
My macOS setup

ℹ️ Enable iCloud end-to-end encryption:

  • Nobody knows that, but iCloud actually supports end-to-end encryption (see “Advanced Data Protection for iCloud”) but it's disabled by default. If you care about data privacy, you should turn it on.
    • System settingsApple IDiCloud → Set Advanced Data Protection to On.
    • System settingsApple IDiCloud → Disable Access iCloud Data on the Web.
  • It supports almost all the native Apple apps, with the notable exceptions of iCloud Mail, Contacts, and Calendars. See official data protection matrix for more info.

Quality of life improvements

Mouse:

@devnoname120
devnoname120 / tiling_window_managers.md
Last active January 8, 2021 12:51
The quest for a decent tiling window manager on Windows and Mac OS

Windows:

  • workspacer: Fast (C#) and close to i3, but really clunky.
  • dwm win: Pretty decent! Feels snappy but top bar is lagging for some reason ¯\_(ツ)_/¯
  • HashTWM: ?

(considered but bad)

  • MaxTo: Rigid manually-defined layouts, bad shortcuts.
  • AquaSnap: No virtual workspaces, bad shortcuts.
  • FancyZones: Only mouse, rigid, no virtual workspaces.
@devnoname120
devnoname120 / aReadme.md
Last active November 7, 2019 08:03
010 Hex Editor Template for .psv

.psv Structure viewer

This little specification allows to view the structure of .psv files in 010 Editor.

screenshot

This allows you to get a quick overview of the keys, the signature, and the sha256 hash.

In order to use this specification you need to: