Skip to content

Instantly share code, notes, and snippets.

View Otann's full-sized avatar
centring an emoji inside a circle is indeed difficult

Anton Chebotaev Otann

centring an emoji inside a circle is indeed difficult
View GitHub Profile

Problem

On Mac if you install almost any version of the powerline, your MacOS Terminal.app would try to inprove contrast of text symbol, which is used as the end of the "bullet train":

Screen Shot 2020-02-13 at 6 42 11 PM

This is somewhat documented in this answer on AskDifferent:

Terminal automatically applies a minimum contrast when displaying an ANSI (or extended 256-color table) color on the terminal background color, or when displaying the terminal foreground/text color on an ANSI background color.

React Native + macOS + Clojurescript

image

Project Catalyst

Since the recent release of Catalina, macOS has shipped with the ability to allow iOS/iPAD apps to run on macOS without any modification via a featureset known as Project Catalyst.

This is exciting, as writing React Native + Clojurescript apps as a target for the desktop is much more compelling than a pure Electron app (imo).

@romkatv
romkatv / monochrome-powerlevel10k.md
Last active March 16, 2023 17:44
monochrome-powerlevel10k.zsh

Here's how it looks with White on Black color scheme:

white-on-black

Tango Dark

tango-dark

Solarized Light

@Otann
Otann / A2.pdf
Created June 1, 2019 19:55
Life Calendar
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mtnygard
mtnygard / cljsjs.clj
Created March 9, 2017 14:46
Access CLJSJS assets via a Pedestal Interceptor
(ns overt.cljsjs
(:require [clojure.java.io :as io]
[io.pedestal.interceptor :as i]
[io.pedestal.log :as log])
(:import java.net.URL
java.util.Date
java.util.jar.JarFile))
(def ^:private default-base "cljsjs")
@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

@Deraen
Deraen / spec-coercion.clj
Created June 14, 2016 15:47
Clojure.spec coercion test
(ns spec-test.core
(:require [clojure.spec :as s]))
(defn x-integer? [x]
(if (integer? x)
x
(if (string? x)
(try
(integer/parseint x)
(catch exception e
@nornagon
nornagon / 1-intro.md
Last active April 20, 2024 18:48
How to make a Minecraft (1.8) mod

How to make a Minecraft mod

Minecraft mods, especially mods which change the client, are by and large written with Forge. If you visit their website, you'll be greeted abruptly by a mysterious message at the top of an SMF forum, with no clear path towards actually... making a mod. I'm documenting here the steps I went through to get started, in the hopes of helping the next person have an easier time of it.

I'll be using Scala for this guide, but it should be fairly easy to adapt these instructions to any JVM language (e.g. clojure or if you're feeling masochistic, Java). I'm also developing on OS X, so some of the commands will be a little different if you're on Linux or Windows. I'm assuming you have some proficiency with your operating system, so I won't go into details about how to adapt those commands to your system.

Background

Minecraft doesn't have an official mod API (despite early [promises](http://notch.t

Thank you for extending an invitation to speak at HighLoad++. I
sincerely appreciate your consideration.
I am an outspoken advocate for LGBTQ equality; this position is deeply
woven into my work. Clojure From The Ground Up is adamantly
LGBT-inclusive. Jepsen is named after a gay pop anthem and includes
dozens of references to same-sex relationships and trans identities. My
talk slides are populated with bearded nuns, genderqueer punks, and
trans hackers. My twitter feed is about as gay as it is possible to get.
@daveliepmann
daveliepmann / localstorage.cljs
Created September 23, 2014 08:23
HTML5 localStorage utility functions for ClojureScript. I find it makes for cleaner code when I wrap the native JS.
(ns localstorage)
(defn set-item!
"Set `key' in browser's localStorage to `val`."
[key val]
(.setItem (.-localStorage js/window) key val))
(defn get-item
"Returns value of `key' from browser's localStorage."
[key]