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);
YQgTvEMtSIUcMnjeGhEpJE1dQngj6TpWIsNbzNVjmIdBs1uvfNfdTTTyy4F9Rkylj1X4Kg.
@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
{
@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)) {