Skip to content

Instantly share code, notes, and snippets.

View Qoyyuum's full-sized avatar
🏠
Working from home

Abdul Qoyyuum Qoyyuum

🏠
Working from home
View GitHub Profile
@Qoyyuum
Qoyyuum / fedora-vm.ps1
Created September 15, 2022 02:53
Starts, Stops a Fedora VM. List other VMs.
function Start-Fedora { vboxmanage startvm Fedora }
function Stop-Fedora { vboxmanage controlvm Fedora poweroff }
function List-VMs { vboxmanage list vms }
Set-Alias -Name startfedora -Value Start-Fedora
Set-Alias -Name stopfedora -Value Stop-Fedora
Set-Alias -Name listvms -Value List-VMs
<#
Pre-requisites:
@Qoyyuum
Qoyyuum / riverbankgame.py
Created August 29, 2022 05:30
River Bank Game - Get everyone to the other side of the river bank without anything get eaten.
from dataclasses import dataclass
import sys
@dataclass
class Game:
locations:tuple = ('Farmer', 'Goat', 'Wolf', 'Cabbage')
farmerLoc:str = 'L'
goatLoc:str = 'L'
wolfLoc:str = 'L'
cabbageLoc:str = 'L'
@Qoyyuum
Qoyyuum / resizer.py
Created January 9, 2021 11:12
Image resizer python script that utilises Pillow package
#python3
from PIL import Image
import os
def resizer(images_to_resize, x, y):
"""
To resize images.
:param images_to_resize : for an array of image names
:param x : User defined width value to resize to
@Qoyyuum
Qoyyuum / ChocoInstallBase.ps1
Last active November 25, 2021 11:16
Chocolately Fresh Essential Install on Windows 10
# ChocoInstallBase.ps1 by Q (forked from atwork.at)
# Get Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# See packages at https://chocolatey.org/packages/
# Comment (add #) or uncomment (remove #) to include or exclude from your base install
# Use according to your own needs...
# Essentials
choco install veracrypt -y
@Qoyyuum
Qoyyuum / quasar-android-build-release.yml
Last active September 4, 2022 06:44
Build Android apk, release as an asset after Quasar Framework
name: Quasar Android Build
on:
push:
branches: [ master, dev ]
tags: 'v*'
pull_request:
branches: [ master, dev ]
tags: 'v*'
@Qoyyuum
Qoyyuum / index.js
Created September 13, 2019 08:56
GDG Adoption Chatbot DialogFlow Fulfillment Script to Copy and Paste
// Import necessary stuff
const {
dialogflow,
Carousel,
Image
} = require('actions-on-google');
const functions = require('firebase-functions');
// Enable debugging
@Qoyyuum
Qoyyuum / index_cars.js
Last active September 13, 2019 08:29
GDG DialogFlow Script
// Import necessary stuff
const {
dialogflow,
Carousel,
Image
} = require('actions-on-google');
const functions = require('firebase-functions');
// Enable debugging
@Qoyyuum
Qoyyuum / linear_regression.js
Created December 10, 2018 08:04
Linear Regression in Javascript by DracoBlue
function findLineByLeastSquares(values_x, values_y) {
var sum_x = 0;
var sum_y = 0;
var sum_xy = 0;
var sum_xx = 0;
var count = 0;
/*
* We'll use those variables for faster read/write access.
*/
Using x86_64 syscall table:
0 read
1 write
2 open
3 close
4 stat
5 fstat
6 lstat
7 poll
8 lseek