Skip to content

Instantly share code, notes, and snippets.

@devnoname120
devnoname120 / macos_docker_xorg_forwarding.md
Last active November 12, 2024 15:38
Xorg/X11 forwarding on macOS and docker

Xorg/X11 forwarding on macOS and docker

In order to run Xorg apps on macOS you will need to install xquartz and configure it:

brew install --cask --no-quarantine xquartz
defaults write org.xquartz.X11 nolisten_tcp -bool false
defaults write org.xquartz.X11 no_auth -bool false

mkdir -p ~/.xinitrc.d
@devnoname120
devnoname120 / aREADME.md
Last active August 8, 2024 12:27
fix-aliexpress-unsubscribe.user.js

How to install on Google Chrome

  1. Install the Tampermonkey extension.
  2. Do a right-click on the Tampermonkey icon and press Options.
  3. Click on Settings, and then in the General section change the Config mode to Advanced.
  4. In the Experiments section at the bottom of the page, change the Inject Mode to Instant.
  5. You can close this settings page now.
  6. Click on this link and press on Install in the Tampermonkey tab that just opened.
@devnoname120
devnoname120 / Calendar.getInstance.json
Last active April 28, 2024 22:09
XPrivacyLua hooks — Fake.DateTime
{
"script": [
{
"name": "Privacy.Calendar.getInstance",
"code": "function after(hook, param)\n local cal = param:getResult()\n cal:set(2024, 4, 27)\n param:setResult(cal)\n return true\nend\n"
}
],
"definition": [
{
"builtin": false,
@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 June 29, 2024 05:12
[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 November 6, 2024 08:49
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: