Skip to content

Instantly share code, notes, and snippets.

View 5HT's full-sized avatar
🌐
I'm very skeptical that person without empathy can create beautiful mathematics.

Namdak Tonpa 5HT

🌐
I'm very skeptical that person without empathy can create beautiful mathematics.
View GitHub Profile
#!/bin/sh
exec scala "$0" "$@"
!#
object HelloWorld {
abstract class OCard {
val v:Int
val c:Int
def matchV(x:OCard):Boolean
@andrejbauer
andrejbauer / topology.v
Last active November 28, 2023 19:40
How to get started with point-set topology in Coq. This is not actually how one would do it, but it is an intuitive setup for a classical mathematician.
(* How do to topology in Coq if you are secretly an HOL fan.
We will not use type classes or canonical structures because they
count as "advanced" technology. But we will use notations.
*)
(* We think of subsets as propositional functions.
Thus, if [A] is a type [x : A] and [U] is a subset of [A],
[U x] means "[x] is an element of [U]".
*)
Definition P (A : Type) := A -> Prop.
#!/bin/bash
# Henrik Austad ,2009
# UNINETT Sigma A/S
#
# make_cmc.sh
#
# Shell-wrapper for making CMC's to send to a dogtag system
# This script uses CMCEnroll to create CMCs, and it creates simple CMCs,
# i.e. no bundling of several CSRs together.
#
@soarez
soarez / ca.md
Last active July 27, 2025 23:20
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

Bugs:

  • Autologin checkbox is disabled
  • Preferences menu is disabled
  • Main window isn't font sensitive. I use a 10pt font and there is 2 pixel space below the menu
  • When selecting a contact in the roster, the view LowColor isn't set, leading to text antialias artifacts
  • Double clicking a contact should open message window. Having to right-click > message is boring
  • Chat window: pressing enter should send message instead of doing a newline.

Enhancements:

  • Selection highlight in roster doesn't go all the way to the left of the window, there is whitespace left
@bryanhunter
bryanhunter / build-erlang-r16b01.sh
Last active December 20, 2015 15:09
Build Erlang R16B01 on Ubuntu
#!/bin/bash
# Pull this file down, make it executable and run it with sudo
# wget https://raw.github.com/gist/6152521/build-erlang-r16b01.sh
# chmod u+x build-erlang-r16b01.sh
# sudo ./build-erlang-r16b01.sh
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
@copumpkin
copumpkin / Topology.agda
Last active May 20, 2020 08:00
Topology?
module Topology where
import Level
open import Function
open import Data.Empty
open import Data.Unit
open import Data.Nat hiding (_⊔_)
open import Data.Fin
open import Data.Product
open import Relation.Nullary
@crosbymichael
crosbymichael / Dockerfile
Last active January 8, 2022 13:47
Docker with supervisor
FROM ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade
RUN apt-get install -y openssh-server supervisor
ADD sshd.conf /etc/supervisor/conf.d/sshd.conf
RUN mkdir -p /var/run/sshd
# Builder file for sentry
#
FROM ubuntu
MAINTAINER Michael Crosby
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade
@5HT
5HT / char.erl
Last active December 17, 2015 01:49
Чат на нитрогене
body() -> wf:comet_global(fun() -> loop() end,chat),
[ #panel{id=history}, #textbox{id=message}, #button{postback=chat}].
event(chat) -> wf:send_global(chat, wf:q(message)),
loop() -> receive Message -> wf:insert_bottom(history, #span{text=Message}), wf:flush() end, loop().