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 <iostream> | |
#include "borrow_checker.hpp" | |
int main() | |
{ | |
auto i = 42; | |
// borrow `i` under name `ref` | |
borrow_var(ref, i) |
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 python | |
import sys | |
import pyautogui | |
from datetime import datetime, timedelta | |
pyautogui.FAILSAFE = False | |
def move_rel(dx, dy, dur): | |
pyautogui.moveRel(dx, dy, dur, pyautogui.easeInQuad) |
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 python | |
import sys | |
import pyautogui | |
from datetime import datetime, timedelta | |
def move_rel(dx, dy, dur): | |
pyautogui.moveRel(dx, dy, dur, pyautogui.easeInQuad) | |
def square(side, dur): |
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> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#ifdef _MSC_VER | |
#include <intrin.h> /* for rdtscp and clflush */ | |
#pragma optimize("gt",on) | |
#else | |
#include <x86intrin.h> /* for rdtscp and clflush */ | |
#endif |
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
root@ubuntu:~# ./a.out | |
Reading 40 bytes: | |
Reading at malicious_x = 0xffffffffffdfeba8... Unclear: 0x54='T' score=980 (second best: 0x02 score=706) | |
Reading at malicious_x = 0xffffffffffdfeba9... Unclear: 0x68='h' score=929 (second best: 0x02 score=709) | |
Reading at malicious_x = 0xffffffffffdfebaa... Unclear: 0x65='e' score=973 (second best: 0x02 score=786) | |
Reading at malicious_x = 0xffffffffffdfebab... Unclear: 0x20=' ' score=928 (second best: 0x02 score=784) | |
Reading at malicious_x = 0xffffffffffdfebac... Unclear: 0x4D='M' score=746 (second best: 0x02 score=730) | |
Reading at malicious_x = 0xffffffffffdfebad... Unclear: 0x61='a' score=978 (second best: 0x02 score=749) | |
Reading at malicious_x = 0xffffffffffdfebae... Success: 0x67='g' score=39 (second best: 0x02 score=17) | |
Reading at malicious_x = 0xffffffffffdfebaf... Unclear: 0x69='i' score=972 (second best: 0x02 score=748) |
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/avahi-utils/avahi-browse.c b/avahi-utils/avahi-browse.c | |
index 4101895..ab56eaa 100644 | |
--- a/avahi-utils/avahi-browse.c | |
+++ b/avahi-utils/avahi-browse.c | |
@@ -375,8 +375,12 @@ static void browse_service_type(Config *c, const char *stype, const char *domain | |
service_browser_callback, | |
c))) { | |
- fprintf(stderr, _("avahi_service_browser_new() failed: %s\n"), avahi_strerror(avahi_client_errno(client))); | |
- avahi_simple_poll_quit(simple_poll); |
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 | |
set -euo pipefail | |
[[ $# == 0 || $1 == '-h' ]] && { | |
bn=$(basename $0) | |
echo "$bn: list affinities of process threads" | |
echo "usage: $bn [pid|-p name]" | |
exit | |
} |
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
$ cat myasmfile.S | |
.global MyAwesomeBinary, MyAwesomeBinaryEnd | |
.data | |
.align 8 | |
MyAwesomeBinary: | |
.incbin "file.txt" | |
MyAwesomeBinaryEnd: | |
.zero 1 | |
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 | |
pip list --outdated --format=legacy | \ | |
sed -E 's/^(\S+)(.*)$/\1/' | \ | |
xargs pip install -U |
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 python3 | |
from pprint import pprint | |
from copy import deepcopy | |
import functools | |
import sys | |
import re | |
def hash_game(game): | |
return game.get_hash() |
NewerOlder