Skip to content

Instantly share code, notes, and snippets.

View kmlxn's full-sized avatar
🌅
Alhamdulillah

Komilkhon Asamov kmlxn

🌅
Alhamdulillah
  • Uzbekistan
View GitHub Profile
@kmlxn
kmlxn / SAP Business One gists.md
Last active June 5, 2023 06:17
SAP Business One Hana SQL query to retrieve items in stock, their serial numbers and item groups.

SAP Business One Hana SQL query to retrieve items in stock, their serial numbers and item groups.

select
TOSRI."InDate" AS "Kelish sanasi",
TOSRN."CostTotal" AS "Tannarx",
TOITB."ItmsGrpNam" AS "Kategoriya",
TOITM."ItemName" AS "Nom",
TOSRI."IntrSerial" AS "IMEI",
TOITM."U_Color" AS "Rang",
TOITM."U_Condition" AS "Holat"
@kmlxn
kmlxn / set_up_django_proj_ubuntu_14.sh
Last active June 9, 2016 12:16
Bash script for settign up Django project on Ubuntu 14 with nginx, python 3, virtualenv and git installed
#!/bin/bash
set -e # exit script if any error occurs
# Bash script for settign up Django project on Ubuntu 14 with nginx, python 3,
# virtualenv, git installed
# Will create directory structure, clone source code, change Django secret key,
# set up Nginx conf, set up gunicorn upstart job.
# Upstart job will be named "site-<project_name>"
@kmlxn
kmlxn / query_string.py
Last active September 10, 2022 06:23
Django template tag to set/unset url query string parameter or replace parameter's value if it's already set
from django import template
from collections import namedtuple
register = template.Library()
@register.tag
def set_query_string_param(parser, token):
"""
Django template tag to set/unset url query string parameter