Skip to content

Instantly share code, notes, and snippets.

@devnoname120
devnoname120 / My macOS setup.md
Last active April 29, 2024 10:48
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 / 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 / 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 / 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 / gist:a1f1f68f3c55e5ea13cf102c1d81d021
Created December 31, 2016 18:01
Yifanlu's explanations on why CMake is better than a simple Makefile
<yifanlu[m]> okay I'll engage in this one last time
<yifanlu[m]> evolution of build systems (for C)
<yifanlu[m]> shell scripts => makefiles => automake => autoconf/cmake
<yifanlu[m]> saying makefiles are better is like saying the model t is better because it gets you from point a to point b with no issues
<yifanlu[m]> while missing all the advances people made for a couple of decades
<yifanlu[m]> "but my ford fiesta is so complicated. I don't understand how it works!"
<yifanlu[m]> I agree autoconf/cmake are not perfect systems. and they are more painful to write/maintain.
<yifanlu[m]> but the idea is at some point you will run into a wall
<yifanlu[m]> "oh shit how do I do this"
<yifanlu[m]> and you have to hack together a solution
@devnoname120
devnoname120 / gist:a565bea1b7f38393f220ec34f82ed6ba
Last active October 13, 2023 14:07
Extra PS Vita error codes
0x80010016 = subdirectory limit reached
0x80101104 = trying to install a VPK that has a corrupted entry in the vita db (edit ur0:/shell/db/app.db to get rid of it (you can use https://anthe.studio/bubblestudio/), and delete the ux0:/app/thebrokenapp folder)
0x8010111C = head.bin missing from package being promoted
0x8010113D = trying to install a package that has livearea images that were not run through pngquant
C0-11278-9 = cannot delete bubble (why?)
C1-6775-5 = launching unsigned app from official firmware
C2-12828-1 = Uncaught exception (abort() called). Happens in normal use when the memory card has corrupted sectors.
@devnoname120
devnoname120 / aREADME.md
Last active October 13, 2023 14:06
All vita 3.60 NIDs of User and Kernel exports

DB Lookup

Overview

This file is a reference database of every exported functions on a PS Vita running firmware retail 3.60.

Why?

This is helpful to create db.yml tools. For example, I can make sure that every NID of the vitasdk actually exists. I can also use this to find the library and module corresponding to functions in a NID list.

@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