Skip to content

Instantly share code, notes, and snippets.

🐁
Clack clack click clack

Gergely Nagy algernon

🐁
Clack clack click clack
Block or report user

Report or block algernon

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
View centers.rb
#!/usr/bin/ruby --disable-gems
require('open3')
# http://fsck.com/~jesse/tmp/2019-02-15/bdfca368-6f85-40d3-ba47-e730c4c2b712/left-key-spacing.pdf
out, stat = Open3.capture2('qpdf', '--qdf', '--object-streams=disable', 'left-key-spacing.pdf', '-')
abort('qpdf fail') unless stat.success?
out.force_encoding(Encoding::BINARY)
# coordinates are indexed from top-left, x is horizontal; y is vertical
@levand
levand / data-modeling.md
Last active Oct 13, 2019
Advice about data modeling in Clojure
View data-modeling.md

Since it has come up a few times, I thought I’d write up some of the basic ideas around domain modeling in Clojure, and how they relate to keyword names and Specs. Firmly grasping these concepts will help us all write code that is simpler, cleaner, and easier to understand.

Clojure is a data-oriented language: we’re all familiar with maps, vectors, sets, keywords, etc. However, while data is good, not all data is equally good. It’s still possible to write “bad” data in Clojure.

“Good” data is well defined and easy to read; there is never any ambiguity about what a given data structure represents. Messy data has inconsistent structure, and overloaded keys that can mean different things in different contexts. Good data represents domain entities and a logical model; bad data represents whatever was convenient for the programmer at a given moment. Good data stands on its own, and can be reasoned about without any other knowledge of the codebase; bad data is deeply and tightly coupled to specific generating and

View clojure_docs.md

How Clojure's documentation can leapfrog other languages

Summary

I made a documentation generator that cashes in on Clojure's dynamism. See the play-cljs docs (a ClojureScript game library) for an example of its output.

The Problem

Like many of you, I've often wondered what my final regret will be on my deathbed. My best guess came to me in a dream recently. I was walking across the charred earth of an apocalyptic future world, maneuvering around the remains of the less fortunate. I was startled to find a young girl, barely holding onto her life. She murmured something to me. I asked her to repeat it, and she said more loudly: "I...wish your Clojure projects didn't have such crappy documentation."

View README.md

The project can be built using Lumo

npm install -g lumo-cljs
lumo build.cljs
View rich-already-answered-that.md

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 below in the summary jumps at the answer on this page.
  • The link on the question itself points back at the original post.

Summary

@antevens
antevens / gist:32646c5ea9bd526d9a19d6d442b2867e
Last active Oct 4, 2016
A keyboard layout optimized for all languages that use Latin based character sets (including programming).
View gist:32646c5ea9bd526d9a19d6d442b2867e
* Note that this layout is quite similar to Colekmak in many ways, once optimisations were done I fould that like with * Colemak moving the Z/X/C/V did not have a noticable impact but caused issues with shortcuts.
* The biggest difference is making sure vovels are easily used with accents/diacritics
* Keymap: Layer 0 with Gelatin keyboard layout
* Note that this layout requires a custom OS keyboard map to work correctly.
* Tertiary symbols are accessed using LAlt
* Deadkey functionality is used to combine accents/diacritics and alphabetic letters
* ,--------------------------------------------------. ,--------------------------------------------------.
* | +L1 | 1 !¡ | 2 @ | 3 # | 4 $ §| 5 % ˝|˘ ̑ ˚ | |˘ ̑ · | 6 ^ ̏| 7 & | 8 * | 9 + | 0 = | L0 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
@blerou
blerou / project.clj
Created Sep 25, 2016
A very simple TODO app's domain model
View project.clj
(defproject eisentower-todo "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha12"]]
:main ^:skip-aot eisentower.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}
:dev {:dependencies [[org.clojure/test.check "0.9.0"]]}})
@nfnty
nfnty / evdev_latency.py
Last active Feb 21, 2017
evdev latency tester
View evdev_latency.py
#!/usr/bin/python3
''' evdev latency tester '''
import argparse
import statistics
import evdev
@leonardofed
leonardofed / README.md
Last active Oct 14, 2019
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


You can’t perform that action at this time.