I hereby claim:
- I am dhhdev on github.
- I am dhh (https://keybase.io/dhh) on keybase.
- I have a public key whose fingerprint is C989 405D 350B 3DCB 1598 B202 9434 9D73 2CDB C9D6
To claim this, I am signing this object:
# Making aliases for CLI to run flatpak sandboxes. | |
# I use zsh, but should be useable in bash as well. | |
# Requires find, basename | |
FLATPAK_ALIAS_PREFIX="fp" | |
FLATPAK_EXPORTS_PATH="/var/lib/flatpak/exports/bin" | |
FLATPAK_LIST=($(find $FLATPAK_EXPORTS_PATH -type l)) | |
for FLATPAK_EXEC in "${FLATPAK_LIST[@]}" |
#include <stdio.h> | |
#include <stdlib.h> | |
#define PROGRAM_NAME "dst" | |
#define AUTHOR "Daniel H. Hemmingsen" | |
typedef enum {FALSE, TRUE} BOOLEAN; | |
/* | |
* distance = speed * time |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef enum {FALSE, TRUE} BOOLEAN; | |
void usage(char *program) | |
{ | |
printf("Usage:\n"); | |
printf("\tExample: %s 0 50 0.6\n\n", program); | |
printf("First argument is moment. (kgm)\n"); |
/* | |
* Fibonacci squence between start and end term. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void) | |
{ | |
int a = 0; |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
# Today, as day-of-year (1-366) | |
TODAY=$(date -j +"%j") | |
# Christmas day, in d-B-y format converted to days | |
CHRISTMAS=$(date -jf "%d-%B-%y" "25-DEC-16" +"%j") | |
echo "There are $(($CHRISTMAS - $TODAY)) days until Christmas." |
# | |
# ~/.oh-my-zsh/custom/gcc.zsh | |
# | |
# gcc wrapper for compiling ansi | |
# Usage: compile_ansi [output][files] | |
compile_ansi() | |
{ | |
OUTPUT=$1 | |
shift |
#!/bin/bash | |
# | |
# ~/.tools/tmux-teacher.sh | |
# | |
# Author: Daniel H. Hemmingsen <[email protected]> | |
# Usage: tmux-teacher.sh session-name /path/to/start/from" | |
# | |
TEACHER_GROUP="teacher" |
#!/bin/bash | |
# | |
# ~/.tools/tmux.sh | |
# | |
# Author: Daniel H. Hemmingsen <[email protected]> | |
# Usage: tmux.sh session-name /path/to/start/from" | |
# | |
# Could make a simple check, with groups or something. | |
# To see if the students should get write access or not. |
#!/bin/bash | |
# Save the file in /usr/local/bin/ and call it whatever you like. | |
# I simply call mine: compile | |
# Now I can compile a .c file with compile test.c command. | |
if [ -z "${1}" ]; then | |
echo "We can't take over the world, without compiling a file!" | |
else | |
if [ -z "${2}" ]; then |