Skip to content

Instantly share code, notes, and snippets.

View QuvonchbekBobojonov's full-sized avatar
🇵🇸
free palestine

Quvonchbek Bobojonov QuvonchbekBobojonov

🇵🇸
free palestine
View GitHub Profile
@QuvonchbekBobojonov
QuvonchbekBobojonov / barcode.js
Created January 9, 2024 06:29
USB barcode scanning code in javascript
let scan = ''
const lang = window.localStorage.getItem('lang', 'ru')
window.addEventListener('keydown', function(e) {
if (e.key === 'Enter') {
if (document.querySelector('#id_barcode')) {
document.querySelector('#id_barcode').value = scan
document.querySelector('#id_barcode').dispatchEvent(new Event('input'))
scan = ''
} else if (window.location.pathname === window.localStorage.getItem('url_main')) {
addCard(`/${lang}/pos/add-to-card/barcode/${scan}/`)
@QuvonchbekBobojonov
QuvonchbekBobojonov / deployment.yml
Created December 16, 2023 10:21
Auto deployment for Github
name: Deployment
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
@QuvonchbekBobojonov
QuvonchbekBobojonov / bot.yml
Last active December 16, 2023 10:17
Action that sends a commit telegram chat to a project on github | Telegram Notification
name: Telegram Notification
on:
push:
branches:
- main
jobs:
send-telegram-notification:
runs-on: ubuntu-latest