Skip to content

Instantly share code, notes, and snippets.

Avatar

Noa coolreader18

View GitHub Profile
@coolreader18
coolreader18 / segfault.py
Last active Jul 27, 2022
CPython segfault in 5 lines of code
View segfault.py
class E(BaseException):
def __new__(cls, *args, **kwargs):
return cls
def a(): yield
a().throw(E)
View anki-official-binary-pkg_2.1.53.patch
diff --git a/.SRCINFO b/.SRCINFO
index c8855a5..55afe04 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = anki-official-binary-bundle
pkgdesc = The official binary shipped with the tested versions of the dependent libraries.
- pkgver = 2.1.49
+ pkgver = 2.1.53
pkgrel = 1
View keybase.md

Keybase proof

I hereby claim:

  • I am coolreader18 on github.
  • I am coolreader18 (https://keybase.io/coolreader18) on keybase.
  • I have a public key whose fingerprint is B688 D126 43E7 9125 3099 63C3 7F9F 7DB1 768C 59CF

To claim this, I am signing this object:

@coolreader18
coolreader18 / dl_google_solitaire.sh
Last active Nov 1, 2021
git clone https://gist.github.com/c1a14e212679dd38927dcb2cf7b5500d google_solitaire && cd google_solitaire && ./dl_google_solitaire.sh
View dl_google_solitaire.sh
#!/bin/bash
cd "$(dirname "$0")"
wget -B https://www.google.com/logos/fnbx/solitaire/ -x -nH --cut-dirs 3 -i files.txt -nv
mv standalone*.html index.html
rm -rf files.txt dl_google_solitaire.sh .git
View strlen_bench.rs
use criterion::*;
use rand::distributions::{Standard, Uniform};
use rand::Rng;
#[inline]
fn len_is_ascii(s: &str) -> usize {
if s.is_ascii() {
s.len()
} else {
s.chars().count()
View nouveau_panic.txt
Apr 11 23:41:29 archlinux kernel: CPU: 2 PID: 7 Comm: kworker/u32:0 Tainted: G W 5.11.13-arch1-1 #1
Apr 11 23:41:29 archlinux kernel: Hardware name: ASUSTeK COMPUTER INC. TUF Gaming FX505DU_TUF505DU/FX505DU, BIOS FX505DU.310 12/24/2019
Apr 11 23:41:29 archlinux kernel: Workqueue: events_unbound async_run_entry_fn
Apr 11 23:41:29 archlinux kernel: RIP: 0010:g84_bar_flush+0xfa/0x110 [nouveau]
Apr 11 23:41:29 archlinux kernel: Code: 8b 40 10 48 8b 78 10 4c 8b 6f 50 4d 85 ed 75 03 4c 8b 2f e8 b8 4a 21 f3 4c 89 ea 48 c7 c7 70 c2 9e c1 48 89 c6 e8 26 4d 59 f3 <0f> 0b eb a8 e8 8d 2d 5e f3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90
Apr 11 23:41:29 archlinux kernel: RSP: 0018:ffffb53a8010f950 EFLAGS: 00010082
Apr 11 23:41:29 archlinux kernel: RAX: 0000000000000000 RBX: ffff9caf44792800 RCX: ffff9cb24f298be8
Apr 11 23:41:29 archlinux kernel: RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff9cb24f298be0
Apr 11 23:41:29 archlinux kernel: RBP: ffff9caf44901648 R08: ffffffffb5e5b9c0 R09: 00000000b65f94cf
Apr
View gmagik.py
#!/usr/bin/env python3
import PIL.Image
from PIL import ImageSequence
import wand.image
from io import BytesIO, RawIOBase
def gmagik(gif: PIL.Image.Image, out: RawIOBase):
total = gif.n_frames
View frame::run.S
rustpython_vm::frame::ExecutingFrame::run:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 216
mov r14, rdx
mov r15, rsi
View Frame::execute_instruction.S
rustpython_vm::frame::ExecutingFrame::execute_instruction:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 600
mov r12, rdx
mov rbp, rsi
View remote.ino
#include <IRremote.h>
const int RECV_PIN = 7, LED_PIN = 3;
IRrecv irrecv(RECV_PIN);
decode_results results;
unsigned long key_value = 0;
void setup() {
Serial.begin(9600);