Skip to content

Commit

Permalink
osx up
Browse files Browse the repository at this point in the history
  • Loading branch information
akrisiun committed Nov 7, 2019
2 parents a149c96 + 5129b2d commit bdf44b2
Show file tree
Hide file tree
Showing 59 changed files with 4,361 additions and 449 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ fonts/
/dotc/
/git/neutrinolabs/
<<<<<<< HEAD
<<<<<<< HEAD
.DS_Store
GitExt/
vfp/
Expand All @@ -63,3 +64,6 @@ winenet45/

=======
>>>>>>> b7ab01c5dd70a7520514c45aa425e10b2d99cc4c
=======
*.ovpn
>>>>>>> origin/master
2 changes: 1 addition & 1 deletion .profile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
export PATH="/usr/bin:/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.

# MacPorts Installer addition was:
Expand Down
2 changes: 1 addition & 1 deletion .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ bind -n M-Down select-pane -D

setw -g monitor-activity on
set -g visual-activity on
set-window-option -g window-status-current-bg yellow

# set-window-option -g window-status-current-bg yellow
# set-option -g mouse-select-pane on
15 changes: 14 additions & 1 deletion .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@
export ZSH="/Users/andriusk/.oh-my-zsh"
export KUBECONFIG=~/.kube/config

# v10.16.3
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion


# bash:
# export PS1='$(whoami)@$(hostname):$(pwd) $ '
# zsh:
# export PROMPT="%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%1~ %{$reset_color%} "
# Short
# Short
export PROMPT1="%F{yellow}%1 ~ %F{white}"
# .zsh with no oh-my-zsh

export PROMPT="%F{magenta}%n%f@%F{yellow}${${(%):-%m}#zoltan-}%f %F{yellow}%1~ %F{white}"

export FrameworkPathOverride="/usr/local/lib/mono/4.5"
Expand Down Expand Up @@ -85,3 +92,9 @@ export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/b
# alias ohmyzsh="mate ~/.oh-my-zsh"

export PATH="/usr/local/opt/llvm/bin:$PATH"

export LC_NUMERIC="en_LT"
export LC_TIME="en_LT"
export LC_COLLATE="en_LT"
export LC_MONETARY="en_LT"
export LC_MESSAGES="en_LT"
32 changes: 32 additions & 0 deletions NODEJS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## For Debian

Install nodejs v10 for debian

```
sudo apt-get install -y nodejs
# with Nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
# .nvm/*
source ~/.bashrc
export PS1="$ "
nvm -v
nvm install 10.17.0
nvm use 10.0
node -v
nvm -v
npm -v
npm i -g npm
npm i -g yarn
sudo npm i --global optimist
```

# /usr/local/lib/node_modules/

```
echo $USER
ln -s /home/$USER/.nvm/versions/node/v10.0.0/lib/node_modules /usr/local/lib/node_modules
ls /usr/local/lib/node_modules
```
37 changes: 37 additions & 0 deletions Ssh_ed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## upgrade-your-ssh-key-to-ed25519

https://medium.com/risan/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54

```
export me = ?
echo [email protected]
echo $HOST
echo $me
ssh-keygen -t ed25519 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
nano ~/.ssh/config
# file:
Host *
AddKeysToAgent yes
IgnoreUnknown UseKeychain
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
IdentityFile ~/.ssh/id_rsa # Keep any old key files if you want
cat ~/.ssh/id_ed25519
ssh-copy-id -f -i ~/.ssh/id_ed25519 $HOST -p 22
ssh -i ~/.ssh/id_ed25519 $HOST -p 22 -vv
ssh $HOST cat ~/.ssh/authorized_keys
```

Troubles
1. ssh ed25519 Bad configuration option: usekeychain
IgnoreUnknown UseKeychain

2. Offering ED25519 public we sent a publickey packet, wait for reply ???
FIX :
chmod 755 ~
50 changes: 50 additions & 0 deletions User/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
// C:\Users\akris\AppData\Roaming\Code\User\settings.json
"scm.alwaysShowActions": true,
"scm.alwaysShowProviders": true,
"workbench.view.alwaysShowHeaderActions": true,
"workbench.startupEditor": "newUntitledFile",

"debug.node.autoAttach": "on",
"files.exclude": {
"**/*.csproj.user": true,
"**/*.exe": true,
"**/*.zip": true,
"**/bin/": true,
"**/obj/": true,
"**/node_modules/": true,
"yarn.lock": true
},
"terminal.integrated.shell.windows": "c:\\Program Files\\PowerShell\\6\\pwsh.exe",
"terminal.integrated.rendererType": "dom",
"explorer.confirmDelete": false,
"git.confirmSync": false,

"editor.fontFamily": "DejaVu Sans Mono for Powerline",
"terminal.integrated.fontFamily": "DejaVu Sans Mono for Powerline",
"terminal.integrated.shellArgs.linux": [ "zsh" ],
"powershell.promptToUpdatePowerShell": false,

"workbench.colorTheme": "Visual Studio Dark",
"workbench.enableExperiments": false,
"workbench.settings.enableNaturalLanguageSearch": false,
"update.mode": "manual",
"update.showReleaseNotes": false,
"extensions.autoCheckUpdates": false,
"extensions.autoUpdate": false,
"git.autofetch": false,
"telemetry.enableTelemetry": false,
"extensions.showRecommendationsOnlyOnDemand": true,
"extensions.ignoreRecommendations": true,

"terminal.external.windowsExec": "powershell",
"terminal.integrated.confirmOnExit": true,
"terminal.integrated.splitCwd": "workspaceRoot",
"[jsonc]": {
},
"[json]": {
},
"files.associations": {
"*.json": "jsonc"
},
}
21 changes: 21 additions & 0 deletions code
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
#
# https://dev.to/babak/how-to-run-vs-code-on-the-server-3c7h
# ssh -N -L 0.0.0.0:8443:localhost:8443 login@your-server 2> /dev/null

abs=$(realpath .)
req=$1

if [[ ! $1 =~ ^\/ ]];
then
req="$abs/$1"
fi;

if [[ ! -d $req ]];
then
echo "ERROR: path does not exist"
echo "$req"
exit;
fi;

~/code-server/code-server $req --no-auth
4 changes: 3 additions & 1 deletion debian9/.tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ set-window-option -g window-status-current-bg yellow
# exit: Ctrl+A shift+; killp<Enter>

# Open current directory
# bind o run-shell "open #{pane_current_path}"
# bind o run-shell "open #{pane_current_path}"
# setup:
# ln -s ~/bin/debian9/.tmux.conf ~/.tmux.conf
18 changes: 3 additions & 15 deletions debian9/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
### Linux (Debian too) brew http://linuxbrew.sh/
```
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
sudo apt-get install build-essential curl file git python-setuptools
brew doctor
git clone -b debian https://github.com/akrisiun/bin ~/bin
```

## Install sequence (macOS)
```
git clone -b debian https://github.com/akrisiun/bin ~/bin
rm ~/.bash_profile && ln -s ~/bin/.bash_profile ~/.bash_profile
. ~/.bash_profile
cd ~/bin
# /mnt/c/bin/bin/debian9/

=======
### Linux (Debian too) brew http://linuxbrew.sh/

```
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
sudo apt-get install build-essential curl file git python-setuptools
Expand All @@ -23,6 +10,7 @@ git clone -b debian https://github.com/akrisiun/bin ~/bin
```

## Install sequence (macOS)

```
git clone -b debian https://github.com/akrisiun/bin ~/bin
rm ~/.bash_profile && ln -s ~/bin/.bash_profile ~/.bash_profile
Expand Down
63 changes: 63 additions & 0 deletions debian9/XFCE.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
<<<<<<< HEAD

=======
>>>>>>> origin/master
## Debian XFCE windows manager + VNC

```
sudo apt-get update
sudo apt-get install -y libgtk-3-0
sudo apt-get install -y xfce4 xfce4-goodies tightvncserver -y
<<<<<<< HEAD
dpkg-reconfigure x11-common
```

/etc/X11/Xwrapper.config –

This file has as setting called “allowed_users”.
=======
sudo apt-get install -y x11-apps
sudo apt-get install -y xvfb x11vnc xdotool wget tar supervisor net-tools
sudo apt-get install -y xauth xorg net-tools x11-apps dnsutils

# dpkg-reconfigure x11-common
sudo /etc/init.d/x11-common restart

#untrusted X11 forwarding setup failed: xauth key data not generated
#tightvncserver
vncserver -geometry 1550x850 :2

#test
xcalc
```
## /etc/X11/Xwrapper.config
This file has as setting called `allowed_users`
>>>>>>> origin/master
It can accept three values:
1. root
Expand All @@ -26,10 +50,49 @@ In Debian and its derivatives like Ubuntu, you can run the following command to
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
<<<<<<< HEAD
ssh-keygen -R {server.name.com}
sudo service --status-all | less
OSX:
defaults write com.apple.Finder FXPreferredViewStyle Nlsv
chflags nohidden ~/Library
=======
```
ssh-keygen -R {server.name.com}

sudo service --status-all | less
```
OSX:
```
defaults write com.apple.Finder FXPreferredViewStyle Nlsv
chflags nohidden ~/Library
```
## supervisord
https://github.com/solarkennedy/wine-x11-novnc-docker/blob/master/supervisord.conf
```
export LC_ALL=C.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

# dpkg --add-architecture i386
sudo apt-get update
sudo apt-get -y install xvfb x11vnc xdotool wget tar supervisor net-tools
#wine32-development fluxbox
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf

```
# RUN
```
sudo /etc/init.d/x11-common restart
sudo ps -aux | grep vnc

vncserver -geometry 1550x850 :2
```
>>>>>>> origin/master
3 changes: 3 additions & 0 deletions debian9/dns-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

sudo apt-get update
sudo apt install -y dnsutils
6 changes: 6 additions & 0 deletions debian9/gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is Git's per-user configuration file.
# cp gitconfig ~/.gitconfig
[user]
# Please adapt and uncomment the following lines:
name = Andrius-K
email = [email protected]
Empty file modified debian9/mount_w.sh
100644 → 100755
Empty file.
28 changes: 28 additions & 0 deletions debian9/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/zsh

echo "Install links to ~"

echo "~/.tmux.conf"
ln -s -f ~/bin/debian9/.tmux.conf ~/.tmux.conf

sudo apt-get install -y openvpn curl wget zsh net-tools dnsutils

# https://github.com/http-party/http-server
#!/usr/bin/env node

# unsecure...
sudo chown andriusk /usr/local/bin
# curl https://raw.githubusercontent.com/http-party/http-server/master/bin/http-server > /usr/local/bin/http-server
# chmod +x /usr/local/bin/http-server
# http-server . -p 9099

ln -s ~/bin/http /usr/local/bin/http
chmod +x /usr/local/bin/http
# http -p 3001
# ssh -L 3000:localhost:3000 $ip sleep 1d &

echo "chmod +x *.sh" > /usr/local/bin/chmod-sh
chmod +x /usr/local/bin/chmod-sh

echo "chmod +x *.sh" > /usr/local/bin/chmod-x
chmod +x /usr/local/bin/chmod-x
Loading

0 comments on commit bdf44b2

Please sign in to comment.