Skip to content

Instantly share code, notes, and snippets.

View jinnosux's full-sized avatar

jinnosux

View GitHub Profile
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 / 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) {
@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 / 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 / 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>The Matrix</title>
<style>
* {
margin: 0;
padding: 0;
}
import xlsxwriter
from collections import Counter
import re
from difflib import SequenceMatcher
workbook = xlsxwriter.Workbook("example.xlsx")
worksheet = workbook.add_worksheet()
categories = [
'Best Cop',
# 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 = "*"
)
# 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"
@jinnosux
jinnosux / ScanNPM.ps1
Created September 9, 2025 13:26
Simple NPM Supply Chain Attack (Sept 2025) Scanner
# Simple NPM Supply Chain Attack Scanner (ref https://www.bleepingcomputer.com/news/security/hackers-hijack-npm-packages-with-2-billion-weekly-downloads-in-supply-chain-attack/ )
# Scans package.json and package-lock.json in current directory for compromised packages
# Usage: .\ScanNPM.ps1 [optional-directory-path]
param(
[string]$Path = "."
)
# Compromised packages from September 2025 attack
$CompromisedPackages = @{