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 | |
# NOTE: This script exports only one uid | |
key_pattern= | |
remote_host= | |
remote_path=/var/www/html/.well-known/openpgpkey/hu/ | |
for item in $(gpg --list-secret-keys --with-colons ${key_pattern:- } \ | |
| awk -F: '($1 == "sec" && $2 == "u") { print $5}'); do |
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
#define invoke(inst, meth, ...) (inst)->meth((inst), __VA_ARGS__) |
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 <cctype> | |
#include <cstdint> | |
#include <fstream> | |
#include <iostream> | |
#include <locale> | |
#include <algorithm> | |
int main(int argc, char **argv) | |
{ | |
std::locale::global(std::locale("")); |
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/sh | |
set -xe | |
gcc -o main main.c -lSDL2 |
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
pub struct SVG { | |
text: String, | |
height: usize, | |
width: usize, | |
} | |
const INDENT: &str = " "; | |
const XMLNS: &str = "http://www.w3.org/2000/svg"; | |
const XLINK: &str = "http://www.w3.org/1999/xlink"; |
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
use std::thread::sleep; | |
use std::time::{Duration, SystemTime, UNIX_EPOCH}; | |
#[derive(Debug, Copy, Clone)] | |
enum Cell { | |
Dead = 0, | |
Live = 1, | |
} | |
impl Cell { |
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
use std::thread::sleep; | |
use std::time::Duration; | |
// Add rand in the dependencies section of Cargo.toml | |
use rand::Rng; | |
#[derive(Debug, Copy, Clone)] | |
enum Cell { | |
Dead = 0, | |
Live = 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
# Uncomment -DDYN_PROCS if dynamic loading of OpenGL function is preferable over static linking | |
CFLAGS=-O2 -Wall -Wextra #-DDYN_PROCS | |
LDFLAGS=-lglfw -lGL | |
gradient: gradient.o | |
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ | |
%.o: %.c | |
$(CC) -o $@ -c $(CFLAGS) $^ |
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
735c735 | |
< for f in {/etc/,~/.}wgetpaste{.d/*,}.conf; do | |
--- | |
> for f in {/etc/,~/.}wgetpaste{.d/*,}.conf; do | |
739a740,747 | |
> # xdg locations override everything else | |
> if [[ -n "$XDG_CONFIG_HOME" ]]; then | |
> for f in $XDG_CONFIG_HOME/{wgetpaste/,wgetpaste/.,.,}wgetpaste{.d/*,}.conf; do | |
> if [[ -f $f ]]; then | |
> source "$f" || die "Failed to source $f" |
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
#ifndef MEMSWAP_H | |
#define MEMSWAP_H | |
static inline void | |
memswap(void *restrict aptr, void *restrict bptr, size_t len) | |
{ | |
register unsigned char *a = aptr; | |
register unsigned char *b = bptr; | |
register unsigned char t; | |
NewerOlder