Skip to content

Instantly share code, notes, and snippets.

View maxx1128's full-sized avatar

Max Antonucci maxx1128

View GitHub Profile
@maxx1128
maxx1128 / rename_book_file.py
Created January 30, 2025 15:49
Rename Download Book File Name
import re
import os
def parse_filename(filename):
# Remove the URL at the start
cleaned_filename = re.sub(r'^_.*?_', '', filename)
# Split the remaining string into title and author
parts = cleaned_filename.rsplit('_-_', 1)
# frozen_string_literal: true
require 'open-uri'
require 'nokogiri'
require 'json'
class FreemanQuotes
URL = 'https://en.wikiquote.org/wiki/Freeman%27s_Mind'
def initialize
@maxx1128
maxx1128 / checksudoku.js
Last active January 20, 2024 07:04
Check if you solved a Sudoku
const checkSudoku = board => {
const isSudokuArrayValid = (array) => {
const row = array.slice(0).sort().join(''),
passingRow = [1,2,3,4,5,6,7,8,9].join('');
return (row === passingRow);
};
const testRows = (board) => board.every(row => isSudokuArrayValid(row));
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});