This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### ❗️❗️❗️ moved to https://github.com/glowinthedark/html-music-gallery-creator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Generate a static gallery.html file with all media files below the given folder | |
# for the VERSION WITH THUMBNAIL GENERATION use instead: | |
# https://gist.github.com/glowinthedark/81bc7c250ed245cb7a58d8d6b1f1a63e | |
from datetime import datetime | |
from pathlib import Path | |
from sys import argv | |
from urllib.parse import quote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const fs = require('fs'); | |
// Function to remove null keys from an object | |
function removeEmpty(obj) { | |
Object.keys(obj).forEach(function(key) { | |
if (obj[key] && typeof obj[key] === 'object') { | |
removeEmpty(obj[key]); | |
} else if (obj[key] === '' || obj[key] === null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Note: you might need to run "pip install halo tabulate tqdm" if these dependencies are missing on your machine | |
import argparse | |
import json | |
import requests | |
from datetime import datetime | |
from halo import Halo |
In this document, I will explain how to setup nut
(Network UPS Tools) on Ubuntu 18.04 and 20.04.
It is basically the next chapter of my previous gist, Upgrade nut on Ubuntu 18.04.
I'll only document USB
connected UPS and not the other supported connection modes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <signal.h> | |
#include <time.h> | |
#include <ctype.h> | |
#include <string> | |
//https://github.com/DaveGamble/cJSON | |
#include "cJSON.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Dependencies | |
# ============================= | |
# pip install nltk transformers | |
import argparse | |
import sys | |
from pathlib import Path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install libssh libssh2 slang | |
clone --depth 1 https://github.com/MidnightCommander/mc.git | |
cd mc | |
./configure --disable-doxygen-doc --disable-doxygen-dot --disable-doxygen-html CPPFLAGS="-I/opt/homebrew/Cellar/libssh2/1.11.0_1/include -I/opt/homebrew/Cellar/s-lang/2.3.3/include -I/opt/X11/include" LDFLAGS="-L/opt/homebrew/Cellar/libssh2/1.11.0_1/lib -L/opt/homebrew/Cellar/s-lang/2.3.3/lib -L/opt/X11/lib" | |
make CPPFLAGS="-I/opt/homebrew/Cellar/libssh2/1.11.0_1/include -I/opt/homebrew/Cellar/s-lang/2.3.3/include -I/opt/X11/include" LDFLAGS="-L/opt/homebrew/Cellar/libssh2/1.11.0_1/lib -L/opt/homebrew/Cellar/s-lang/2.3.3/lib -L/opt/X11/lib" | |
sudo mkdir -p /usr/local/{libexec,etc,share} | |
sudo chown `whoami` /usr/local/{libexec,etc,share} |
NewerOlder