Skip to content

Instantly share code, notes, and snippets.

View dubiouscript's full-sized avatar

dubiouscript

  • ./
View GitHub Profile
@dubiouscript
dubiouscript / bhttpd-tw.sh
Last active July 1, 2019 22:30
Internet Information BS (bash services;-)
# https://gist.github.com/dubiouscript/6c82fab69c731647bfe4d60231b90161
# https://georgik.rocks/cgi-server-bash-one-liner/#gzip
#
# get_request_header "Accept-Encoding" | grep -q -e "gzip" && set_response_header "Content-encoding" "gzip";
#
# encodeing_gzip() { get_request_header "Accept-Encoding"| grep -q -e "gzip" ; [ $? -eq 0 ] && gzip || cat ; }
#
# serve_file() {
@dubiouscript
dubiouscript / category-theory-study-materials.org
Created April 15, 2019 11:17 — forked from mbbx6spp/category-theory-study-materials.org
List of books/lecture series/courses/conference talks and practices used to learn about category theory, functional programming, and dependent types by a software developer in industry who has limited time to do this stuff with some suggestions on how to consume the material.

Category Theory and Functional Programming Study Materials

Acronyms/Terms

  • CT: Category Theory
  • FP: Functional Programming (typically meaning more pure functional programming)
  • TFP: Total Functional Programming
  • TDD: Type Driven Development (e.g. via Idris or Agda)
  • TT: Type Theory
  • PLT: Programming Language Theory
@dubiouscript
dubiouscript / server
Created February 22, 2019 15:17 — forked from mbbx6spp/server
ZOMG a bash powers HTTP web service that runs via the `socat` web app container like so: socat TCP4-LISTEN:8080 EXEC:/path/to/server/script
#!/usr/bin/env bash
# Purpose: Provide HTTP server that displays the current server date to
# validate the artifact structure and play with.
declare -a _http_responses=(
[200]="OK"
[201]="Created"
[202]="Accepted"
[204]="No Content"
[301]="Moved Permanently"
#!/usr/bin/env bash
# HTTP web service implemented in socat + bash
# Usage: socat -T 1 -d -d tcp-l:8080,reuseaddr,fork,crlf exec:./server
# Purpose: Provide an HTTP server that displays the current server date,
# to validate the artifact structure and play with it.
# Note: socat crlf option is translating all our \n to \r\n on output.
http_version="1.0"
declare -a _http_responses=(
@dubiouscript
dubiouscript / gist:34755353cd94760d8a0f5c468e747a59
Created February 14, 2019 15:04 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@dubiouscript
dubiouscript / snip.sh
Last active July 10, 2020 01:34 — forked from mgoellnitz/snip.sh
GitLab Snippet Command Line Tool
#!/bin/bash
#
# Copyright 2016-2017 Martin Goellnitz
#
# update gitlab api
# https://gist.github.com/dubiouscript/5553dce89497ffd9805dd0de16503e8d
# -dscript-
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@dubiouscript
dubiouscript / README.md
Created January 11, 2019 20:48 — forked from joyrexus/README.md
CLI proof-of-concept for explainshell

explainshell.com is a web app for intelligently displaying man page help text for a given command line.

This is helpful and convenient ... and anyone working from the command-line is going to want a CLI variant for obvious reasons.

There's been a number of requests for a CLI on explainshell's issue list.

In liue of a thin-client that queries a currently non-existing RESTful API

@dubiouscript
dubiouscript / imperative-env.sh
Created January 7, 2019 13:57 — forked from danbst/imperative-env.sh
Imperative nix-env rewrite (so it becomes declarative)
#!/usr/bin/env bash
statefile=~/.config/nixpkgs/declarative
action="$1"
package="$2"
mkdir -p $(dirname "$statefile")
touch "$statefile"
function update {
envExpr=~/.config/nixpkgs/declarative-env.nix
@dubiouscript
dubiouscript / monochord.md
Created January 1, 2019 11:37
Monochord: implementing a musical tunings library

First at all, falsehoods programmers believe about musical tuning:

  • Cโ™ฏ and Dโ™ญ are the same notes
  • C๐„ช and D are the same notes
  • Semitone is 100 cents wide
  • There's only 12 notes in the octave
    • There's only 24 notes
    • Okay, 31 notes
    • Come on, 72 notes per octave is enough for everybody
  • You're kidding, right?

Virtual Midi Janko Keyboard

The good thing about language-related subreddits is you can always tell people there about your hello world project, and the good thing about medium sized subreddits is your post might even be noticed.

So let's talk about mine one.

What