Skip to content

Instantly share code, notes, and snippets.

View emil0r's full-sized avatar

Emil Bengtsson emil0r

View GitHub Profile
@jamesnyika
jamesnyika / Clojurescript & React Navigation 3.md
Last active April 7, 2024 01:06
Using React Navigation 3 with Clojurescript

React Navigation in Clojurescript

I have been using v2 of React navigation for some time but needed to find a good article or source describing how to integrate it into a clojurescript project using Reagent, Re-frame, Shadow-cljs and no Leiningen or Figwheel. No offence to those libraries and tools, I just wanted to use Shadow so that I could also take advantage of the easy use of deps.edn. So how do you use React Navigation v3 in CLJS ?

Install Stuff

Make sure you have a project setup and install React Navigation using yarn or npm. I will not cover this. Please see this basic project setup from the shadow site as a reference :

Shadow CLJS Examples

The Basic Setup

@Efimero
Efimero / perlin.cljs
Created March 7, 2018 13:44
ClojureScript Simplex Noise Implementation
(ns perlin.noise)
; Usage:
; (def my-generator (perlin.noise/generator "My Favorite Seed"))
; (my-generator 1.1 2.2 3.3) ; input coordinates as float, output single float (-1 to 1 gaussian distribution)
(defn generator
([] (generator (rand)))
([seed]
(let [T [0x15 0x38 0x32 0x2c 0x0d 0x13 0x07 0x2a]
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active November 24, 2025 18:10
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@matthewlehner
matthewlehner / autopgsqlbackup
Created July 11, 2012 16:10
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9