Skip to content

Instantly share code, notes, and snippets.

View ZakiMohammed's full-sized avatar
🎨
Painting

Zaki Mohammed ZakiMohammed

🎨
Painting
View GitHub Profile
@ZakiMohammed
ZakiMohammed / fragment-policy.xml
Created January 20, 2024 13:38
Creating Send Request Policy in APIM
<policies>
<inbound>
<base />
<set-variable name="audience" value="938c1d33-5075-474c-b91a-1b539388ab54" />
<include-fragment fragment-id="ValidateJwtFragment" />
</inbound>
<backend>
<base />
</backend>
<outbound>
@ZakiMohammed
ZakiMohammed / fragment-policy.xml
Created January 20, 2024 07:14
Passing Input to APIM Fragment
<policies>
<inbound>
<base />
<set-variable name="audience" value="938c1d33-5075-474c-b91a-1b539388ab54" />
<include-fragment fragment-id="ValidateJwtFragment" />
</inbound>
<backend>
<base />
</backend>
<outbound>
@ZakiMohammed
ZakiMohammed / example-1.xml
Created December 27, 2023 13:47
Validate Jwt Policy Fragment
<policies>
<inbound>
<base />
<!-- policy -->
<validate-jwt
header-name="Authorization"
failed-validation-httpcode="401"
failed-validation-error-message="Unauthorized"
require-scheme="Bearer"
@ZakiMohammed
ZakiMohammed / dead-code.ruleset
Created June 13, 2023 18:36
Resharper InspectCode Report
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Dead Code Rules" Description=" " ToolsVersion="12.0">
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1801" Action="Warning" />
<Rule Id="CA1804" Action="Warning" />
<Rule Id="CA1811" Action="Warning" />
<Rule Id="CA1812" Action="Warning" />
<Rule Id="CA1823" Action="Warning" />
</Rules>
<Rules AnalyzerId="Microsoft.Analyzers.NativeCodeAnalysis" RuleNamespace="Microsoft.Rules.Native">
@ZakiMohammed
ZakiMohammed / README.md
Created May 5, 2023 09:45
Angular Upgrade Essentials
@ZakiMohammed
ZakiMohammed / main.css
Created April 30, 2023 13:00
Brand Logo CSS
.navbar-brand-color {
background-image: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
@ZakiMohammed
ZakiMohammed / index.js
Created February 6, 2022 20:26
News API
const express = require('express')
const axios = require('axios').default
const app = express()
const PORT = process.env.PORT || 3000
const URL = 'https://newsapi.org/v2/everything?q=sports&from=2022-01-06&sortBy=publishedAt&apiKey=01f06835c0af4e88ab9dd1c5988ae24f'
app.get('/', (req, res) => {
axios.get(URL)
@ZakiMohammed
ZakiMohammed / gist:a08e379b6132014e20ad946445049890
Created November 22, 2021 06:44
YAML Ain't Markup Language
# YAML Ain't Markup Language
# .yml, .yaml
# https://www.youtube.com/watch?v=cdLNKUoMc6c
person: # object
name: &name "John" # use '&REFERENCE_NAME' anchor name to use else where
occupation: 'Programmer'
age: !!float 190 # '!!float' force float type
gpa: !!str 3.5 # '!!str' force string type
dob: 1993-01-02 14:33:22 # date format
@ZakiMohammed
ZakiMohammed / index.js
Created February 17, 2021 18:01
Just for fun JavaScript
// just for fun
// const names = ['John', 'Allen', 'Martin'];
const person = {
id: 1,
name: 'James',
age: 28
};
const state = 'Goa';
@ZakiMohammed
ZakiMohammed / git-start.txt
Created May 18, 2020 09:47
Git Starter Commands
…or create a new repository on the command line
echo "# foo-foo-app" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/ZakiMohammed/foo-foo-app.git
git push -u origin master
…or push an existing repository from the command line
git remote add origin https://github.com/ZakiMohammed/foo-foo-app.git