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
/* Includes ------------------------------------------------------------------*/ | |
#include "DEV_Config.h" | |
#include "EPD.h" | |
#include "GUI_Paint.h" | |
#include "ImageData.h" | |
#include <stdlib.h> | |
// If this is enabled (set to 1), partial refresh doesn't work as expected, and | |
// the demo is a bit glitchy otherwise too./* Includes ------------------------------------------------------------------*/ |
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/bash | |
set -eu | |
hash1="$1" | |
for word in $(cat /usr/share/dict/words); do | |
if shasum -a 1 <(printf "%s\0%s" "$hash1" "$word") | grep '^00'; then | |
echo $word | |
fi | |
done |
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 <string.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <openssl/sha.h> | |
#include <stdlib.h> | |
// compile with gcc -lcrypto -std=c11 brute.c -o brute | |
// run with ./brute <prevhash> | |
static char lastHash[2 * SHA_DIGEST_LENGTH + 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/bash | |
for i in {1..1000}; do | |
x="$RANDOM""$RANDOM" | |
echo -n "$x " | |
echo -n "$x" | shasum -a 1 | |
done; |
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
// this doesn't work... I want to extract types from the process.env, and ensure they're required...! | |
// not an easy task it seems | |
function safeLoadEnv<T, K extends keyof T>(env: T, ...keys: Array<K>): Required<Pick<T, K>> { | |
// extension of https://stackoverflow.com/a/47232883 | |
function pick(obj: T, ...keys: Array<K>): Pick<T, K> { | |
const ret: Partial<Pick<T, K>> = {}; | |
const missing: any = []; | |
keys.forEach(key => { | |
if (!obj[key]) { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

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
# rough script to install docker-compose and setup ec2 user to use it. | |
# this is the pseudo-code equivalent of a shell script.. :) | |
# run stuff as root | |
# install docker and stuff and allow the ec2-user to run it | |
sudo yum install docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user | |
sudo yum install -y git |
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
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
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
#define _POSIX_C_SOURCE 200809 | |
#include <signal.h> | |
#include <stdatomic.h> | |
#include <unistd.h> | |
#include <pthread.h> | |
#include <sys/prctl.h> | |
#include <assert.h> | |
#include <sys/wait.h> | |
#include <stdio.h> | |
#include <stdbool.h> |
NewerOlder