Skip to content

Instantly share code, notes, and snippets.

View RyanCargan's full-sized avatar

Ryan RyanCargan

View GitHub Profile
@RyanCargan
RyanCargan / run_nginx_lb.sh
Created September 21, 2022 20:07 — forked from ryan-wendel/run_nginx_lb.sh
A quick & dirty script to spin up an nginx container that will load balance requests to a Kubernetes cluster
!/bin/bash
print_help() {
echo
echo "Usage: $(basename $0) -p port [-p port] -s server [-s server]"
echo
}
TMP_DIR="/tmp/nginx_conf_$$"
@RyanCargan
RyanCargan / shell.nix
Created July 23, 2022 05:39 — forked from kamilchm/shell.nix
React Native nix-shell
with import <nixpkgs> {};
let
jdk = openjdk;
node = nodejs-10_x;
sdk = androidenv.androidsdk {
platformVersions = [ "23" ];
abiVersions = [ "x86" ];
useGoogleAPIs = true;
useExtraSupportLibs = false;
@RyanCargan
RyanCargan / Sonic Pi Chords (no MIDI)
Created July 17, 2022 04:38 — forked from interstar/Sonic Pi Chords (no MIDI)
Sonic Pi Chords. The same as the Cheat Sheet, but not using MIDI. Plays them directly in Sonic Pi
# Chord Sequence only in Sonic Pi
# (no MIDI or need for external DAW)
define :chordSeq do | tonic, mode, degs |
majorKeyTriads = [:M,:m,:m,:M,:M,:m,:dim]
minorKeyTriads = [:m,:dim,:M,:m,:m,:M,:M]
majorKey7s = [:M7,:m7,:m7,:M7,:dom7,:m7,:halfdiminished]
minorKey7s = [:m7,:halfdiminished,:M7,:m7,:m7,:M7,:dom7]
# Create Chords in Sonic Pi, to send via MIDI to your other DAW or synth
# See https://www.youtube.com/watch?v=qd8SEL_rTNw
define :chordSeq do | tonic, mode, degs |
majorKeyTriads = [:M,:m,:m,:M,:M,:m,:dim]
minorKeyTriads = [:m,:dim,:M,:m,:m,:M,:M]
majorKey7s = [:M7,:m7,:m7,:M7,:dom7,:m7,:halfdiminished]
minorKey7s = [:m7,:halfdiminished,:M7,:m7,:m7,:M7,:dom7]
cs = []
@RyanCargan
RyanCargan / README.markdown
Created June 24, 2022 08:54 — forked from amomin/README.markdown
Converting a folder into a git submodule
@RyanCargan
RyanCargan / droidcam.nix
Created June 23, 2022 07:21 — forked from peterwilli/droidcam.nix
droidcam.nix
{ stdenv, fetchzip, pkgconfig, ffmpeg, gtk3-x11, libjpeg, libusbmuxd, alsaLib, speex }:
stdenv.mkDerivation rec {
pname = "droidcam";
version = "0";
src = fetchzip {
url = "https://github.com/dev47apps/droidcam/archive/refs/tags/v1.7.2.zip";
sha256 = "1iskvs5p71gkiinj78kkl9ygl5il9rdbzm0h85hwyzm2xwkcybrp";
};
@RyanCargan
RyanCargan / droidcam.nix
Created June 23, 2022 07:21 — forked from gtgteq/droidcam.nix
droidcam.nix
{ stdenv, fetchzip, pkgconfig, ffmpeg, gtk2-x11, libjpeg }:
stdenv.mkDerivation rec {
pname = "droidcam";
version = "0";
src = fetchzip {
url = "https://github.com/aramg/droidcam/archive/b49842a02611f8ddc6b9342ef74e299abd1c4090.zip";
sha256 = "05kd5ihwb3fldmalv67jgpw4x0z0q39lfis69r7yh03qiqlviymk";
};
@RyanCargan
RyanCargan / test.cu
Created June 9, 2022 05:56 — forked from pavanky/test.cu
ArrayFire vs Thrust
#include <stdio.h>
#include <arrayfire.h>
#include <thrust/device_vector.h>
#include <thrust/sort.h>
#include <thrust/binary_search.h>
#include <thrust/adjacent_difference.h>
using namespace af;
#define ITER 100
int main(int argc, char **argv)
@RyanCargan
RyanCargan / sotext
Created June 9, 2022 05:55 — forked from pavanky/sotext
ArrayFire vs Thrust
I have to be frank here, this is going to be
- criticism of thrust
- Showing off ArrayFire (of which I am a core developer)
*Criticism of thrust*
They do a good job at optimizing parallel algorithms for vector inputs.
They use data level parallelism (among other things) to parllelize algorithms that work really well for large, vector inputs.
But they fail to improve upon it and go all the way to perfom true data level parallelism. i.e. a large number of small problems.
@RyanCargan
RyanCargan / markdown-details-collapsible.md
Created June 1, 2022 23:26 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets