Skip to content

Instantly share code, notes, and snippets.

Avatar
😐
Trying to stay sane. Trying.

Max Antonucci maxx1128

😐
Trying to stay sane. Trying.
View GitHub Profile
View get_freemans_quotes.rb
# 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 Mar 29, 2021
Check if you solved a Sudoku
View checksudoku.js
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));
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});