Skip to content

Instantly share code, notes, and snippets.

@pedrolamas
pedrolamas / docker-iptables-fix.sh
Created August 18, 2020 19:32
Script to fix Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."
@VictorTaelin
VictorTaelin / implementing_fft.md
Last active May 18, 2024 11:58
Implementing complex numbers and FFT with just datatypes (no floats)

Implementing complex numbers and FFT with just datatypes (no floats)

In this article, I'll explain why implementing numbers with just algebraic datatypes is desirable. I'll then talk about common implementations of FFT (Fast Fourier Transform) and why they hide inherent inefficiencies. I'll then show how to implement integers and complex numbers with just algebraic datatypes, in a way that is extremely simple and elegant. I'll conclude by deriving a pure functional implementation of complex FFT with just datatypes, no floats.

@michiel
michiel / jsonSchemaInterface.ts
Created August 3, 2016 14:20 — forked from enriched/jsonSchemaInterface.ts
TypeScript interface for Json-Schema V4
/**
* MIT License
*
* Copyright (c) 2016 Richard Adams (https://github.com/enriched)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@davepcallan
davepcallan / FindSparseColumnCandidates.sql
Created May 11, 2024 10:24
SQL Server SQL script to find sparse column candidates
USE TestDB
GO
DECLARE @DatabaseName VARCHAR(100)
DECLARE @SchemaName VARCHAR(100)
DECLARE @TableName VARCHAR(100)
DECLARE @ColumnName VARCHAR(100)
DECLARE @FullyQualifiedTableName VARCHAR(500)
--Create Temp Table to Save Results
@nurbek-ab
nurbek-ab / really-right-breakpoints.less
Created November 8, 2017 20:17 — forked from markhowellsmead/really-right-breakpoints.less
The 100% correct way to do CSS breakpoints - LESS variables
/*
Thanks David <3 - https://medium.freecodecamp.com/the-100-correct-way-to-do-css-breakpoints-88d6a5ba1862
*/
@for-phone: ~"screen and (max-width: 44.9375rem)"; // < 720
@for-tablet-only: ~"screen and (min-width: 45rem) and (max-width: 74.9375rem)"; // > 720 < 1199
@for-tablet-portrait-only: ~"screen and (min-width: 45rem) and (max-width: 56.1875rem)"; // > 720 < 900
@for-tablet-portrait-up: ~"screen and (min-width: 45rem)"; // > 720
@for-tablet-landscape-up: ~"screen and (min-width: 56.25rem)"; // > 900
@for-desktop-up: ~"screen and (min-width: 75rem)"; // > 1200
@for-big-desktop-up: ~"screen and (min-width: 112.5rem)"; // > 1800
@scyto
scyto / proxmox-tb-net.md
Last active May 18, 2024 11:55
Thunderbolt Networking Setup

Thunderbolt Networking

this gist is part of this series

NOTE FOR THIS TO BE RELIABLE ON NODE RESTARTS YOU WILL NEED PROXMOX KERNEL 6.2.16-14-pve OR HIGER

This fixes issues i bugged with the thunderbolt / thunderbolt-net maintainers (i will take everyones thanks now, lol)

Install LLDP - this is great to see what nodes can see which.

  • install lldpctl with apt install lldpd
@parmentf
parmentf / GitCommitEmoji.md
Last active May 18, 2024 11:54
Git Commit message Emoji
SHA1: 7c7b67a6391f63bf8901cab72d522d3ba44e94ed
SHA256: b19f0aa82d12597a97e4137e2c7e955c7936297f5c3fa2eaf408d85a1ad1fa23
Remote IP: 38[.]180[.]136[.]158
Additional Indicators for the machine where LNK was "possibly" created on:
Machine ID: win-76vb895243v
MAC Address: a3:66:cd:d2:6f:1c
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active May 18, 2024 11:50
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@Atrate
Atrate / hyprtabs.sh
Last active May 18, 2024 11:47
i3-like tabs for Hyprland. Usage: save the script as `~/.config/hypr/hyprtabs.sh` or somewhere else and add the following to your `hyprland.conf`, changing the keybind or path as you see fit: `bind = $mainMod SHIFT, w, exec, ~/.config/hypr/hyprtabs.sh`
#!/bin/bash --posix
# ------------------------------------------------------------------------------
# Copyright (C) 2024 Atrate
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#