Skip to content

Instantly share code, notes, and snippets.

View nouman-tariq's full-sized avatar
🏠
Working from home

Muhammad Nouman Tariq nouman-tariq

🏠
Working from home
  • Rawalpindi, Pakistan
View GitHub Profile
@nouman-tariq
nouman-tariq / chmodCheatSheet.md
Created March 24, 2022 14:01 — forked from juanarbol/chmodCheatSheet.md
Chmod cheat sheet

Chmod codes cheat sheet

How to use chmod codes in UNIX:

  1. There are three types of permissions in files and folders in unix
    1. Read (r)
    2. Write (w)
    3. Execute (x)
  2. And, there is a classification of users called UGO (explained bellow):
  3. U ~> User (usually, you)
@nouman-tariq
nouman-tariq / pdf_compressor.ipynb
Last active July 24, 2021 19:46
pdf_compressor.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nouman-tariq
nouman-tariq / url_to_txt.py
Created July 3, 2021 04:43 — forked from PandaWhoCodes/url_to_txt.py
Extracts the text from a webpage and saves it to a text file
"""
Gets the webpage
Converts the HTML to a readable HTML using readability
Extracts the text and saves it to a text file.
usage - python url_to_txt.py http://example.com
"""
from readability import Document
from bs4 import BeautifulSoup
from urllib.parse import urlparse
@nouman-tariq
nouman-tariq / disassembler
Created April 24, 2021 13:22
CIT 593 HW 13
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lc4_memory.h"
short unsigned int dest_register(struct row_of_memory* opcodeMatch)
{
short unsigned int ddd = (opcodeMatch->contents>>9 & 0b0000111) ;
return ddd ;
}
@nouman-tariq
nouman-tariq / Memory
Created April 24, 2021 13:22
CIT 593 HW 13
#include <stdio.h>
#include <stdlib.h>
#include "lc4_memory.h"
struct row_of_memory* add_to_list (struct row_of_memory* head,
short unsigned int address,
short unsigned int contents)
{
/* allocate memory for a single node */
struct row_of_memory *new_row = malloc (sizeof(struct row_of_memory)) ;
@nouman-tariq
nouman-tariq / parse_function
Created April 24, 2021 13:16
CIT 593 HW 13
#include <stdio.h>
#include <stdlib.h>
#include "lc4_memory.h"
#include <string.h>
/* declarations of functions that must defined in lc4_loader.c */
FILE* get_file()
{