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
# Generated by Powerlevel10k configuration wizard on 2020-02-13 at 11:50 CET.
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 38685.
# Wizard options: nerdfont-complete + powerline, large icons, rainbow,
# angled separators, sharp heads, flat tails, 1 line, compact, few icons, concise.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with powerline prompt style with colorful background.
# Type `p10k configure` to generate your own config based on it.
#
# Tip: Looking for a nice color? Here's a one-liner to print colormap.
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block, everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh

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.

@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.
.home_right_column > div:nth-child(1),
.home_right_column > div:nth-child(4),
#userNav,
#universalNav,
#pinnedNav,
#appsNav,
#createNav,
#pagelet_rhc_footer {
-webkit-transition: opacity 250ms ease-in-out;
-moz-transition: opacity 250ms ease-in-out;
(ns probe.components.editable
(:require [rum.core :as rum]))
; Component that will replace itself with an input
; When user clicks on it and back to span when it loses focus
(rum/defcs editable-ui
< rum/reactive (rum/local false ::focused)
[react-state value-atom on-change]
(let [local (::focused react-state)
value (rum/react value-atom)
@Otann
Otann / core.cljs
Created April 15, 2017 12:59
Scum example
(ns probe.core
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [rum.core :as r]
[scrum.core :as scrum]
[probe.scrum.counter :as counter]))
(defonce reconciler
(scrum/reconciler {:state (atom {})
:controllers {:counter/state counter/counter-controller}}))
(defonce init-ctrl
@Otann
Otann / components.cljs
Created April 12, 2017 22:49
Redux in Clojure
(ns sample.components
(:require [rum.core :as r]
[clojure.string :as str]
[sample.redux :refer [dispatch action]]))
(r/defc ui-form
[state]
[:.app
[:h1 (str "Hello, " (:name state))]
[:input {:value (:name state)
@Otann
Otann / plan.md
Last active November 21, 2016 20:11
Claimlords 3 plan

1st base - 64/127/64

Build plan

  • pipes from extra utils
  • item rack
  • redstone clock
  • small Storage Crate
  • empty sack of holding
  • stirling generator
  • rftools modular storage
@Otann
Otann / morse-bots.clj
Created July 26, 2016 09:49
Multiple bots passing bot-specific information to a handler
(defhandler client-handler
(command "start" (handle-start message))
(command "stop" (handle-stop message))
(message message (handle-msg message)))
; means
(def client-handler (handlers (command "start" (handle-start message))
(command "stop" (handle-stop message))
(message message (handle-msg message))))