Skip to content

Instantly share code, notes, and snippets.

View jinnosux's full-sized avatar

jinnosux

View GitHub Profile
# Assignment 2 - Vahid Konicanin
#
# Terraform code to deploy an Azure infrastructure with a virtual network, subnet, network security group,
# and two virtual machines (Windows and Linux), each with its own public IP address.
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=3.0.0"
# Assignment 1 - Vahid Konicanin
#
# Script to move files with specified extension while preserving directory structure
# Usage: .\assignment1.ps1 -SourceDirectory "C:\Source" -TargetDirectory "C:\Target" -FileExtension "pdf"
param (
[string]$SourceDirectory,
[string]$TargetDirectory,
[string]$FileExtension = "*"
)
import xlsxwriter
from collections import Counter
import re
from difflib import SequenceMatcher
workbook = xlsxwriter.Workbook("example.xlsx")
worksheet = workbook.add_worksheet()
categories = [
'Best Cop',
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>The Matrix</title>
<style>
* {
margin: 0;
padding: 0;
}
@jinnosux
jinnosux / entro.py
Last active June 10, 2024 11:18
entro.py
"""
Network Packets Entropy Analyzer
Author: Vahid Konicanin
Part of a Research Paper "Detecting Network Anomalies with Shannon Entropy: A Novel Approach to Cybersecurity"
International Balkan University, 2024
"""
import math
import hexdump
import dpkt
@jinnosux
jinnosux / skkrript.py
Last active December 17, 2023 00:04
NGAwards2023 vote counting script
import xlsxwriter
from collections import Counter
import re
workbook = xlsxwriter.Workbook("example.xlsx")
worksheet = workbook.add_worksheet()
categories = ['Best Cop', 'Best Paramedic',
'Best Hitman', 'Best Gunrunner', 'Best Thief',
'Best Driver', 'Best Pilot', 'Best Disappearer', 'Best Dressed Player',
@jinnosux
jinnosux / export.py
Created December 13, 2022 17:29
ng-awards-2022
import xlsxwriter
workbook = xlsxwriter.Workbook("example.xlsx")
worksheet = workbook.add_worksheet()
categories = ['Best Cop', 'Best Paramedic',
'Best Hitman', 'Best Gunrunner', 'Best Thief',
'Best Driver', 'Best Pilot', 'Best Dressed Player',
'Best Gold Rush Finder', 'Funniest Player', 'Most Helpful Player',
'Best New Player', 'Most Reformed Player', 'NG Couple', 'Server Bitch',
@jinnosux
jinnosux / timeago.dart
Created November 7, 2020 15:32
Flutter time ago implementation
String timeAgoSinceDate({bool numericDates = true}) {
DateTime date = this.createdTime.toLocal();
final date2 = DateTime.now().toLocal();
final difference = date2.difference(date);
if (difference.inSeconds < 5) {
return 'Just now';
} else if (difference.inSeconds < 60) {
return '${difference.inSeconds} seconds ago';
} else if (difference.inMinutes <= 1) {
palette="#121C21:#E44754:#89BD82:#F7BD51:#5486C0:#B77EB8:#50A5A4:#FFFFFF:#52606B:#E44754:#89BD82:#F7BD51:#5486C0:#B77EB8:#50A5A4:#FFFFFF"
foreground="#B3B8C3"
background="#121B21"
cursor="#E95420"
darkstyle="true" # true or false
gsettings set io.elementary.terminal.settings palette "$palette"
gsettings set io.elementary.terminal.settings foreground "$foreground"
gsettings set io.elementary.terminal.settings background "$background"
gsettings set io.elementary.terminal.settings cursor-color "$cursor"
@jinnosux
jinnosux / characters.csv
Created May 7, 2020 20:08
importing stuff from csv to db
name house birth
Adelaide Murton Slytherin 1982
Adrian Pucey Slytherin 1977
Anthony Goldstein Ravenclaw 1980
Blaise Zabini Slytherin 1979
Cedric Diggory Hufflepuff 1977
Cho Chang Ravenclaw 1979
Colin Creevey Gryffindor 1981
Dean Thomas Gryffindor 1980
Draco Lucius Malfoy Slytherin 1980