This file contains 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/bash | |
version=1.68.0 | |
echo "Building boost $version..." | |
set -eu | |
toolchain=$PWD/toolchain | |
if [ ! -d "$toolchain" ]; then | |
echo "Building toolchain..." |
This file contains 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/bash | |
set -eu | |
package_name=$1 | |
if [ "$package_name" == "all" ]; then | |
for p in `ls ports`; do | |
echo "-----------------------------------" | |
echo "$p" | |
echo "-----------------------------------" |
This file contains 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
$if Bash | |
set show-all-if-ambiguous on | |
# History search. | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
"\e[C": forward-char | |
"\e[D": backward-char |
This file contains 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
PS1="\[\e[1;33m\]\w\$\[\e[0m\] " | |
PS1="\[\e]0;\u@\h: \w\a\]$PS1" |
This file contains 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
// cc -mrdrnd rdrand.c -o rdrand && ./rdrand | head | |
#include <stdio.h> | |
void main() { | |
while (1) { | |
unsigned long long v; | |
int i = __builtin_ia32_rdrand64_step(&v); | |
printf("%d %#8llx\n", i, v); | |
} |
This file contains 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
/* gpiod.c - gpio tools | |
* | |
* Copyright 2021 The Android Open Source Project | |
* | |
* TODO: gpiomon | |
USE_GPIODETECT(NEWTOY(gpiodetect, ">0", TOYFLAG_USR|TOYFLAG_BIN)) | |
USE_GPIOFIND(NEWTOY(gpioinfo, "", TOYFLAG_USR|TOYFLAG_BIN)) | |
USE_GPIOGET(NEWTOY(gpioget, "<2l", TOYFLAG_USR|TOYFLAG_BIN)) | |
USE_GPIOINFO(NEWTOY(gpiofind, "<1>1", TOYFLAG_USR|TOYFLAG_BIN)) |
This file contains 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/toys/other/i2ctools.c b/toys/other/i2ctools.c | |
index ad296adf..95280988 100644 | |
--- a/toys/other/i2ctools.c | |
+++ b/toys/other/i2ctools.c | |
@@ -17,6 +17,7 @@ USE_I2CDETECT(NEWTOY(i2cdetect, ">3aFlqry[!qr]", TOYFLAG_USR|TOYFLAG_SBIN)) | |
USE_I2CDUMP(NEWTOY(i2cdump, "<2>2fy", TOYFLAG_USR|TOYFLAG_SBIN)) | |
USE_I2CGET(NEWTOY(i2cget, "<2>3fy", TOYFLAG_USR|TOYFLAG_SBIN)) | |
USE_I2CSET(NEWTOY(i2cset, "<4fy", TOYFLAG_USR|TOYFLAG_SBIN)) | |
+USE_I2CTRANSFER(NEWTOY(i2ctransfer, "<2vfy", TOYFLAG_USR|TOYFLAG_SBIN)) | |
This file contains 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
// https://adventofcode.com/2023/day/1 | |
// as -o one.o one.s && ld -o one one.o | |
// echo -e "1abc2\npqr3stu8vwx\na1b2c3d4e5f\ntreb7uchet\n" | ./one | |
.equ __NR_read, 63 | |
.equ __NR_write, 64 | |
.equ __NR_exit_group, 94 |
This file contains 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/src/readelf.c b/src/readelf.c | |
index a79906f5..6fd877ec 100644 | |
--- a/src/readelf.c | |
+++ b/src/readelf.c | |
@@ -686,6 +686,27 @@ do_os_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, | |
return -1; | |
return 1; | |
} | |
+ | |
+ if (NAMEEQUALS(name, "Android") && type == 1 && descsz >= 4) { |