sudo apt install git gcc autoconf automake libtool libgmp3-dev g++ libz-dev libjpeg-dev libx11-dev libgl-dev libxpm-dev libasound2-dev libsdl2-dev unzip
git clone git://git.xonotic.org/xonotic/xonotic.git
cd xonotic/
./all update -p
./all compile -r
cp server/server.cfg data/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bb | |
(require '[clojure.java.shell :refer [sh]]) | |
(defn exit [error] | |
(println error) | |
(System/exit 1)) | |
(defn open-folder [folder] | |
(let [folder (some-> folder (io/file))] | |
(when (nil? folder) |
- High level overview https://yogthos.github.io/ClojureDistilled.html
- An Animated Introduction to Clojure https://markm208.github.io/cljbook/
- Interactive tutorial in a browser https://tryclojure.org/
- Interactive exercises http://clojurescriptkoans.com/
- Clerk notebooks with introductory examples https://github.clerk.garden/anthonygalea/notes-on-clojure
- More interactive exercises https://4clojure.oxal.org/
- Lambda Island tutorials https://lambdaisland.com/
- Functional Programming with Clojure resources https://practicalli.github.io/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env lumo | |
(ns pixelfed-images.core | |
(:require | |
[clojure.walk :refer [prewalk]] | |
[cljs.core :refer [*command-line-args*]] | |
[clojure.string :as string])) | |
(def fs (js/require "fs")) | |
(def https (js/require "https")) | |
(def stream (.-Transform (js/require "stream"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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"}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{: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"} |
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.
The Atom documentation is excellent. It's highly worth reading the flight manual.