Skip to content

Instantly share code, notes, and snippets.

View babarlhr's full-sized avatar

ishfaq babar babarlhr

View GitHub Profile
@babarlhr
babarlhr / gridViewAllOptions.aspx
Last active October 14, 2025 14:43
all options for Grid View
Declarative Syntax
Copy
<asp:GridView
AccessKey="string"
AllowPaging="True|False"
AllowSorting="True|False"
AutoGenerateColumns="True|False"
AutoGenerateDeleteButton="True|False"
AutoGenerateEditButton="True|False"
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /App
# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out
@babarlhr
babarlhr / video-editors-opensource.md
Created April 25, 2024 12:40 — forked from jcamp/video-editors-opensource.md
OpenSource Video Editors
@babarlhr
babarlhr / web.config
Created March 28, 2024 04:24 — forked from sdwh/web.config
IIS .NET Framework Web Config
<?xml version="1.0" encoding="utf-8"?>
<!-- the root web configuration file -->
<configuration>
<!--
Using a location directive with a missing path attribute
scopes the configuration to the entire machine. If used in
conjunction with allowOverride="false", it can be used to
prevent configuration from being altered on the machine
Administrators that want to restrict permissions granted to
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_0.10 | sudo bash -
sudo apt-get install -y nodejs
sudo npm install -g npm (to update npm)
ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
* Complete uninstall of nodejs and npm
DO: apt-get autoremove --purge nodejs npm
import xmlrpclib
HOST = 'localhost'
PORT = 8069
DB = 'DATABASE_NAME'
USER = 'admin'
PASS = 'admin'
ROOT = 'http://%s:%d/xmlrpc/' % (HOST,PORT)
# 1. Login
uid = xmlrpclib.ServerProxy(ROOT + 'common').login(DB,USER,PASS)
https://help.ubuntu.com/community/PostgreSQL
http://stackoverflow.com/questions/24917832/how-connect-postgres-to-localhost-server-using-pgadmin-on-ubuntu
Postgres
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo su postgres -c psql
<!DOCTYPE html>
<html>
<head>
<metea charset="utf8">
<title></title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.js"></script>
<script type="text/javascript">
function readURL(input) {
if (input.files && input.files[0]) {
@babarlhr
babarlhr / GeoIP.txt
Created January 30, 2023 06:56 — forked from ppa-odoo/GeoIP.txt
GeoIP Configuration
sudo add-apt-repository ppa:maxmind/ppa
sudo apt update
sudo apt install libgeoip1 libgeoip-dev geoip-bin
sudo pip3 install GeoIP # For Python 3
sudo apt-get install geoip-database-contrib
==================================================
import GeoIP
geofile = config.get('geoip_database')
gio_data = GeoIP.open(geofile, GeoIP.GEOIP_STANDARD).record_by_addr(ip)
return gio_data
@babarlhr
babarlhr / __manifest__
Created January 30, 2023 06:55 — forked from ppa-odoo/__manifest__
Odoo __manifest__ File
# -*- coding: utf-8 -*-
# Copyright <YEAR(S)> <AUTHOR(S)>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Module name",
"summary": "Module summary",
"version": "11.0.1.0.0",
"development_status": "Alpha|Beta|Production/Stable|Mature",
"category": "Uncategorized",
"website": "https://github.com",