Skip to content

Instantly share code, notes, and snippets.

View tamimibrahim17's full-sized avatar
🎯
Focusing

Tamim Ibrahim tamimibrahim17

🎯
Focusing
  • Tikweb
  • Bangladesh
View GitHub Profile
#!/bin/bash
set -e -o errexit -o pipefail -o nounset
###################################
# This script can be used by itself, but it's recommended that you read
# a tutorial on Proxmox forum first: https://forum.proxmox.com/threads/hey-proxmox-community-lets-talk-about-resources-isolation.124256/
###################################
# Do not modify these variables (set by Proxmox when calling the script)
vmId="$1"
@tamimibrahim17
tamimibrahim17 / access_from_web.md
Created January 14, 2024 09:12 — forked from jasperf/access_from_web.md
MySQL Commands to create users, database, password and grant necessary privileges from the command line
mysql> CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON database_name.* TO 'user_name'@'localhost' WITH GRANT OPTION;
mysql> CREATE USER 'user_name'@'%' IDENTIFIED BY 'password';

mysql> GRANT ALL PRIVILEGES ON database_name.* TO 'user_name'@'%' WITH GRANT OPTION;

@tamimibrahim17
tamimibrahim17 / custom-provision.sh
Created December 7, 2023 21:31 — forked from neilgee/custom-provision.sh
Custom VVV Variable Provisioning for WordPress sites
# #!/bin/bash
# #
# # provision.sh
# #
# # This file is specified in Vagrantfile and is loaded by Vagrant as the primary
# # provisioning script whenever the commands `vagrant up`, `vagrant provision`,
# # or `vagrant reload` are used. It provides all of the default packages and
# # configurations included with Varying Vagrant Vagrants.
# # By storing the date now, we can calculate the duration of provisioning at the

Using Github Gists to VC bash_aliases

Version Control your .bash_aliases file using:


I'll use a sample .bash_aliases file for the tut:

# ~/.bash_aliases
==========================
How Software Companies Die
==========================
- Orson Scott Card
The environment that nurtures creative programmers kills management and
marketing types - and vice versa.
Programming is the Great Game. It consumes you, body and soul. When
you're caught up in it, nothing else matters. When you emerge into
$data = DB::connection('mysql')->select("Select '007' as po_code,'01' as company_code,'HO' as company_branch_code
,'01' as finance_code,'01' as project_code,'001' as component_code
,'01/2023' as mnyr,'CORE' as coa_id,l1_code,l2_code,l3_code,l4_code,l5_code
,0 as acctype,accgroup,SUM(Case WHen t.acc_group=4 Then cur_credit-cur_debit When t.acc_group Not In(2,4) Then cur_credit Else 0 End) as this_month_cash
,SUM(Case WHen t.acc_group=4 Then Op_credit-Op_debit+cur_credit-cur_debit WHen t.acc_group Not In(2,4) Then op_credit+cur_credit Else 0 End) as this_fy_cash
,0 as this_month_noncash,0 as last_june
,0 as bal_dr,0 as bal_cr,0 as cum_bal_cr
,0 as cum_bal_dr
From olrs_trailbalance t Inner Join (select distinct acc_chart,olrs_acc_chart from acc_map) a ON t.acc_id=a.acc_chart
Inner Join po_a_acc_head pa ON a.olrs_acc_chart=pa.Id
$data = DB::connection('mysql')->select("Select '007' as po_code,'01' as company_code,'HO' as company_branch_code
,'01' as finance_code,'01' as project_code,'001' as component_code
,'01/2023' as mnyr,'CORE' as coa_id,l1_code,l2_code,l3_code,l4_code,l5_code
,0 as acctype,accgroup,SUM(Case WHen t.acc_group=4 Then cur_credit-cur_debit When t.acc_group Not In(2,4) Then cur_credit Else 0 End) as this_month_cash
,SUM(Case WHen t.acc_group=4 Then Op_credit-Op_debit+cur_credit-cur_debit WHen t.acc_group Not In(2,4) Then op_credit+cur_credit Else 0 End) as this_fy_cash
,SUM(Case WHen t.acc_group=4 Then jr_credit-jr_debit When t.acc_group Not In(2,4) Then jr_credit Else 0 End) as this_month_noncash
,SUM(Case WHen t.acc_group=4 Then previouse_journal_credit-previouse_journal_debit+jr_credit-jr_debit WHen t.acc_group Not In(2,4) Then previouse_journal_credit+jr_credit Else 0 End) as this_fy_noncash
,0 as last_june
,0 as bal_dr,0 as bal_cr,0 as cum_bal_cr
,0 as cum_bal_dr
switch ($ind_code) {
case '001':
$query = $con->select('SELECT count(distinct(branch_id)) as data FROM `monthlySavingSummary` where report_date between ? and ?',$date_between);
break;
case '002':
$query = $con->select('SELECT sum(male_samity) as data FROM `monthlySavingSummary` where row_type = 1 and report_date between ? and ?',$date_between);
break;
@tamimibrahim17
tamimibrahim17 / index.html
Created April 1, 2021 14:10
frontend where it controlled
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Testing ajax loader</title>
</head>
<body>
<div id="progress">0</div>
@tamimibrahim17
tamimibrahim17 / dl.php
Created April 1, 2021 14:09
check status file to control progress
<?php
$lock_file = $_GET['lock_file'];
$data = file_get_contents($lock_file);
$data = unserialize($data);
echo json_encode($data);