Skip to content

Commit

Permalink
Resolve "Anagolay CLI"
Browse files Browse the repository at this point in the history
  • Loading branch information
woss committed Mar 2, 2022
1 parent 8b1e983 commit 8f8040a
Show file tree
Hide file tree
Showing 621 changed files with 37,131 additions and 21,845 deletions.
98 changes: 98 additions & 0 deletions .devcontainer/.tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Unbind default keys
unbind C-b
unbind '"'
unbind %

# Set a new prefix / leader key.
set -g prefix C-a
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

path="#(if [[ $HOME == #{pane_current_path} ]]; then echo \"~\" ; else echo #{b:pane_current_path}; fi)"

### Visual stuff

# most of the themes will overwrite this
# https://man.openbsd.org/OpenBSD-current/man1/tmux.1#STATUS_LINE
set-window-option -g window-status-separator ""
set-window-option -g window-status-current-format " $path #W #F "
set-window-option -g window-status-format " $path "
# Show directory as window name
set-option -g status-interval 10
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Set different background color for active window
set -g window-status-current-style bg=magenta,fg=default,noreverse

### DRACULA theme settings
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, network, network-bandwidth, network-ping, weather, time
set -g @dracula-plugins "ram-usage"
set -g @dracula-show-powerline true
set -g @dracula-show-flags true
set -g @dracula-border-contrast true
# it can accept `session`, `smiley`, `window`, or any character.
set -g @dracula-show-left-icon 🎉🍻

#setting the delay between prefix and command
set -s escape-time 0

# Set the base index for windows to 1 instead of 0
set -g base-index 1

# Set the base index for panes to 1 instead of 0
set -g pane-base-index 1

# splitting panes with | and -
# bind | split-window -h
# bind - split-window -v

# https://unix.stackexchange.com/questions/126976/tmux-config-not-retaining-pwd-on-new-window-or-window-split
# Saner splitting.
bind | split-window -c "#{pane_current_path}" -h
bind - split-window -c "#{pane_current_path}" -v

# New pane path will be same as the opening pane
bind c new-window -c "#{pane_current_path}"

# Enable mouse support
set -g mouse on

# color support for the prompt styles
set -g default-terminal "screen-256color"
# set -ga termial-overrides ',xterm-256color:RGB'
# set-option -sa terminal-overrides ',xterm-256color:RGB'

# Set bind key to reload configuration file
bind r source-file ~/.tmux.conf \; display ​"Reloaded!"

# setw -g monitor-activity on
set -g visual-activity on

set -g @continuum-restore 'on'

### List of plugins

# https://github.com/tmux-plugins/tpm
set -g @plugin 'tmux-plugins/tpm'

# https://github.com/tmux-plugins/tmux-resurrect
set -g @plugin 'tmux-plugins/tmux-resurrect'

# https://github.com/tmux-plugins/tmux-yank
set -g @plugin 'tmux-plugins/tmux-yank'

# https://github.com/tmux-plugins/tmux-copycat
set -g @plugin 'tmux-plugins/tmux-copycat'

# https://github.com/tmux-plugins/tmux-continuum
set -g @plugin 'tmux-plugins/tmux-continuum'

### THEMES
# set -g @plugin "arcticicestudio/nord-tmux"

set -g @plugin 'dracula/tmux'

# Initialize TPM (keep this line at the very bottom of your tmux.conf).
run '~/.tmux/plugins/tpm/tpm'
50 changes: 50 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "Anagolay Js-SDK",
"dockerComposeFile": "../docker-compose.yml",
"service": "code",
"workspaceFolder": "/workspace",
"settings": {
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh"
},
"extensions": [
"PKief.material-icon-theme",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"mongodb.mongodb-vscode",
"foxundermoon.shell-format",
"be5invis.toml",
"streetsidesoftware.code-spell-checker",
"mhutchie.git-graph",
"PKief.material-icon-theme",
"ms-azuretools.vscode-docker",
"eg2.vscode-npm-script",
"pflannery.vscode-versionlens",
"yzhang.markdown-all-in-one",
"eriklynd.json-tools",
"oliversturm.fix-json",
"GitLab.gitlab-workflow"
],
"overrideCommand": false,
"features": {
"docker-from-docker": {
"version": "latest",
"moby": true
},
"rust": {
"version": "latest",
"profile": "default"
},
"git-lfs": "latest",
"node": {
"version": "16",
"nodeGypDependencies": true
}
},
"remoteUser": "node",
"postCreateCommand": "bash .devcontainer/install-deps.sh"
}
56 changes: 56 additions & 0 deletions .devcontainer/install-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
set -x
set -e

sudo apt update && sudo apt-get install -y \
silversearcher-ag \
tmux \
neovim \
iputils-ping

if ! command -v pnpm &>/dev/null; then
echo "pnpm could not be found, i will install it"
npm install -g pnpm
fi

if ! command -v remote-signer &>/dev/null; then
echo "remote-signer could not be found, i will install it"
sudo sh -c 'wget https://ipfs.anagolay.network/ipfs/QmVwR17T5oT4SsH1gb8T9L9gHe5CsJz2iwhbhWCwPPHgHR -O /usr/local/bin/remote-signer && chmod +x /usr/local/bin/remote-signer'
fi

# install the rush
pnpm add -g @microsoft/rush

if [ ! -d "$HOME/.tmux/plugins/tpm" ]; then
git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
fi

if [ ! -f "$HOME/.tmux.conf" ]; then
# wget https://ipfs.anagolay.network/ipfs/QmdZFrnc6NwzKSQdxkZfxHaBXMDH3ndhtwSm7dB7L1NXvM -O $HOME/.tmux.conf

ln -s /workspace/.devcontainer/.tmux.conf $HOME/.tmux.conf
fi

TEST_REPOS_PATH=$HOME/test-repos

git clone git@gitlab.com:anagolay/op-file.git $TEST_REPOS_PATH/op-file

# # set the pnpm store path to the rush one so we can just pnpm stuff
# pnpm config set store-dir /workspace/common/temp/pnpm-store

# # cargo install wasm-pack cargo-make

# # install the wasm-pack from binaries
# wget https://github.com/rustwasm/wasm-pack/releases/download/v0.10.2/wasm-pack-v0.10.2-x86_64-unknown-linux-musl.tar.gz -P /tmp/

# tar xvf /tmp/wasm-pack-v0.10.2-x86_64-unknown-linux-musl.tar.gz -C /tmp
# mv /tmp/wasm-pack-v0.10.2-x86_64-unknown-linux-musl/wasm-pack $CARGO_HOME/bin/
# rm -rf /tmp/wasm-pack-v0.10.2-x86_64-unknown-linux-musl

# # install cargo make from binaries
# wget https://github.com/sagiegurari/cargo-make/releases/download/0.35.8/cargo-make-v0.35.8-x86_64-unknown-linux-musl.zip -P /tmp/

# unzip /tmp/cargo-make-v0.35.8-x86_64-unknown-linux-musl.zip -d /tmp
# mv /tmp/cargo-make-v0.35.8-x86_64-unknown-linux-musl/cargo-make $CARGO_HOME/bin/
# mv /tmp/cargo-make-v0.35.8-x86_64-unknown-linux-musl/makers $CARGO_HOME/bin/
# rm -rf /tmp/cargo-make-v0.35.8-x86_64-unknown-linux-musl
30 changes: 0 additions & 30 deletions .eslintrc.cjs

This file was deleted.

23 changes: 14 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
*.jpg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.js text=auto eol=lf
*.ts text=auto eol=lf
*.json text=auto eol=lf
*.md text=auto eol=lf
*.sh text=auto eol=lf
*.yml text=auto eol=lf
*.sql text=auto eol=lf
# Don't allow people to merge changes to these generated files, because the result
# may be invalid. You need to run "rush update" again.
pnpm-lock.yaml merge=text
shrinkwrap.yaml merge=binary
npm-shrinkwrap.json merge=binary
yarn.lock merge=binary

# Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic
# syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor
# may also require a special configuration to allow comments in JSON.
#
# For more information, see this issue: https://github.com/microsoft/rushstack/issues/1088
#
*.json linguist-language=JSON-with-Comments
82 changes: 74 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,75 @@
node_modules
yarn-error.log
lib
.env
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
tsconfig.tsbuildinfo
docs
public
lerna-debug.log

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

# OS X temporary files
.DS_Store

# Rush temporary files
common/deploy/
common/temp/
common/autoinstallers/*/.npmrc
**/.rush/temp/

lib
dist
temp

# Heft
*/*/.heft/build-cache/**
*/*/.heft/temp/**
.pnpm-store
anagolay.json
Loading

0 comments on commit 8f8040a

Please sign in to comment.