Skip to content

Instantly share code, notes, and snippets.

View ossi1801's full-sized avatar
:shipit:

Ossi H ossi1801

:shipit:
View GitHub Profile
@ossi1801
ossi1801 / LinuxMintVerifyShaQuick.md
Created September 4, 2025 15:05
quick commands for mint verifycation

1. Download the sha256.txt

2. Delete the 2 rows with non-matching iso images first!

3. Then open terminal in the folder where the iso and sha256.txt are

sha256sum -b your_iso_image_name_here.iso >> shagen.txt

diff shagen.txt sha256sum.txt

4. If diff shows no output => Good.

return {
{
"Hoffs/omnisharp-extended-lsp.nvim",
lazy = false, -- Ensure it’s always loaded
},
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"omnisharp", -- Auto-install OmniSharp
@ossi1801
ossi1801 / WifiScanner.py
Created April 9, 2025 19:42
Wifi "scanner" that "works" with micropython
"Scan for accesspoints and display them sorted by network strength"
# Scan WiFi network and return the list of available access points.
# Each list entry is a tuple with the following items:
# (ssid, bssid, primary_chan, rssi (signal Strength), auth_mode, [ hidden])
import binascii
import network
wlan = network.WLAN(network.STA_IF)
_ = wlan.active(True)
@ossi1801
ossi1801 / CreateCert.md
Last active January 4, 2024 14:16
Create 100 year pfx file (for c# ClickOnce)

Create 100 year pfx file (for VisualStudio ClickOnce)

Windows(GitBash) or in Linux install openssl and run:

openssl req -new -x509 -nodes -sha256 -newkey rsa:4096 -keyout certificate.key -out certificate.crt -days 36500

(Windows) Merge files in cmd:

certutil -mergepfx certificate.crt certificate.pfx
@ossi1801
ossi1801 / javascript.json
Created June 8, 2023 21:35
vscode javascript console log snippet
// Hit > shift + command + p and type snippets
// Select Preferences: Configure User Snippets
// Choose the language type for which you want to add the custom snippet in the vscode inputbox
//"cw" is the hotkey for Console.Writeline in c# in Visual Studio
{
"Console.Log":{
"prefix": "cw",
"body": "console.log(\"\")",
"description": "loggin like c#"
}
@ossi1801
ossi1801 / CustomButton.cs
Created January 14, 2023 17:22
WinForms rounded borders button - Custom Button
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.ComponentModel;
@ossi1801
ossi1801 / AccurateFloatAddition.js
Created December 1, 2021 15:41
//Adds floats together with "precision"
//Adds floats together with "precision"
var RoundedAddition = (...args) => {
let countDecimals = (value) => {
if (Math.floor(value) === value) return 0;
let a = value.toString().split(".")[1].length || 0;
return a;
}
let highestDecimalpoint;
args.forEach(i => {
let x = countDecimals(i);
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main()
{
@ossi1801
ossi1801 / modulo.cs
Created July 12, 2021 13:23
Modulo test
using System;
public class Program
{
public static void Main()
{
int a= 21;
int b =0;
if (a%4!=0) b++;
var c = (a/4)+b;
@ossi1801
ossi1801 / weekday.js
Created February 25, 2021 20:58
Check for weekday
const isWeekday = (date) => date.getDay() % 6 !== 0;
console.log(isWeekday(new Date(2021, 1, 25)));
// Result: true (Thurday 25.2.21)
console.log(isWeekday(new Date(2021, 1, 28)));
// Result: false (Sunday 28.2.21)
console.log(isWeekday(new Date()),new Date())
//Todays date