Skip to content

Instantly share code, notes, and snippets.

View hasufell's full-sized avatar
👀
Staring

Julian Ospald hasufell

👀
Staring
View GitHub Profile
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 4, 2024 11:33
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@Icelandjack
Icelandjack / Constraints.org
Last active April 2, 2024 20:22
Type Classes and Constraints

Reddit discussion.

Disclaimer 1: Type classes are great but they are not the right tool for every job. Enjoy some balance and balance to your balance.

Disclaimer 2: I should tidy this up but probably won’t.

Disclaimer 3: Yeah called it, better to be realistic.

Type classes are a language of their own, this is an attempt to document features and give a name to them.

@tvlooy
tvlooy / unit.sh
Last active February 4, 2024 04:20
Bash test: get the directory of a script
#!/bin/bash
function test {
MESSAGE=$1
RECEIVED=$2
EXPECTED=$3
if [ "$RECEIVED" = "$EXPECTED" ]; then
echo -e "\033[32m✔︎ Tested $MESSAGE"
else
@geoff-nixon
geoff-nixon / realpath.c
Last active April 18, 2019 03:47
Portable realpath(1) / readlink -f, written is portable POSIX C.
// So, this used to be a really terrible shell script I wrote years ago.
// Its was buggy in all kinds of corner cases, If you really need it, check
// out the revision history. Otherwise, if you have a functioning C compiler,
// you *really* should be using the system's realpath(3) function to do this.
// Here's a bare-bones version. To compile, just: `cc realpath.c -o realpath`
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
@miguelmota
miguelmota / README.md
Last active March 16, 2024 12:52
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@pascalpoitras
pascalpoitras / config.md
Last active April 28, 2024 23:12
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@rosswd
rosswd / admin.md
Last active October 29, 2021 17:35
Vim cheatsheets

Administrative Commands

Runtime Commands

Path to runtime executable

:echo $VIMRUNTIME

Example Output

/usr/local/share/vim/vim74

@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@quchen
quchen / trolling_haskell
Last active February 24, 2024 01:30
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now
@ion1
ion1 / install-ghc.md
Last active December 13, 2017 21:01
Installing GHC under the home directory

Installing GHC under the home directory

  1. Install stack.
  2. Run stack setup as a normal user. This will install GHC for you (under ~/.stack).
  3. Run stack ghci to start ghci. Please see the rest of the page linked above on how to use stack to create and build projects.