Skip to content

Instantly share code, notes, and snippets.

View abidtkg's full-sized avatar
:atom:
Converting idea to code

Abid Hasan abidtkg

:atom:
Converting idea to code
View GitHub Profile
@abidtkg
abidtkg / .htaccess
Created August 17, 2023 10:05
Angular htaccess config
Options FollowSymLinks ExecCGI
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
# If the requested file is not an existing directory or file
RewriteCond %{REQUEST_FILENAME} !-f
@abidtkg
abidtkg / netlify.toml
Created October 22, 2022 20:27
Netlify angular routing
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
@abidtkg
abidtkg / woocommerce_order_get_methods.php
Created May 30, 2022 13:23
Woocommerce order get methods
// Get $order object when you have the ID.
$order = wc_get_order( $order_id );
// Get order key.
$order->get_order_key();
// Get Order Totals $0.00
$order->get_formatted_order_total();
$order->get_cart_tax();
$order->get_currency();
# FILTER PEOPLE FUNCTION DEFINED
def filterPeople(peoples):
# CREATED EMPTRY ARRAY FOR INSERTING FILTERD NAME
filteredName = []
# LOOP THROUGH THE WHOLE ARRAY
for people in peoples:
# LOGIC APPLY USING IF
if(people[1] >= 12):
# PUSH THE NAME INTO THE ARRAY
filteredName.append(people[0])
@abidtkg
abidtkg / app.js
Created April 15, 2020 05:22
Basic Structure Of Node Express
const express = require('express');
const app = express();
// BASIC ROUTING
app.get('/', (req, res) => {
res.status(200).json({message: "Hello From NodeJS Server});
});
// PORT TO LISTEN http://localhost:3000/
app.listen(3000)
@abidtkg
abidtkg / Basic_.idea_Basic.iml
Created October 29, 2018 17:16
Basic Python Codes
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="R User Library" level="project" />
<orderEntry type="library" name="R Skeletons" level="application" />