Skip to content
View gist:2b22b48522e4613b710e
  1. General Background and Overview
View brew2nix.md

brew2nix

Does nix have most of the software i've installed via brew?

list installed brew packages:

brew list -l | cut -d' ' -f 12 | sort > brew
View hyperfileserver.md

Hyper File Server

Assuming a large directory with many sub-directories and varying file-types are expected to be available over HTTP.

This program should serve these files under the following requirements:

  • Serve up Markdown/rST/asciidoc etc., files as HTML (ie., behave as a "Handler" in Apache)
  • Render a predefined set of files (eg: README.md, README.txt) as HTML files at the end of file listing in a directoy (ie., behave as ReadmeName in Apache)
  • Compressed files should be shown as browsable directory.
View init.c
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
{
sigset_t set;
int status;
if (getpid() != 1) return 1;
View hello.py
def main():
print("hello")
if __name__ == '__main__':
main()
View gitupdate.py
#!/usr/bin/env python
# A github post-receive hook handler, runs some shell command on each HTTP POST to PORT.
# github-listener.py PORT 'SOME SHELL COMMAND'
import sys
from subprocess import *
from flask import Flask
def system(cmd):
return ''.join(Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE, close_fds=True).communicate())
View onte.md

Onte - OCaml that acts like a Gopher

Onte is a tool for manaing OCaml source code

Usage:

    onte command [arguments]
View ocaml-learn-from-go.md

Editor support

Embrace newer editors like Sublime Text over traditional favourites like vim and Emacs

Gosublime works very well with sublime, which is a very good programmer's text editors by all accounts. OCaml has https://github.com/whitequark/sublime-better-ocaml. The problems with 'better-ocaml' are:

  • it does not recognize opam

OCaml's build system is complicated

Something went wrong with that request. Please try again.