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
# /etc/udev/rules.d/99-xdm.rules | |
# Create a dev-dri-card0.device unit for xdm.service to wait on. | |
SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd" |
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
#include <inttypes.h> | |
#include <limits.h> | |
#include <stdbool.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define force_inline __attribute__((always_inline)) inline |
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
#!/usr/bin/env bash | |
# | |
# IMPORTANT: The HTTP authorization header must be found | |
# in ~/.openai in full, not just the API key. | |
# | |
# Usage: ./quizgpt.sh <windowtitle> <expertrole> | |
# | |
# Example: | |
# ./quizgpt.sh 'Online C quiz' 'a C programmer' | |
# |
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
/* | |
e e e e e | |
e m a n a t e m e t a n a m e | |
a a a a a | |
n n n n n | |
a a a a a | |
t t t t t | |
e e e e e | |
e m a n a t e m e t a n a m e | |
e e e e e |
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
#!/usr/bin/env bash | |
word_max=9 # Exclude words longer than this | |
nphrases=3 # Generate this many passphrases | |
defwords=4 # Default number of words/phrase | |
pls() { | |
local -i n=${#1} r=$2 | |
local s | |
printf -v s -- ' %s%*s%s\n' \ |
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
#include <stdio.h> | |
enum { | |
FOO = 1 << 0, | |
BAR = 1 << 1, | |
BYX = 1 << 2, | |
QUE = 1 << 3 | |
}; | |
#define maybe_signed(T, cond) __typeof__( \ |
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
#include <stdio.h> | |
#define sizeof(x) (!(#x[0]^0x27)?:sizeof(x)) | |
#define q(x) printf("%-7s\t%zu\n", #x, x) | |
#define p(x) q(sizeof(x)) | |
int main (void) | |
{ | |
char s[7], c; |
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
#include <stdio.h> | |
#define ___ putchar | |
#define __ sizeof | |
#define _ __func__ | |
int main( | |
void | |
){___(*(_+((*_>>(__(__(_))>> | |
4))&(*_>>__(_)))));___(*(_+((*_>>(__(__(_))>> | |
2))&(*_>>__(_)))));___(*(_+((*_>>(__(__(_))>> | |
1))&(*_>>__(_)))));___(*(_+((*_>>(__(__(_))>> |
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
/*----------------------------* | |
| s p o o k y m e s s a g e | | |
*----------------------------*/ | |
#include <stdio.h> | |
#include <string.h> | |
__typeof__(~ | |
sizeof("{%s, n%s}\n")) main | |
( __typeof__(~* | |
"")eof__, | |
__typeof__(* |
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
#include <cstdio> | |
int main() { | |
constexpr auto tautology{1ull << 63}; | |
if (tautology) | |
std::puts("raw value evaluates to true"); | |
if (static_cast<bool>(tautology)) | |
std::puts("bool conversion equals true"); |