Skip to content

Instantly share code, notes, and snippets.

View rads's full-sized avatar

Radford Smith rads

View GitHub Profile
@Verdier
Verdier / ExempleReSwiftUI.swift
Last active March 27, 2024 02:26
Redux SwiftUI
struct MyView: View {
@StateObject var myValue = store.subscribe()
.map { state in state.myValue }
.toObservableObject(animation: .interactiveSpring()) // optional animation
@StateObject var myDerivedValue = store.subscribe()
.map { state in state.myValue }
.removeDuplicates()
.map { value in complexTransformation(value) } // triggered only on new value
.toObservableObject()
@ssrihari
ssrihari / clojure-learning-list.md
Last active April 15, 2024 14:54
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
@theronic
theronic / Dockerfile
Created May 30, 2022 16:23
Deploy Clojure to Fly.io: Efficient Multi-stage Docker build to Deploy Clojure Application to Fly.io
FROM clojure:openjdk-15-tools-deps AS builder
WORKDIR /opt
ADD deps.edn deps.edn
RUN clj -Sdeps '{:mvn/local-repo "./.m2/repository"}' -e "(prn \"Downloading deps\")"
RUN clj -e :ok
COPY . .
RUN clj -e :ok
@zonble
zonble / KKSimplePlayer.swift
Created April 21, 2016 16:34
Using AudioQueue and Swift to do a simple stream player
import Foundation
import AudioToolbox
class KKSimplePlayer: NSObject {
var URL: NSURL
var URLSession: NSURLSession!
var packets = [NSData]()
var audioFileStreamID: AudioFileStreamID = nil
var outputQueue: AudioQueueRef = nil
var streamDescription: AudioStreamBasicDescription?
@dragonjet
dragonjet / 1-server.md
Last active July 31, 2021 21:01
Setup Web Server on EC2 Amazon Linux AMI

Step 1: Server Credentials

This assumes you are now connected to the server via SSH.

  • sudo -s Enter root mode for admin access
  • groupadd devgroup Create new group to be later granted access to /var/www/html

Creating a new Root User

  • useradd -G root,devgroup masterdev Create new root user. Also add to the devgroup
  • passwd masterdev Change password for the new root user
  • At this point, you'll need to input your new root user's new password
@akiatoji
akiatoji / Clojure_on_RaspberryPi_OSX.md
Last active December 3, 2022 21:15
Running Clojure on Raspberry Pi with OS X

Clojure on Raspberry Pi with OS X

"Clojure running on Raspberry Pi" sounded so cool that I just had to give it a try.

Install JDK

  • Download ARM JDK from Oracle and instlal on Raspberry Pi
  • Change visudo to contain the following