Skip to content

Instantly share code, notes, and snippets.

Avatar

Noa coolreader18

View GitHub Profile
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 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);
View js.py
import a
import functools
ready = object()
go = object()
def run(coro, *, payload=None, error=False):
send = coro.throw if error else coro.send
View mt19937ar.rs
use rand;
use rand_core;
use rand::Rng;
/*
A C-program for MT19937, with initialization improved 2002/1/26.
Coded by Takuji Nishimura and Makoto Matsumoto.
Before using, initialize the state by using init_genrand(seed)
@coolreader18
coolreader18 / segfault.py
Last active May 9, 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)