Skip to content

Instantly share code, notes, and snippets.

View hamid-rostami's full-sized avatar
🎯
Focusing

Hamid Rostami hamid-rostami

🎯
Focusing
View GitHub Profile
@hamid-rostami
hamid-rostami / .emacs
Created December 6, 2023 09:47
My Emacs Config File
(make-directory "~/.emacs_backups/" t)
(make-directory "~/.emacs_autosave/" t)
(setq backup-directory-alist '(("." . "~/.emacs_backups/")))
(setq auto-save-file-name-transforms '((".*" "~/.emacs_autosave/" t)))
(setq ring-bell-function 'ignore)
@hamid-rostami
hamid-rostami / jupyter-venv.md
Created September 8, 2023 09:59
Virtualenv for Jupyterlab
  • First create a virtualenv: python -m venv --system-site-packages myenv

  • Install ipykernel: pip install --user ipykernel

  • Create a jupyter kernel: python -m ipykernel install --user --name=myenv

@hamid-rostami
hamid-rostami / README.md
Last active February 10, 2024 04:19
wireguard over TCP

To pass wireguard's traffic through a TCP tunnel by using udp2raw

Requirements

For Arch linux, install udp2raw by pacman: pacman -S udp2raw

For Debian or Ubuntu, you can use a binary release from: https://github.com/wangyu-/udp2raw/releases

@hamid-rostami
hamid-rostami / README.md
Created March 25, 2022 17:23
Deploy Maven project to Tomcat

By following this instruction, you will be able to deploy your Java web application to your Tomcat server from command-line just by a simple command:

mvn tomcat7:deploy

First of all, make sure you have installed tomcat server. Then you need to create a user with manager-gui and manager-script privilages. You can do this by editing tomcat-users.xml file. On a GNU/Linux machine, it must be located under /etc/tomcat directory. Open it by a text editor and add this line (Don't forget to edit your-username and your-password).

@hamid-rostami
hamid-rostami / README.md
Last active November 30, 2019 18:54
Add ngrok to systemd
  1. Add ngrok.service to /etc/systemd/system directory
  • At section ExecStart replace /path/of/executable/ngrok with full path of ngrok executable downloaded from ngrok website

  • Replace USER with your user account

  1. Add ngrok.yml to /home/USER/.ngrok2 directory
  • Replace TOEKN with your token from ngrok.com dashboard