Skip to content

Instantly share code, notes, and snippets.

View pourmand1376's full-sized avatar
😉
Learning

Amir Pourmand pourmand1376

😉
Learning
View GitHub Profile
@pourmand1376
pourmand1376 / tutorial.md
Created November 9, 2022 15:18 — forked from Makeshift/tutorial.md
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup

@pourmand1376
pourmand1376 / nvv.sh
Created April 15, 2022 18:05 — forked from WeiTang114/nvv.sh
Show username after each process in nvidia-smi.
#!/bin/bash
# Show username after each process in nvidia-smi
# like:
# ...
# +------------------------------------------------------+
# | Processes: GPU Memory |
# | GPU PID Type Process name Usage |
# |======================================================|
# | 0 150752 C python 830MiB | User: user1
# | 1 2185 C /usr/bin/python 1090MiB | User: user2
@pourmand1376
pourmand1376 / github_desktop_ubuntu.sh
Created July 16, 2021 21:52 — forked from berkorbay/github_desktop_ubuntu.md
To install Github Desktop for Ubuntu
#sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.1.0-linux1/GitHubDesktop-linux-2.1.0-linux1.deb
#sudo gdebi GitHubDesktop-linux-2.1.0-linux1.deb
# UPDATE (2021-03-05): Thanks to PaoloRanzi81's comment, the updated code is as follows https://gist.github.com/PaoloRanzi81
sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.6.3-linux1/GitHubDesktop-linux-2.6.3-linux1.deb
### Uncomment below line if you have not installed gdebi-core before
# sudo apt-get install gdebi-core
sudo gdebi GitHubDesktop-linux-2.6.3-linux1.deb
DECLARE @Name nvarchar(1000);
DECLARE @Sql nvarchar(1000);
DECLARE @Result int;
IF OBJECT_ID('tempdb..#myTable') IS NOT NULL
DROP TABLE #myTable
CREATE TABLE #myTable(
row INT,
query NVARCHAR(500))