Skip to content

Instantly share code, notes, and snippets.

View ignacy's full-sized avatar
🦆
duck typing

Ignacy Moryc ignacy

🦆
duck typing
View GitHub Profile
;;; search-with-llama.el --- Find an answer to your query using llama! -*- lexical-binding: t; -*-
;; Copyright (C) 2023 Kiran Gopinathan
;; Author: Kiran Gopinathan
;; Keywords:
;; 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
;; the Free Software Foundation, either version 3 of the License, or
@Hirrolot
Hirrolot / CoC.ml
Last active July 17, 2024 13:27
How to implement dependent types in 80 lines of code
type term =
| Lam of (term -> term)
| Pi of term * (term -> term)
| Appl of term * term
| Ann of term * term
| FreeVar of int
| Star
| Box
let unfurl lvl f = f (FreeVar lvl)
@ekaschalk
ekaschalk / esh-custom.el
Created June 24, 2017 04:39
Customizing your emacs shell.
(require 'dash)
(require 's)
(defmacro with-face (STR &rest PROPS)
"Return STR propertized with PROPS."
`(propertize ,STR 'face (list ,@PROPS)))
(defmacro esh-section (NAME ICON FORM &rest PROPS)
"Build eshell section NAME with ICON prepended to evaled FORM with PROPS."
`(setq ,NAME
@reborg
reborg / rich-already-answered-that.md
Last active July 11, 2024 09:54
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@39aldo39
39aldo39 / pl-colemak.json
Created December 11, 2016 15:32
Polish Colemak
{
"fullName": "Polish (Colemak)",
"name": "pl-colemak",
"singletonKeys": [
[ "Alt_R", "AltGr" ]
],
"shiftstates": [ "None", "Shift", "AltGr", "Shift+AltGr" ],
"keys": [
{ "pos": "~", "letters": [ "`", "~", "tilde", "~" ] },
{ "pos": "1", "letters": [ "1", "!", "¡", "¹" ] },

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

Dockerfile

FROM ruby:2.3.1-alpine

RUN apk --update --no-cache add build-base imagemagick less libxml2-dev libxslt-dev postgresql-dev && mkdir -p /app

WORKDIR /app

COPY Gemfile Gemfile.lock ./
@ghoseb
ghoseb / clj_spec_playground.clj
Last active March 30, 2019 22:35
Examples of Clojure's new clojure.spec library
(ns clj-spec-playground
(:require [clojure.string :as str]
[clojure.spec :as s]
[clojure.test.check.generators :as gen]))
;;; examples of clojure.spec being used like a gradual/dependently typed system.
(defn make-user
"Create a map of inputs after splitting name."
([name email]
@julz
julz / main.go
Created November 20, 2015 12:39
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
@drbrain
drbrain / nightmares.rb
Last active July 25, 2017 17:40
A method that has a default argument that defines a method that contains a here-document
def a l = def b; <<-NIGHTMARES; end; puts send l; end
😱😱😱
NIGHTMARES
a