Skip to content

Instantly share code, notes, and snippets.

View yogthos's full-sized avatar
🤷‍♂️

Dmitri Sotnikov yogthos

🤷‍♂️
View GitHub Profile
@yogthos
yogthos / RichHickeyInterview.md
Created April 25, 2017 00:38
An in-depth look at the new language with Rich Hickey, Creator of Clojure

from http://www.linuxjournal.com/article/10708

An in-depth look at the new language with Rich Hickey, Creator of Clojure

DE: What did you do before you started the Clojure project?

RH: I'm a consultant, so I work on various things. I think the big thing I've done recently is I worked on the national exit poll.

DE: What other languages did you use before inventing your own?

@yogthos
yogthos / gallery.cljs
Last active March 30, 2024 17:36
script to download walpapers from windowsonearth.org

The project can be built using Lumo

npm install -g lumo-cljs
lumo build.cljs
@yogthos
yogthos / README.md
Created August 27, 2017 07:39
ClojureScript Planck FFI example
@yogthos
yogthos / atom_clojure_setup.md
Last active October 20, 2017 12:31 — forked from jasongilman/atom_clojure_setup.md
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@yogthos
yogthos / config.edn
Last active August 23, 2018 12:34
Twitter to Markdown
{:access-keys
{:consumer_key "XXXX"
:consumer_secret "XXXX"
:access_token_key "XXXX"
:access_token_secret "XXXX"
:account "arstechnica"
:content-filters [".*badwords.*"]
:include-replies? true
:include-rts? true
:output-file "tweets.md"}
#!/bin/sh
palette="$1.palette.png"
if [[ ! -e $palette ]]; then
ffmpeg -y -i $1 -vf palettegen $palette
fi
filters="fps=15,scale=640:-1:flags=lanczos"
@yogthos
yogthos / datepicker.cljs
Created October 19, 2018 22:11
example of adapting Reagent atom based API to re-frame
(ns re-frame.datepicker
(:require [cljs-pikaday.reagent :as pikaday]))
(defn datepicker [k]
(r/with-let [date (r/atom @(rf/subscribe [:schedule/event-modal-details-value k]))
date-tracker (r/track! #(rf/dispatch [:schedule/update-event-modal-details k @date]))]
[pikaday/date-selector
{:date-atom date
:pikaday-attrs {:format "YYYY-MM-DD"}
:input-attrs {:read-only true :class "form-control"}}]
@yogthos
yogthos / reddit-video.cljs
Last active January 24, 2021 21:03
a Lumo script for downloading Reddit videos using youtube-dl
#!/usr/bin/env lumo
(ns reddit-video.core
(:require
[cljs.core :refer [*command-line-args*]]
[clojure.string :as string]))
(def https (js/require "https"))
(def process (js/require "child_process"))
(defn js->edn [data]
@yogthos
yogthos / core.cljs
Last active February 18, 2025 04:46
Gjs ClojureScript example
(ns gjs-example.core)
(defn main []
(set! (-> js/imports .-gi .-versions .-Gtk) "3.0")
(let [Gtk (doto (-> js/imports .-gi .-Gtk) (.init nil))
window (Gtk.Window.
(clj->js
{:type (-> Gtk .-WindowType .-TOPLEVEL)
:title "A default title"
:default_width 300