Skip to content

Instantly share code, notes, and snippets.

View lablnet's full-sized avatar
🤗
I may be slow to respond.

Muhammad Umer Farooq lablnet

🤗
I may be slow to respond.
View GitHub Profile
<VirtualHost *:80>
ServerName git.muhammadumerfarooq.com
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
SetEnv proxy-sendcl
ProxyPreserveHost On
ProxyPass /git http://127.0.0.1:3000/
@lablnet
lablnet / gcd.py
Created August 24, 2020 10:58
Pythonic way to find GCD.
def gcd(a, b):
return a if b == 0 else gcd(b, a % b)
print(gcd(int(input("Enter value of a: ")), int(input("Enter value of b: "))))
@lablnet
lablnet / ddos_attack.py
Last active August 24, 2020 07:29
python script to DDoS attack to any server, i will not accept any illegal usage of this script
"""ddos_attack.py: A python script to DDoS attack to any server."""
__author__ = "Muhammad Umer Farooq"
__license__ = "MIT"
__version__ = "1.0.0"
__maintainer__ = "Muhammad Umer Farooq"
__email__ = "contact@muhammadumerfarooq.me"
__status__ = "Production"
"""
DDoS: https://en.wikipedia.org/wiki/Denial-of-service_attack
Caution: i will not accept any illegal usage of this script, this is
@lablnet
lablnet / c_print.py
Last active August 7, 2020 09:01
Enable coloured print in python
"""c_print.py: Enable coloured print."""
__author__ = "Muhammad Umer Farooq"
__license__ = "MIT"
__version__ = "1.0.0"
__maintainer__ = "Muhammad Umer Farooq"
__email__ = "contact@muhammadumerfarooq.me"
__status__ = "Production"
def c_print(msg, color=None):
@lablnet
lablnet / waste_mem.cpp
Created July 30, 2020 07:26
Simple C++ program to waste memory
#include <iostream>
#include <cstring>
#ifdef _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
#define MB (1024*1024)
int main()
@lablnet
lablnet / prime.cpp
Created July 20, 2020 10:54
Prime Number
#include <iostream>
#include <chrono>
using namespace std;
bool isPrime(long long int);
int main(){
long long int n=0;
cout<<"Enter number"<<endl;
cin>>n;
auto start=chrono::high_resolution_clock::now();
#include<iostream>
#include<fstream>
using namespace std;
// define a structure to store student data
struct student {
int sapid;
char name[30];
float marks;
void getData(); // get student data from user
void displayData(); // display data
1 Ali 230
5 Bilal 255
6 Pasha 430
//usr/bin/g++
#include <iostream>
int main() {
const int S = 5, M = 6, max = 1000;
int subjects[S][M], avg[S], sum = 0;
char students[S][max];
// Read the mark for students.
for (int i = 0; i < S; i++) {
@lablnet
lablnet / prime_number.c++
Created March 12, 2020 14:29
C++ prime find prime number using exhaustive enumeration
#include <iostream>
using namespace std;
namespace lablnet {
bool is_prime(int n)
{
bool isPrime = true;
for (int i = n - 1; i >= 2; i--)
{
if (n % i == 0)