This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import signal | |
| import sys | |
| import threading | |
| _print = print | |
| def print(*args, **kwargs): | |
| pid = os.getpid() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Make Firefox the default PDF application for Gnome | |
| xdg-mime default firefox.desktop application/pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![allow(unused_macros)] | |
| #[macro_export] | |
| macro_rules! do_syscall0 { | |
| ($sys:expr) => ({ | |
| asm!( | |
| "svc $0" | |
| : | |
| : "i"($sys) | |
| : "memory" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| foo=$(mktemp) | |
| cat > "$foo" <<EOF | |
| target remote :1234 | |
| add-symbol-file build/kernel.elf 0x80000 | |
| define fn | |
| si |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/bin/gen-rpi3-config.py b/bin/gen-rpi3-config.py | |
| index 0ea5f68..c4039eb 100755 | |
| --- a/bin/gen-rpi3-config.py | |
| +++ b/bin/gen-rpi3-config.py | |
| @@ -5,7 +5,9 @@ import sys | |
| import subprocess | |
| ROOT = os.path.abspath(os.path.dirname(__file__)) | |
| -READELF = os.path.join(ROOT, "aarch64-readelf") | |
| +# READELF = os.path.join(ROOT, "aarch64-readelf") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Imagine having to run an emulator that composites once for X11 then gets | |
| # sent over VNC to finally by composited again by the user's host machine. Lunacy! | |
| # | |
| # This script has been written for macOS but should run just as well on most Linux distros. | |
| # | |
| # -gwgg | |
| set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define QUINE(x) const char *the_code = #x; x | |
| QUINE(void main(int argc, char **argv) { | |
| printf("%s\n", "#include<stdio.h>\n#define QUINE(x) const char *the_code = #x; x"); | |
| printf("QUINE(%s)\n", the_code); | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.querySelectorAll('video').forEach(v => v.playbackRate = 16) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * SomeActivity is some heavyweight object that is very costly if leaked. | |
| */ | |
| public class SomeActivity extends Activity implements SomeListenerInterface { | |
| /* | |
| * MyListener is a minimal implementation of the necessary interfaces that forwards all of its | |
| * method calls to the outer class if the parent has not been GC'd. | |
| * | |
| * Crucially, because this listener only holds a weak reference, it won't prevent SomeActivity from being GC'd. And because MyListener is a small object, it may still be leaked but it's a matter of bytes being leaked rather than megabytes if an Activity were leaked. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation] | |
| "RealTimeIsUniversal"=dword:00000001 |
NewerOlder