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
(ns talk
(:require [overtone.core :refer :all]
[clojure.java.io :as io]
[clj-http.client :as http]
[clojure.test :as test]))
(def talk
{:title "Sequencing dance music with Clojure"
:author "Piotr Jagielski"
:company {:name "TouK" :what "Software house" :from "Warsaw, Poland"}
@usametov
usametov / vidwiz.clj
Created February 3, 2021 22:47 — forked from adam-james-v/vidwiz.clj
Clojure/babashka script to help automate some of my video editing pipeline
#!/usr/bin/env bb
(ns vidwiz.main
"This is a prototype script for automating a portion of my video editing using ffmpeg."
(:require [clojure.java.shell :refer [sh]]
[clojure.string :as st]))
;; util
(defn get-extension
[fname]
@usametov
usametov / clipboard.clj
Created February 1, 2021 03:49 — forked from baskeboler/clipboard.clj
Write pretty printed Clojure data structures to the clipboard
(ns clipboard.core
(:require [clojure.pprint :refer [pprint]])
(:import (java.awt.datatransfer DataFlavor Transferable StringSelection)
(java.awt Toolkit)
(java.io StringWriter))
(defn get-clipboard
"get system clipboard"
[]
(-> (Toolkit/getDefaultToolkit)
@usametov
usametov / core.clj
Created December 15, 2020 03:29 — forked from Jeiwan/core.clj
Custom log4j appender in Clojure
(ns woof.core
(:gen-class)
(:require [clojure.tools.logging :as log])
(:import StringAppender))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(log/info "Hello, world!")
(println "Done")
@usametov
usametov / data-vis-using-clojisr.md
Created December 10, 2020 20:18
Tutorial showcasing the usage of the ClojisR library to visualize data in Clojure

Data Visualization in Clojure using ggplot2 from R

We'll be using the ClojisR library to visualize data in Clojure. This library is a Clojure-R interop and it allows us to call R functions on R objects in Clojure.

Usage requirements

Before starting ensure that you have the following installed on your computer:

  • JDK 1.8 or later
  • Clojure 1.9.0 or later
  • R
@usametov
usametov / Bubble.pde
Created November 25, 2020 11:58 — forked from 0xLeon/Bubble.pde
Bubbles Processing
class Bubble {
float x = random(0, width);
float y = height;
void zeichnung() {
fill(0, 200, 220);
stroke(0, 127, 220);
ellipse(x, y, 20, 20);
}
@usametov
usametov / bubbles.pde
Created November 25, 2020 11:55 — forked from schalkneethling/bubbles.pde
Make bubble arrays, and art with Processing
/*
* Creative Coding
* Week 1, 02 - Draw your name! (part 2)
* by Indae Hwang and Jon McCormack
* Updated 2016
* Copyright (c) 2014-2016 Monash University
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@usametov
usametov / bubbles.pde
Created November 25, 2020 11:55 — forked from schalkneethling/bubbles.pde
Make bubble arrays, and art with Processing
/*
* Creative Coding
* Week 1, 02 - Draw your name! (part 2)
* by Indae Hwang and Jon McCormack
* Updated 2016
* Copyright (c) 2014-2016 Monash University
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@usametov
usametov / audio2midi.md
Created November 2, 2020 05:40 — forked from natowi/audio2midi.md
list of audio to midi packages
@usametov
usametov / home-server.md
Created October 26, 2020 15:15 — forked from nileshtrivedi/home-server.md
Home Server setup: Raspberry PI on Internet via reverse SSH tunnel

Raspberry Pi on Internet via reverse SSH tunnel

HackerNews discussed this with many alternative solutions: https://news.ycombinator.com/item?id=24893615

I already have my own domain name: mydomain.com. I wanted to be able to run some webapps on my Raspberry Pi 4B running perpetually at home in headless mode (just needs 5W power and wireless internet). I wanted to be able to access these apps from public Internet. Dynamic DNS wasn't an option because my ISP blocks all incoming traffic. ngrok would work but the free plan is too restrictive.

I bought a cheap 2GB RAM, 20GB disk VM + a 25GB volume on Hetzner for about 4 EUR/month. Hetzner gave me a static IP for it. I haven't purchased a floating IP yet.