Skip to content

Instantly share code, notes, and snippets.

View mdsami's full-sized avatar
🏠
Work from Mars

MD SAMI mdsami

🏠
Work from Mars
View GitHub Profile
@mdsami
mdsami / backup-mysql.sh
Created May 28, 2024 09:01
Mysql backup and upload to S3
#!/bin/bash
#----------------------------------------
# OPTIONS
#----------------------------------------
USER='root' # MySQL User
PASSWORD='root' # MySQL Password
DAYS_TO_KEEP=15 # 0 to keep forever
GZIP=1 # 1 = Compress
BACKUP_PATH='/Users/hellotask/Desktop/mysql'
#----------------------------------------
@mdsami
mdsami / s3Policy.json
Created May 28, 2024 07:21
S3 bucket Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ObjectPolicy",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:ListBucket",
"s3:GetObject",
@mdsami
mdsami / metabase.yml
Created May 26, 2024 21:46
metabase docker stack
version: '3'
services:
metabase:
image: metabase/metabase
ports:
- "8090:3000"
environment:
- MB_DB_TYPE=postgres
- MB_DB_DBNAME=metabase
@mdsami
mdsami / README.md
Created October 18, 2023 08:42 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@mdsami
mdsami / devops_best_practices.md
Created October 25, 2022 15:06 — forked from jpswade/devops_best_practices.md
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". In that same year, Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing issues around involving more of the comp

name: DemoApp PlayStore Release
on:
push:
branches: [ master ]
jobs:
version:
name: Create version number
runs-on: ubuntu-latest
@mdsami
mdsami / docker-compose.yml
Created June 5, 2022 06:07 — forked from pantsel/docker-compose.yml
example docker-compose.yml for kong, postgres and konga
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: admin-user
@mdsami
mdsami / joining.sql
Created April 23, 2022 10:57
SQL join
public function ajax_search(Request $request)
{
saveSearchData($request);
$keywords = array();
$search_products =
Product::join('brands', 'products.brand_id', '=', 'brands.id')
->join('product_categories', 'product_categories.product_id', '=', 'products.id')
->join('product_stocks', 'product_stocks.product_id', '=', 'products.id')
->where('products.published', 1)
->where('products.approve_status', 1)