My current recommended reading and awesome resources.
Discover gists
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.
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.
;;; 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. |
<?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> |
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') { |
# 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 |
# 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 |
7-Zip and unzipping from command line
e (Extract) command
x (Extract with full paths) command
-o (set Output directory) switch
7-zip can be used in powershell for extracting .zip file. To call 7-zip simply use:
> 7z
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.
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) |