Skip to content

Instantly share code, notes, and snippets.

View cednore's full-sized avatar
🧐
Forever Learning

cednore cednore

🧐
Forever Learning
View GitHub Profile
@cednore
cednore / change-timezone-and-rename.mjs
Created March 7, 2024 08:21
Convert the timezone of timestamps in multiple mp3 recording files and organize them into folders based on the day number
#!/usr/bin/env zx
const tz = new Date().toLocaleString("en", { timeZoneName: "short" }).split(" ").pop();
const listOfMp3Files = (await $`ls *.mp3`).stdout.split("\n").filter(Boolean);
for (const filename of listOfMp3Files) {
let year = filename.slice(0, 4);
let month = filename.slice(4, 6);
let day = filename.slice(6, 8);
@cednore
cednore / blackhole-guide-focal.md
Last active July 26, 2022 15:19
Creating a blackhole in Ubuntu 20.04

blackhole-guide-focal

Creating a blackhole in Ubuntu 20.04

gist ubuntu

Table of Contents

  1. Cloning this gist
@cednore
cednore / PatchOrchidPlatform.php
Created June 22, 2022 09:03
Patch UserPresenter class not found error (#2274) (see https://github.com/orchidsoftware/platform/issues/2274)
<?php
namespace Cednore\Cedi\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
class PatchOrchidPlatform extends Command
{
@mauvehed
mauvehed / enable_to_sudo_authenticate_with_touch_id.sh
Last active September 27, 2024 21:59
Enable sudo auth for macOS touchID via pam
#!/bin/bash
#
# credit to machupicchubeta/dotfiles/bin/enable_to_sudo_authenticate_with_touch_id.sh
set -eu
set -o pipefail
sudo chmod +w /etc/pam.d/sudo
if ! grep -Eq '^auth\s.*\spam_tid\.so$' /etc/pam.d/sudo; then
( set -e; set -o pipefail
# Add "pam_tid.so" to a first authentication
@cednore
cednore / print-multi-orientation.html
Created April 22, 2022 20:16
Example HTML file for printing both portrait and landscape pages in a single document
<!DOCTYPE html>
<html>
<head>
<style>
.printable-letter.printable-portrait {
page: letter-portrait;
}
.printable-letter.printable-landscape {
page: letter-landscape;
@cednore
cednore / al2.md
Last active April 20, 2022 11:57
My personal environment setup guide on Amazon Linux 2

al2

My personal environment setup guide on Amazon Linux 2

Table of Contents

  1. Cloning this gist

Cloning this gist

Useful shell snippets

# Go inside personal workspace folder
mkdir -p ~/workspace/cednore && cd ~/workspace/cednore

# Clone this gist
git clone [email protected]:a698954555ed680717b6a0832283bfdf.git useful-shell-snippets

# Clear recent files list on nautilus
@cednore
cednore / ubuntu.md
Last active March 10, 2024 15:16
My personal environment setup guide on Ubuntu
<div
x-data="{
query: '',
showDropdown: false,
currentHighlightedKey: Infinity,
options: {},
wireProp: @entangle($name).defer,
flags: {},
initFlags() {
for (const key of Object.keys(this.options)) {
@vindarel
vindarel / Common Lisp VS Racket - testimonies.md
Last active October 7, 2024 12:14
Common Lisp VS Racket. Feedback from (common) lispers.

Developer experience, libraries, performance… (2021/11)

I'll preface this with three things. 1. I prefer schemes over Common Lisps, and I prefer Racket of the Schemes. 2. There is more to it than the points I raise here. 3. I assume you have no previous experience with Lisp, and don't have a preference for Schemes over Common Lisp. With all that out of the way... I would say Common Lisp/SBCL. Let me explain

  1. SBCL Is by far the most common of the CL implementations in 2021. It will be the easiest to find help for, easiest to find videos about, and many major open source CL projects are written using SBCL
  2. Download a binary directly from the website http://www.sbcl.org/platform-table.html (even for M1 macs) to get up and running (easy to get started)
  3. Great video for setting up Emacs + Slime + Quick Lisp https://www.youtube.com/watch?v=VnWVu8VVDbI

Now as to why Common Lisp over Scheme