Skip to content

Instantly share code, notes, and snippets.

View nicolas-martin's full-sized avatar

Nicolas Martin nicolas-martin

View GitHub Profile
@graelo
graelo / README.md
Last active September 9, 2024 11:06
Nvim 0.8 tree-sitter Python conceal

This highlights file should live in <nvim-conf>/after/queries/python/highlights.scm.

Please note that with neovim 0.8, for files which queries extend existing queries, you need to add ; extends at the top of the file (see [this discussion]).

Here is some Python file:

"""Test conceal."""
@adriang133
adriang133 / ToggleHDRCatalina.applescript
Last active May 3, 2021 13:22 — forked from lexrus/ToggleHDRCatalina.applescript
Workaround the HDR bug of macOS Catalina 10.15.4
#!/usr/bin/osascript
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
activate
delay 1
click menu item "Displays" of menu "View" of menu bar 1
@avafloww
avafloww / PhpJava.java
Last active June 13, 2024 07:36
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();