Skip to content

Instantly share code, notes, and snippets.

Anton Chikin achikin

  • Flyerbee
  • Russia, Voronezh
Block or report user

Report or block achikin

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 .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
@achikin
achikin / sub_watch.cljs
Created Mar 6, 2018
Test of subscription watchers
View sub_watch.cljs
(ns whatever.sub-test
(:require [reagent.core :as r]
[reagent.ratom :as ratom]
[re-frame.core :as rf]))
(rf/reg-sub :test (fn [db] (:test db)))
(rf/reg-event-db :set-test (fn [db [_ newval]] (assoc db :test newval)))
(rf/reg-event-db :set-test-changed (fn [db [_ newval]] (assoc db :test-changed newval)))
(rf/reg-sub :test-changed (fn [db _] (:test-changed db)))
@achikin
achikin / DefaultKeyBinding.dict
Created Feb 17, 2018 — forked from gilbert/DefaultKeyBinding.dict
Add missing keyboard shortcuts on OS X
View DefaultKeyBinding.dict
/*
Create this as a file ~/Library/KeyBindings/DefaultKeyBinding.dict
Then restart your computer.
NOTE: ~ means alt/option
^ means ctrl
*/
{
"~f"="moveWordForward:";
"~b"="moveWordBackward:";
"~<"="moveToBeginningOfDocument:";
View gist:da01023d4f5a373cb1a929ce4b230e63
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
;; or `spacemacs'. (default 'spacemacs)
dotspacemacs-distribution 'spacemacs
;; Lazy installation of layers (i.e. layers are installed only when a file
View clojure_is_for_type_b_personalities.md

The other day, I was wondering why Clojure fits my brain so well. I think I was relaxing on my old couch, drinking cheap beer, eating a gas station pastry, and drawing doodles on a stack of overdue bills I forgot to pay. Little did I realize, these things are all connected.

I have a hypothesis that people choose programming languages based on their personality. For the purposes of this write-up, I’ll use the well-known distinction between type A and type B people. This may be pop psychology stuff, but it’s convenient for my point so in the spirit of American politics I will treat it as fact.

Type A vs Type B

Type A people are very organized, competitive, punctual, and like to plan ahead. When I was a kid, these were the ones who had perfect grades, competed in track or swimming, and on top of that they were nice people so I couldn't even hate the fuckers. Type B people, on the other hand, are laid back and like to do things spontaneously. Like The Dude from The Big Lebowski, they are comfortable with

@achikin
achikin / dabblet.css
Created Feb 19, 2017
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
.flex-div {
display: flex;
background-color: white;
margin-left: 20
px;
}
.flex-row1 {
@achikin
achikin / # uwsgi - 2016-10-14_14-12-31.txt
Created Oct 14, 2016
uwsgi on macOS 10.11.6 - Homebrew build logs
View # uwsgi - 2016-10-14_14-12-31.txt
Homebrew build logs for uwsgi on macOS 10.11.6
Build date: 2016-10-14 14:12:31
View gist:2a2397fe4a251c39802fcfc2a70931e9
→ brew config
HOMEBREW_VERSION: 1.0.7-52-gce1f8a5
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: ce1f8a5135df53f1c622c24124349fc207e32055
Last commit: 54 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 38f88a7683ed1a9f4e072752266a3f5b06daa7b7
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
@achikin
achikin / Dockerfile
Created Aug 30, 2016
Docker file for doc2text
View Dockerfile
FROM ubuntu:16.04
WORKDIR /my/
RUN apt-get -qq -y update
RUN apt-get -qq -y install python
RUN apt-get -qq -y install python-pip tesseract-ocr python-pythonmagick libopencv-dev python-opencv
RUN pip install doc2text
ADD dtt.py /my/
ADD image.png /my/
@achikin
achikin / gist:d6a32ed42d5735d7f24d
Last active Aug 29, 2015
.git/hooks/prepare-commit-msg
View gist:d6a32ed42d5735d7f24d
#put this into prepare-commit-msg to insert branch name into commit msg
echo $(git symbolic-ref HEAD | awk -F/ '{print $NF}'): > $1.tmp
cat $1 >> $1.tmp
mv $1.tmp $1
You can’t perform that action at this time.