diff --git a/bash/.bashrc b/bash/.bashrc index cc15cef..58c9fdf 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -127,6 +127,15 @@ export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;} sudo /etc/init.d/dbus start &> /dev/null . "$HOME/.cargo/env" +# enable GPG signing +export GPG_TTY=$(tty) + +if [ ! -f ~/.gnupg/S.gpg-agent ]; then + eval $( gpg-agent --daemon --options ~/.gnupg/gpg-agent.conf ) +fi + +export GPG_AGENT_INFO=${HOME}/.gnupg/S.gpg-agent:0:1 + export EDITOR="micro" export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 export DOTFILES_PATH=/home/reinaldy/.dotfiles diff --git a/bash/.profile b/bash/.profile index 5c6c3cf..46c078a 100644 --- a/bash/.profile +++ b/bash/.profile @@ -27,7 +27,6 @@ if [ -d "$HOME/.local/bin" ] ; then fi export GOPATH=$HOME/go -export PATH=/usr/local/go/bin:$GOPATH/bin:/opt/julia/bin:/usr/local/bin/heroku:$PATH +export PATH=/usr/local/go/bin:$GOPATH/bin:$PATH # :/usr/local/pypy3.7-v7.3.5-linux64/bin -export GPG_TTY=$(tty) -. "$HOME/.cargo/env" + diff --git a/bin/node-update b/bin/node-update index cecaa40..0df03b7 100755 --- a/bin/node-update +++ b/bin/node-update @@ -5,8 +5,8 @@ fnm uninstall 16 fnm install 14 fnm use 14 -npm install -g yarn tldr pnpm npm-check-updates np commitizen add-gitignore +npm install -g yarn tldr pnpm npm-check-updates np node-gyp commitizen add-gitignore fnm install 16 fnm use 16 -npm install -g yarn tldr pnpm npm-check-updates np commitizen add-gitignore +npm install -g yarn tldr pnpm npm-check-updates np node-gyp commitizen add-gitignore diff --git a/micro/bindings.json b/micro/bindings.json index 0733926..cf57c63 100644 --- a/micro/bindings.json +++ b/micro/bindings.json @@ -1,4 +1,5 @@ { - "Alt-/": "lua:comment.comment", - "CtrlUnderscore": "lua:comment.comment" -} \ No newline at end of file + "Alt-/": "lua:comment.comment", + "CtrlUnderscore": "lua:comment.comment", + "F6": "command-edit:gorename " +} diff --git a/micro/settings.json b/micro/settings.json index fa6a219..e99c7f3 100644 --- a/micro/settings.json +++ b/micro/settings.json @@ -3,5 +3,6 @@ "tabstospaces": false }, "colorscheme": "night-owl", - "tabsize": 2 + "tabsize": 2, + "tabtospaces": true } diff --git a/scripts/micro.sh b/scripts/micro.sh index 818f8a8..76a400a 100755 --- a/scripts/micro.sh +++ b/scripts/micro.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash function install () { + cd ~ + sudo apt-get install xclip curl https://getmic.ro | bash sudo mv micro /opt/bin sudo rm $HOME/.config/micro/settings.json diff --git a/scripts/php.sh b/scripts/php.sh new file mode 100755 index 0000000..32d63d2 --- /dev/null +++ b/scripts/php.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +function install () { + cd ~ + sudo apt-get install -y php php-mbstring php-json php-imap php-bz2 php-fpm php-curl php-cgi php-cli php-mysql php-pgsql + sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + sudo php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" + sudo php composer-setup.php + sudo php -r "unlink('composer-setup.php');" + sudo mv composer.phar /usr/local/bin/composer + printf "\n\n" + php --version + composer --version +} + +function uninstall () { + sudo rm /usr/local/bin/composer + sudo apt-get remove -y php* +} + +if [ "$1" == "install" ]; then + install +elif [ "$1" == "uninstall" ]; then + uninstall +else + echo "Only install and uninstall" +fi \ No newline at end of file