Skip to content

Instantly share code, notes, and snippets.

View soachishti's full-sized avatar
💭
Away

Owais soachishti

💭
Away
View GitHub Profile
@soachishti
soachishti / CPP-Flappy-Bird.cpp
Created September 27, 2015 15:09
Flappy Bird in C++ (VS 2013)
#include <iostream>
#include <windows.h>
#include <math.h>
#include <time.h>
#include <conio.h>
using namespace std;
void goToXY(int x, int y) {
COORD coord = { x, y };
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
@soachishti
soachishti / adobecs6.pol
Created March 21, 2018 21:52
Adobe Photostop CS6 PlayOnLinux Script
#!/bin/bash
# Date : (2014-10-20)
# Distribution used to test : Arch Linux 64-bit
# Author : RoninDusette
# Licence : GPLv3
# PlayOnLinux: 4.2.8
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
@soachishti
soachishti / PlayFair.cpp
Created January 31, 2018 17:06
Implementation of Playfair Cipher Algorithm
/*
* Name: Syed Owais Ali Chishti
* Roll no: P14-6011
* Date: 2/3/2015
* Task: Implement the Playfair Cipher Algorithm as discussed in the class.
*/
#include <iostream>
#include <string>
#include <cstdlib>
@soachishti
soachishti / rsa.py
Created March 28, 2018 19:35
A simple RSA implementation in Python
'''
620031587
Net-Centric Computing Assignment
Part A - RSA Encryption
'''
import random
'''
@soachishti
soachishti / WriteFloatImplementation.asm
Last active October 25, 2019 22:05
Print Float Binary
; Print exponent if exponent greater than 10
; positive and negative exponent
Include Irvine32.inc
; Change value of number and see result
.data
divisor DWORD 10b
;number DWORD 1.5
@soachishti
soachishti / floatio.asm
Created October 19, 2015 14:49
Irvine Lib Implementation (WriteFloat)
; Source: http://home.aubg.bg/students/TMG120/irvine/irvine/Examples/Lib16/Irvine16_Library/floatio.asm
; Floating Point IO Procedures (floatio.asm)
COMMENT @
Authors: W. A. Barrett, San Jose State University,
James Brink, Pacific Lutheran University
Used by Permission (July 2005).
@soachishti
soachishti / getScaleAndPrecision.js
Created October 7, 2019 11:38
Get Scale and Precision from Number - JavaScript
// Database Number: Scale and Precision
// Input: 123456.1234
// Output: scale 4, precision 6
function getScaleAndPrecision(x) {
x = parseFloat(x);
if (!x || isNaN(x)) return null; //NaN, undefined, null, 'abcd', ""...
let parts = x.toString().split(".");
if (parts.length > 2) return null;
return {
scale: parts[1] ? parts[1].length : 0,
@soachishti
soachishti / noscript-tracking.go
Created May 13, 2019 07:07 — forked from wybiral/noscript-tracking.go
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@soachishti
soachishti / keyboard.asm
Created November 10, 2015 06:51
Keyboard Handling MASM
TITLE Keyboard Toggle Keys (Keybd.asm)
INCLUDE Irvine32.inc
INCLUDE Macros.inc
INCLUDELIB user32.lib
VK_LEFT EQU 000000025h
VK_UP EQU 000000026h
VK_RIGHT EQU 000000027h
VK_DOWN EQU 000000028h
@soachishti
soachishti / Fraction.cpp
Created January 31, 2018 17:08
Implement Fraction class with operator overloading.
/*
Name: Syed Owais Ali Chishti
Roll no: P14-6011
Task: Implement Fraction class such that it take input like
1/2, 4/5, 7/81
Then overload
ARITHMETIC
+, -, /, %, *
ASSIGNMENT
+=, -=, *=, /=, %=