Saturday, December 21, 2024

Docker commands

 Was trying to create a docker for android. Here are the commands I used:

* sudo apt-get install qemu-kvm

* curl -fsSL https://get.docker.com -o get-docker.sh

* sh ./get-docker.sh

*docker run -d -p 6080:6080 -e EMULATOR_DEVICE="Samsung Galaxy S10" -e WEB_VNC=true --device /dev/kvm budtmo/docker-android:emulator_13.0

* sudo chmod 666 /var/run/docker.sock 

(if permission denied in previous step)

* docker ps

* docker stop <NAME>

Tuesday, December 10, 2024

Date conversion in MySQL

With recent release, MySQL throws error when inserting dates. This is because, by default "strict mode" is enabled. To get rid of the errors, we need to do something as follows:

SHOW VARIABLES LIKE 'sql_mode';


set sql_mode='';

Friday, November 15, 2024

Installing IBC (Interactive Broker Controller)

 This is a nice utility to keep ibkr TWS running. These are the commands :

$ wget https://github.com/IbcAlpha/IBC/releases/download/3.20.0/IBCLinux-3.20.0.zip

$ sudo unzip IBCLinux-3.20.0.zip -d /opt/ibc

$ sudo chmod o+x /opt/ibc/*.sh /opt/ibc/*/*.sh

$ cat ~/ibc/config.ini

     IbLoginId=<username>

     IbPassword=<password>

$ rm IBCLinux-3.20.0.zip

Friday, September 6, 2024

New Linux installation checklist

  • sudo apt install ~/Downloads/google-chrome-stable_current_amd64.deb
  • sudo apt-get install gnome-browser-connector
  • sudo apt install libreoffice
  • sudo apt install git-all
  • ssh-keygen -t rsa
  • sudo snap install code
  • sudo apt install python3-venv
  • python3 -m venv ~/.venv/ibkr_python

  • https://extensions.gnome.org/extension/1160/dash-to-panel/
    • Dash-to-panel settings (right click) -> ungroup applications
  • settings -> system -> date/time -> show weekday

  • Install vscode, extensions- python

Tuesday, September 3, 2024

git commands

Following are basic git commands which should be sufficient for most of the git use :

git fetch
git pull
git commit
git push

Security cameras from desktop

 Need to install ffmpeg in order to access rstp streams

* sudp apt install ffmpeg

Once it is installed, you can access the cameras via

* ffplay rtsp://hpatil:<pass>@<ip_address>:554/stream1

Monday, August 26, 2024

More than one ssh key for the github

 * Generate new key:

[18:05:20 harsshal@dell:~/projects]$ ssh-keygen -t ed25519 -C "harsshal@gmail.com"

* Add new key in the ssh config

[18:07:35 harsshal@dell:~/projects]$ cat ~/.ssh/config 
TCPKeepAlive yes

Host 10.234.1.112
  HostName 10.234.1.112
  User harshal

# Default GitHub
Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa

Host github-public
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519.pub

Host github-personal
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519

* Clone the repo

[18:09:02 harsshal@dell:~/projects]$ git clone git@github-personal:harsshal/icarus_gl.git

Friday, July 5, 2024

Jupyter notebook setup

jupyter notebook password

jupyter notebook --notebook-dir [LOCATION] --no-browser --ip=192.168.255.X

Monday, June 3, 2024

Installing a module directly from repo

pip install git+https://github.com/blampe/IbPy.git

pip install git+https://github.com/atreyuxtrading/atreyu-backtrader-api.git