Skip to content

Instantly share code, notes, and snippets.

View usametov's full-sized avatar

Ulan Sametov usametov

  • Asta Nova Enterprise Solutions
View GitHub Profile
;; # Maria for Experts
;; This is a short tour of abstractions we've made in the process of building Maria,
;; which are also available while using the system. It is meant for people with experience using
;; functional programming languages who already know how to evaluate forms in Maria.
;; If you're a beginner to Maria or to programming in general, I recommend starting [here](https://www.maria.cloud/intro).
;; (For the impatient, Command-Enter — Control-Enter on a PC — within a code block with evaluate the code before the cursor.)
;; ## Notebook interface
@usametov
usametov / merkle.tree.clj
Created May 14, 2021 21:24 — forked from maxcountryman/merkle.tree.clj
A Clojure Merkle tree utilizing SHA-256.
(ns merkle.tree
(:import [java.security MessageDigest]))
(defn sha-256-digest [bs]
(.digest
(doto (MessageDigest/getInstance "SHA-256")
(.update bs))))
(def double-sha-256 (comp sha-256-digest sha-256-digest))
@usametov
usametov / readability.js
Created June 1, 2021 04:00 — forked from jakedahn/readability.js
Readability.js
/*jslint undef: true, nomen: true, eqeqeq: true, plusplus: true, newcap: true, immed: true, browser: true, devel: true, passfail: false */
/*global window: false, readConvertLinksToFootnotes: false, readStyle: false, readSize: false, readMargin: false, Typekit: false, ActiveXObject: false */
var dbg = (typeof console !== 'undefined') ? function(s) {
console.log("Readability: " + s);
} : function() {};
/*
* Readability. An Arc90 Lab Experiment.
* Website: http://lab.arc90.com/experiments/readability
@usametov
usametov / rotate-video.sh
Created June 13, 2021 01:45 — forked from ViktorNova/rotate-video.sh
Rotate a video with FFmpeg (100% lossless, and quick)
$INPUTVIDEO='input.mp4'
$OUTPUTVIDEO='output.mp4'
ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO
@usametov
usametov / string.clj
Created June 30, 2021 03:40 — forked from punit-naik/string.clj
Levenshtein Distance function implemented in Clojure
(defn levenshtein-distance
"Finds the percentage of match (reversed levenshtein distance & normalised)
between two strings"
[s1 s2]
(let [similarity (atom 0)
edit-map (atom {})]
(doseq [i (range (count s1))]
(let [edit (atom (if (zero? i) 0 i))]
(doseq [j (range (count s2))]
(let [e (if (= (.charAt s1 i) (.charAt s2 j)) 0 1)]
@usametov
usametov / ubuntu-install-backup
Created July 9, 2021 00:22 — forked from practicalli-johnny/ubuntu-install-backup
a version that I was editing and lost track of what I changed.
# Ubuntu install
Also see earlier install guide https://gist.github.com/jr0cket/7655cf6f0dcd889ca0dbb0edb2b544c2
## X1 Extreme installation
Download Ubuntu server iso image
burn image to usb
Enter and f1 to open bios config
- remove secure boot
@usametov
usametov / ubuntu-post-install.md
Created July 9, 2021 00:26 — forked from practicalli-johnny/ubuntu-post-install.md
Ubuntu post install - including Raid setup

Manage REPL session

, m . and , . calva.jackInOrConnect jack-in and connect menu commandPaletteeditor/context

, m c and , ” calva.connect Connect to a Running REPL Server in the Project Ctrl Alt C Ctrl Alt C | |

@usametov
usametov / repl-driven-development-with-spacemacs.org
Created July 9, 2021 00:32 — forked from practicalli-johnny/repl-driven-development-with-spacemacs.org
Screencast script - REPL driven development with Spacemacs

Introduction

Hello and thank you for watching this Practicalli screencast in which I’ll demonstrate a REPL driven development workflow for Clojure using Spacemacs

Spacemacs is a community configuration for Emacs, which uses the CIDER project as the Clojure development environment.

This workflow uses the Clojure CLI tools to run the Clojure REPL

@usametov
usametov / init.vim
Last active July 9, 2021 00:33 — forked from practicalli-johnny/init.vim
Practicalli -- Neovim configuration for Clojure development
" Set mapleader for general commands (not set by default - not sure if this is needed)
" let maplocalleader = "\<Space>"
" Set maplocalleader for Conjure leader key
let maplocalleader = ","
"Relative line numbers
set relativenumber
" Full color theme support for neovim