- https://docs.docker.com/docker-for-mac/
- you can install rancher desktop that configures what is necessary on the machine
- start the "docker desktop" app from the finder
- no free "docker licence" for companies > 250 people
- https://apple.stackexchange.com/questions/435962/running-docker-daemon-on-apple-silicon-without-docker-desktop
- docker desktop includes
- Docker Engine (acts as a client-server application)
- Docker CLI client
- Docker compose
- ( https://docs.docker.com/desktop/ )
- brew install docker
- brew install docker-machine
- brew install --cask virtualbox. (not sure if we need this)
- docker pull elasticsearch:7.7.1
- brew list
- . docker
- . docker-machine
- docker info
- Client:
- Context: default
- Debug Mode: false
- Plugins:
- buildx: Docker Buildx (Docker Inc., v0.8.2)
- compose: Docker Compose (Docker Inc., v2.6.1)
- extension: Manages Docker extensions (Docker Inc., v0.2.7)
- sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
- scan: Docker Scan (Docker Inc., v0.17.0)
- Server:
- Containers: 23
- Running: 1
- Paused: 0
- Stopped: 22
- Images: 57
Monday, May 25, 2020
Docker on mac
Monday, May 6, 2019
Multiple git accounts
Using multiple ssh keys for multiple gits:
https://gist.github.com/jexchan/2351996
Add the ssh keys on github
Some possible "git config --list" options are "--local" and "--global"
If you don't specify --global, it takes the local config by default.
To display the actual “git config” do:
git config --list
git config --list
git config user.name
git config user.email
Before you commit, you need to be sure you are using the correct one.
You can set it by doing:
git config user.name "abc"
git config user.email "abc@abc.com"
The local config will be saved in .git/config
The global config is saved in ~/.gitconfig
The local config will be saved in .git/config
The global config is saved in ~/.gitconfig
"url" must be a git@something in .git/config, should not be https. If it is https, use:
It will change your .git/config
_______ git clone
to display default config:
git config --global --list
- You can use
- git clone XX -c user.name=toto -c user.email=toto@toto.com (this will set .git/config)
- or
- git config --global user.name "xxx"
- git config --global user.mail "xxx"
- git clone git@github.com:youruser/myj-gh (need ssh keys)
______________ Just using ~/.ssh$ more config
Host *.internal 10.*
identityfile ~/.ssh/id_rsa
Host *github.com
identityfile ~/.ssh/id_rsa_github
Tuesday, April 16, 2019
Google services empty the battery
Android is up to date.
Google Services is making continuous network access and empty the battery. It stops when network is disabled.
solution: register for the Google Services beta program. That's the only way to update/change Google Services
.
Google Services is making continuous network access and empty the battery. It stops when network is disabled.
solution: register for the Google Services beta program. That's the only way to update/change Google Services
.
Thursday, February 14, 2019
Mac survival kit
- ask different
- fonctionnalities, F keys. To be able to debug in vscode for example
- fn + F12. go to dashboard (calendar, calculator)
- by default F7, F8 don't workon intelliJ
- System Preferences > Keyboard > function keys > Use F1,F2 as function keys
- about .bash_profile
- MacOS (formerly OS X) is based on BSD Unix
- list of installs made:
- less /Library/Receipts/InstallHistory.plist
- machine info
- sysctl -n machdep.cpu.brand_string
- system_profiler | grep Processor
- system_profiler
- updatedb
-
(base) lee@a8:~$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
- (base) lee@a8:~$ sudo /usr/libexec/locate.updatedb
- (base) lee@a8:~$ locate logs
- install kdiff3
- brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask/6a96e5ea44803e52a43c0c89242390f75d1581ab/Casks/kdiff3.rb
- if you need to untar things like mvn, you can do so in /usr/local using sudo. Other folders are protected even using sudo
- colors
- console and vi:
- go to terminal (console) / preferences / Profiles / Basic / ANSI Colors
- change them
- brew
- brew list
- brew doctor
- brew services list
- brew services info docker-machine
- brew services start tomcat
- brew install --cask warp (cask specify that it is an app)
- which bash / zsh ?
- echo $0
- set bash as the default shell
- echo '/opt/homebrew/bin/bash' | sudo tee -a /etc/shells
- chsh -s /opt/homebrew/bin/bash
- zsh
- ps -ef, htop prefered
- sometimes buggy, switch to bash
- ex: find . |grep ".py"|xargs grep fill (not working on my zsh)
- this works on zsh but not on sh for big files
- sort -u toto.txt > out.txt
- list open ports
- lsof -nP -iTCP -sTCP:LISTEN
- network (use bash)
tcpdump -n -A -p -i lo0 host 127.0.0.1 > tcp-tmp.txt
list open ports
- netstat -anvp tcp | awk 'NR<3 || /LISTEN/'|grep 8080
- java
- install Java
- brew install openjdk@17
- sudo ln -sfn /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk
- echo 'export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"' >> ~/.zshrc
- JAVA_HOME="$(/usr/libexec/java_home -v 20)"
- installed JVM
- lee@al8:~/dev/nemo-etab-etl$ /usr/libexec/java_home -V
- Matching Java Virtual Machines (3):
- 17.0.10 (x86_64) "Oracle Corporation" - "Java SE 17.0.10" /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
- 15.0.2 (x86_64) "Oracle Corporation" - "Java SE 15.0.2" /Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home
- 11.0.7 (x86_64) "Oracle Corporation" - "Java SE 11.0.7" /Library/Java/JavaVirtualMachines/jdk-11.0.7.jdk/Contents/Home
- /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
- ll /Library/Java/JavaVirtualMachines/
- switch version, just change JAVA_HOME
- # export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-11.0.7.jdk/Contents/Home"
- export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home"
- keychain / Password app
- recently the keychain part app was transformed into the password app
- but the hided key chain app can still be accessed by searching "Keychain Access" in the finder window search bar
- Finder
- cmd + shift + .(period) to display dot files
- Terminal
- cmd + i : allows to change color / title of tabs
- audio device stuck
sudo pkill -9 coreaudiod
Tuesday, February 5, 2019
install nvidia driver on Ubuntu
https://websiteforstudents.com/install-proprietary-nvidia-gpu-drivers-on-ubuntu-16-04-17-10-18-04/
lshw -c video
(driver for NVidia GK107GL [Quadro K600]:
sudo apt install nvidia-346)
.
.
.
Wednesday, January 23, 2019
Data types comparison
| \ | JSON | Python | STL |
| object | JSON object { "fist_name" : "John", "last_name" : "Doe" } (necessarely key-value pairs, also called properties, key unique) | object | object |
| immutable list | tuple t="a",b,123 or t=("a",b,123) | tuple | |
| dynamic array, ordered, value not unique | JSON array ["a","b","c","a"'] | not supported, use lists instead | vector |
| doubly-linked list, key not unique | list [a,b,c,a] | list | |
| tree, sorted, key unique | set {a,b,c} | set | |
| map, key unique | dictionary (actually object) {"a":"b", "c":"d"} | dictionary {"a":"b", "c":"d"} | map |
dynamic array: get realloc depending on its evolving size.
.
Monday, December 24, 2018
remmina
To connect to another Ubuntu machine using remmina, enable desktop sharing on the server machine, by starting the associated application:
"Desktop sharing"
and allow other users to view your desktop.
NOTE: copy/paste doesn't work between server and client...
"Desktop sharing"
and allow other users to view your desktop.
NOTE: copy/paste doesn't work between server and client...
Subscribe to:
Posts (Atom)