Skip to content

Instantly share code, notes, and snippets.

View sm-hejazi's full-sized avatar
🎯
Focusing

S.Mahdi sm-hejazi

🎯
Focusing
  • Monta
  • iran
View GitHub Profile
#!/bin/sh
git remote update
UPSTREAM=${1:-'@{u}'}
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse "$UPSTREAM")
BASE=$(git merge-base @ "$UPSTREAM")
if [ $LOCAL = $REMOTE ]; then
@sm-hejazi
sm-hejazi / Sql_tbl-size
Created November 4, 2023 15:09
Calculate the size of all tables in the database in megabytes
-- Calculate the size of all tables in the database in megabytes
SELECT
t.NAME AS TableName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 / 1024 AS TotalSpaceMB,
SUM(a.used_pages) * 8 / 1024 AS UsedSpaceMB,
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 / 1024 AS UnusedSpaceMB
FROM
sys.tables t
INNER JOIN
@sm-hejazi
sm-hejazi / .deps...remix-tests...artifacts...TestsAccounts.json
Created March 14, 2022 16:03
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.16+commit.9c3226ce.js&optimize=true&runs=200&gist=
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},