Skip to content

Instantly share code, notes, and snippets.

@parsaM110
parsaM110 / time.vue
Last active February 11, 2024 15:36
tying to use and customize html5 input time for my need but doesn't fulfill all the needs | use @vuepic/vue-datepicker instead
<template>
<v-app>
<v-container>
<input
type="time"
v-model="time"
class="without_ampm"
step="1"
min="00:00"
max="01:00"
@parsaM110
parsaM110 / finding_nearest_point_using_KNN.ipynb
Last active March 3, 2024 09:05
finding_nearest_point_using_KNN
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@parsaM110
parsaM110 / code.js
Created July 20, 2024 15:07
WebHarvey ajax - button more education for linkedin
var buttons = document.getElementsByTagName('button');
for (var i = buttons.length - 1; i >= 0; i--) {
  var button = buttons[i];
  if(button.innerText.includes('more education')) {
      button.click();
      break;
  }
}
S3KEY=""
S3SECRET="" # pass these in
bucket='bucket-name'
file="download.jpeg"
date=$(date +"%a, %d %b %Y %T %z")
string="GET\n\n\n$date\n/$bucket/$file"
signature=$(echo -en "${string}" | openssl sha1 -hmac "${S3SECRET}" -binary | base64)
curl -X GET --output \
// first go to https://rozmusic.com/%D9%85%D8%B9%DB%8C%D9%86-%D8%B2%D8%AF-%D8%AF%D9%88%D8%A8%D8%A7%D8%B1%D9%87-%D8%A8%D8%A7%D8%B2.html
// interact - play for first time and then paste this code
let audio = new Audio("https://dl.rozmusic.com/Music/1403/08/09/Moein%20Z%20-%20Dobareh%20Baz%20%28128%29.mp3");
// Set the start time (in seconds)
audio.currentTime = 141;
@parsaM110
parsaM110 / README.md
Last active February 2, 2025 06:30
word + latex

never use /left and /right

for matrix :

[\begin{matrix}1.000 & 0.324 & 0.135 \\0.324 & 1.000 & 0.082 \\0.135 & 0.082 & 1.000\\\end{matrix}]

[\begin{matrix}&&\\&&\\&&\\\end{matrix}]

\left(\begin{matrix}&&&&&\\&&&&&\\&&&&&\\\end{matrix}\right)
@parsaM110
parsaM110 / postgres_db_connection_test.py
Created February 23, 2025 16:12
python test postgres DB connection
import psycopg2
DB_NAME = "postgres"
DB_USER = "postgres"
DB_PASS = ""
DB_HOST = "localhost"
DB_PORT = "5432"
try:
conn = psycopg2.connect(database=DB_NAME,
@parsaM110
parsaM110 / Install_MariaDB.md
Last active May 16, 2025 16:06
Install MariaDB

Maria DB

apt install mariadb-server mariadb-client

try to always install mariadb it is better than mysql

sudo mysql_secure_installation

for production purposes do this

@parsaM110
parsaM110 / README.md
Created April 15, 2025 08:17
node, npm, nvm management

install global cli-based package:

sudo npm install -g gitmoji-cli

see the list of installed package:

npm ls -g --depth=0

uninstall package:

@parsaM110
parsaM110 / apt.md
Last active May 17, 2025 12:35
Package mangers

Apt

see the installed

apt list --installed