Skip to content

Instantly share code, notes, and snippets.

View yezz123's full-sized avatar
🦀
Rusty

Yasser Tahiri yezz123

🦀
Rusty
View GitHub Profile
@yezz123
yezz123 / Exploitation.md
Created May 24, 2021 12:09
Pentesting-Exploitation
@ddanier
ddanier / fastapi_globals.py
Last active May 15, 2024 19:53
flask.g for FastAPI.
"""
This allows to use global variables inside the FastAPI application using async mode.
# Usage
Just import `g` and then access (set/get) attributes of it:
```python
from your_project.globals import g
@KRTirtho
KRTirtho / vs-code.settings.json
Created October 17, 2020 16:22
Excluding file watchers & search indexing in unintended folders and files in Visula
//Add following lines of code to exclude the files & folders which aren't important for watchers to look for changes...
{
//exludes fies & folders in search indexing
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/env": true,
"**/venv": true
},
//exludes fies & folders for watcher service
# importing the library
from covid import Covid
# initializing
covid = Covid()
# printing data for the world
print("Total active cases in world:", covid.get_total_active_cases())
print("Total recovered cases in world:", covid.get_total_recovered())
print("Total deaths in world:", covid.get_total_deaths())
# getting data according to country wise
cases = covid.get_status_by_country_name("us")
@smakosh
smakosh / countries.json
Created April 12, 2019 09:54
List of countries in arabic
[
{
"label": "آروبا",
"value": "آروبا"
},
{
"label": "أسبانيا",
"value": "أسبانيا"
},
{
@smakosh
smakosh / vanilla_percepton_js.js
Created March 14, 2018 07:31
Perceptron from scratch with vanilla Js
// Sigmoid
const sigmoid = x => 1 / (1 + Math.exp(-x))
const D_sigmoid = x => sigmoid(x) * (1-sigmoid(x))
// data
const data = [
[ 5.1, 3.5, 0 ],
[ 4.9, 3. , 0 ],
[ 4.7, 3.2, 0 ],
@480
480 / gist:3b41f449686a089f34edb45d00672f28
Last active June 27, 2024 06:21
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
/**
* Copyright 2016 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Sjord
Sjord / gist:ac8dfff3a3ac3180c065f370f24b30a8
Last active January 26, 2024 22:26
Hacking Team hack
_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;