Skip to content

Instantly share code, notes, and snippets.

View prateek-parashar's full-sized avatar

Prateek Parashar prateek-parashar

View GitHub Profile
@prateek-parashar
prateek-parashar / activate.bat
Created December 11, 2019 13:52
gist for test
@echo off
(cd /d "%~dp0")&&(NET FILE||(powershell start-process -FilePath '%0' -verb runas)&&(exit /B)) >NUL 2>&1
title Office 2019 Activator
echo Converting... & mode 40,25
(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)
cscript //nologo ospp.vbs /unpkey:6MWKP >nul&cscript //nologo ospp.vbs /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP >nul&set i=1
:server
if %i%==1 set KMS_Sev=kms7.MSGuides.com
if %i%==2 set KMS_Sev=kms8.MSGuides.com
if %i%==3 set KMS_Sev=kms9.MSGuides.com
@prateek-parashar
prateek-parashar / README-Template.md
Created July 3, 2018 07:49 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

import os
from cs50 import SQL, eprint
from flask import Flask, flash, redirect, render_template, request, session
from flask_session import Session
from tempfile import mkdtemp
from werkzeug.exceptions import default_exceptions
from werkzeug.security import check_password_hash, generate_password_hash, safe_str_cmp
from datetime import datetime
from helpers import apology, login_required, lookup, usd
from enum import Enum
class Operation(Enum):
"""Operations"""
DELETED = 1
INSERTED = 2
SUBSTITUTED = 3
# importing module to accept command line arguements
import sys
# importing cs50 module
import cs50
if len(sys.argv) is not 2:
print("Usage python caesar.py key")
sys.exit(0)
# marking the key given by the user
key = int(sys.argv[1])
// Implements a dictionary's functionality
#include <stdbool.h>
#include <strings.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "dictionary.h"
#include <stdio.h>
#include <stdlib.h>
//taking in command line arguements
int main(int argc, char *argv[])
{
if (argc != 2)
{
fprintf(stderr, "Usage : ./recover forensic file\n");
return 1;
// Copies a BMP file
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "bmp.h"
int main(int argc, char *argv[])
{
<gconfentryfile>
<entrylist base="/apps/gnome-terminal">
<entry>
<key>global/active_encodings</key>
<schema_key>/schemas/apps/gnome-terminal/global/active_encodings</schema_key>
<value>
<list type="string">
<value>
<string>UTF-8</string>
</value>
@prateek-parashar
prateek-parashar / resize.c
Last active March 20, 2018 16:03
C program to resize a .bmp file
// Copies a BMP file
#include <stdio.h>
#include <stdlib.h>
#include "bmp.h"
int main(int argc, char *argv[])
{
// ensure proper usage