diff options
author | Lily | 2022-10-25 07:11:00 +0000 |
---|---|---|
committer | GitHub | 2022-10-25 07:11:00 +0000 |
commit | 0ed18c72ac8be49badd4b0542faf9b75c6fbce0b (patch) | |
tree | 6b8ab21e4becbad54372f1f2bd4decccfbb76863 | |
parent | 7509f7f46d0511454dccce2d52545c045cb67e57 (diff) | |
parent | ce7544a6db594f7d3dfad0d7dc65d01515e57ad6 (diff) |
Merge branch 'braxtonhall:main' into lily
-rw-r--r-- | entries/braxtonhall/wc/.gitignore | 1 | ||||
-rw-r--r-- | entries/braxtonhall/wc/fib.sh | 22 | ||||
-rw-r--r-- | entries/lucaszamprogno/fib.js | 1 | ||||
-rw-r--r-- | entries/lucaszamprogno/package.json | 14 | ||||
-rw-r--r-- | people.json | 15 |
5 files changed, 53 insertions, 0 deletions
diff --git a/entries/braxtonhall/wc/.gitignore b/entries/braxtonhall/wc/.gitignore new file mode 100644 index 0000000..0aafc44 --- /dev/null +++ b/entries/braxtonhall/wc/.gitignore @@ -0,0 +1 @@ +**/1
\ No newline at end of file diff --git a/entries/braxtonhall/wc/fib.sh b/entries/braxtonhall/wc/fib.sh new file mode 100644 index 0000000..1759dff --- /dev/null +++ b/entries/braxtonhall/wc/fib.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +function rec () { + + if [ $2 == "0" ]; then + : + elif [ $2 == "1" ]; then + [ -f "$1/$2" ] || echo "🥵" > "$1/$2" + else + [ -d "$1/$2" ] || mkdir "$1/$2" + rec "$1/$2" $(($2 - 1)) + rec "$1/$2" $(($2 - 2)) + fi +} + +if [[ $1 =~ ^[0-9]+$ ]]; then + rec $(pwd) $1 + find $(pwd)/$1 -type f | wc -l +else + echo "Please provide a natural number!" + exit 1 +fi diff --git a/entries/lucaszamprogno/fib.js b/entries/lucaszamprogno/fib.js new file mode 100644 index 0000000..bd5da6b --- /dev/null +++ b/entries/lucaszamprogno/fib.js @@ -0,0 +1 @@ +console.log(require('fibonacci-series')(process.argv[2]))
\ No newline at end of file diff --git a/entries/lucaszamprogno/package.json b/entries/lucaszamprogno/package.json new file mode 100644 index 0000000..c5b9529 --- /dev/null +++ b/entries/lucaszamprogno/package.json @@ -0,0 +1,14 @@ +{ + "name": "fib", + "version": "1.0.0", + "description": "", + "main": "fib.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "fibonacci-series": "1.0.1" + }, + "author": "Lucas Zamprogno", + "license": "ISC" +} diff --git a/people.json b/people.json index 7f6967c..a6e6686 100644 --- a/people.json +++ b/people.json @@ -34,6 +34,10 @@ { "name": "types", "link": "./entries/braxtonhall/types/index.ts" + }, + { + "name": "wc", + "link": "./entries/braxtonhall/wc/fib.sh" } ] }, @@ -118,6 +122,17 @@ ] }, { + "github": "LucasZamprogno", + "name": "Lucas Zamprogno", + "title": "MSc, UBC", + "entries": [ + { + "name": "node", + "link": "./entries/lucaszamprogno/fib.js" + } + ] + }, + { "github": "margoseltzer", "name": "Margo Seltzer", "title": "Professor of Computer Science, UBC", |