Skip to content

Instantly share code, notes, and snippets.

@robotsquidward
robotsquidward / good-links.md
Last active May 19, 2024 09:23
Good Links
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active May 19, 2024 09:23
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@rougier
rougier / make-box.el
Last active May 19, 2024 09:22
Emacs: add borders around some part of a buffer
;;; make-box.el --- Box around part of a buffer -*- lexical-binding: t -*-
;; Copyright (C) 2024 Nicolas P. Rougier
;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
;; Version: 0.1.0
;; Package-Requires: ((emacs "27.1"))
;; Keywords: convenience
;; This file is not part of GNU Emacs.
@choco-bot
choco-bot / FilesSnapshot.xml
Created May 15, 2024 09:43
ferdi v5.8.1 - Failed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\ferdi\ferdi.nupkg" checksum="1FF2A53EDB305DD275A48F29A8686987" />
<file path="C:\ProgramData\chocolatey\lib\ferdi\ferdi.nuspec" checksum="B168DFD73529C428BA58D31B87A90925" />
<file path="C:\ProgramData\chocolatey\lib\ferdi\tools\chocolateyinstall.ps1" checksum="DF8525656A09BE0AFD345461CADA2A58" />
</files>
</fileSnapshot>
@croxton
croxton / htmx-metadata.js
Created October 13, 2022 13:46
Htmx swapping metadata
htmx.on('htmx:beforeSwap', (htmxEvent) => {
let incomingDOM = new DOMParser().parseFromString(htmxEvent.detail.xhr.response, "text/html");
// Transpose <meta> data, page-specific <link> tags and JSON-LD structured data
// Note that hx-boost automatically swaps the <title> tag
let selector = "head > meta:not([data-revision]), head *[rel=\"canonical\"], head *[rel=\"alternate\"], body script[type=\"application/ld+json\"]";
document.querySelectorAll(selector).forEach((e) => {
e.parentNode.removeChild(e);
});
incomingDOM.querySelectorAll(selector).forEach((e) => {
if (e.tagName === 'SCRIPT') {
@maxim-saplin
maxim-saplin / julia.py
Last active May 19, 2024 09:20
Simple integration of Dart/Flutter and Python
# https://matplotlib.org/matplotblog/posts/animated-fractals/
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import time
x_start, y_start = -2, -2 # an interesting region starts here
width, height = 4, 4 # for 4 units up and right
density_per_unit = 80 # how many pixles per unit
@grohom
grohom / linux.sh
Last active May 19, 2024 09:19
[Linux] comenzi Linux #linux
# ca să văd ce softuri sunt instalate:
dpkg --get-selections
# ca să văd diverse informații (hardware și software):
inxi --help
sudo inxi -v 8 -AGN
# informații/diagnoză hardware
https://wiki.ubuntu.com/FirmwareTestSuite/FirmwareTestSuiteLive
@marcoandre1
marcoandre1 / 7-zip-powershell.md
Last active May 19, 2024 09:16
7-zip in powershell with scripts provided
@lelegard
lelegard / win10-sshd.md
Last active May 19, 2024 09:16
Installing Windows 10 "built-in" SSH Server

Installing Windows 10 "built-in" SSH Server

Starting with Windows 10 build 1709, Windows integrates a port of OpenSSH, client and server.

This note describes how to install and configure the OpenSSH server sshd and run PowerShell scripts on a remote Windows server, from a Unix system, using SSH and public key authentication (no password).

Note: The way OpenSSH has been integrated in Windows 10 has changed a lot between versions 1709 and 21H2 of Windows 10. The Gist was updated several times to reflect the changes. This version applies to Windows 10 21H2.

OpenSSH server installation

@Ravarcheon
Ravarcheon / spectralRotation.py
Last active May 19, 2024 09:14
rotates an audio file by 90 degrees in the spectrum while being a reversible process with minimal loss (only floating point errors which are like -150 dB but thats literally silence ahaha~)
import numpy as np
import soundfile as sf
from scipy.fftpack import fft, ifft
def rotateSignal(signal,flip):
if flip:
signal = signal[::-1]
x = np.concatenate((signal, signal[1:][::-1])) # concatenating the array with a reverse of itself makes it such that the fourier transform doesn't layer over a reversed version of itself in the inverse fft
rotSig = ifft(x)