Skip to content

Instantly share code, notes, and snippets.

👀
Staring

Julian Ospald hasufell

👀
Staring
Block or report user

Report or block hasufell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tvlooy
tvlooy / unit.sh
Last active Jun 1, 2019
Bash test: get the directory of a script
View unit.sh
#!/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 Apr 18, 2019
Portable realpath(1) / readlink -f, written is portable POSIX C.
View realpath.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[]) {
@rosswd
rosswd / admin.md
Last active Jun 17, 2018
Vim cheatsheets
View admin.md

Administrative Commands

Runtime Commands

Path to runtime executable

:echo $VIMRUNTIME

Example Output

/usr/local/share/vim/vim74

@plentz
plentz / nginx.conf
Last active Sep 18, 2019
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ion1
ion1 / install-ghc.md
Last active Dec 13, 2017
Installing GHC under the home directory
View install-ghc.md

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.
You can’t perform that action at this time.