- Install ruby
- Install gems:
gem install nokogiri snoo
- Set a cron job to run update.rb every hour/day/etc.
- Add
[](/updates)
at the top and bottom of the current table/header. Anything inside this pair of links will be replaced. - Update the usernames and password at the top of the file - the account must have config mod permissions
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
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "rails", "6.1.0" | |
gem "sqlite3" | |
end |
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
# frozen_string_literal: true | |
module Prawn | |
# `cached_image` needs to know if it's in a cloned document or the original so that it can store | |
# the image object data properly. | |
class ClonedDocument < Document | |
attr_reader :root_document | |
def initialize(root_document, **options, &block) | |
@root_document = root_document |
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
# Comments removed for brevity | |
# No need to declare which submodules are in use beforehand | |
Rails.application.config.sorcery.configure do |config| | |
config.not_authenticated_action = :not_authenticated | |
config.save_return_to_url = true | |
config.cookie_domain = nil | |
config.remember_me_httponly = true | |
config.token_randomness = 15 |
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
# Input: "@supports (display: flex) { @media screen and (min-width: 900px) { article { padding: 1rem 3rem; } } }" | |
[ | |
{ | |
:node=>:at_rule, | |
:name=>"supports", | |
:prelude=>[ | |
{:node=>:whitespace, :pos=>9, :raw=>" "}, | |
{ | |
:node=>:simple_block, |
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
module LoadResources | |
module ClassMethods | |
def load_resource(resource_class, options = {}) | |
filter_options = options.slice :only, :except, :if, :unless | |
resource_options = options.except :only, :except, :if, :unless | |
send(:before_filter, filter_options) do |controller| | |
ResourceBuilder.new(controller, resource_class, resource_options) | |
.send(:load_resource) | |
end |
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
configuration: | |
identifier: com.fustrate.tasks | |
controller: Tasks_Module | |
routes: | |
tasks: | |
visible: Yes | |
title: tasks | |
routes: | |
main: |
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
protected static $format_types = array(); | |
public function tpl_format(ToxgBuilder $builder, $type, array $attributes, ToxgToken $token) | |
{ | |
$this->requireEmpty($token); | |
$this->requireAttributes(array('value', 'as'), $attributes, $token); | |
$value = $builder->parseExpression('normal', $attributes['value'], $token); | |
$as = preg_replace('~[^a-z_-]~', '', strtolower($attributes['as'])); |
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
// Gets the language string based on index | |
public function get($key, $replacements = array()) | |
{ | |
if (empty($key)) | |
throw new Core_Exception('lang_empty_index_sent'); | |
if (is_array($key)) | |
{ | |
$preserve_key = $key; | |
$search = $this->language_strings; |
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
<?php | |
function find_it($key) | |
{ | |
$preserve_key = $key; | |
$txt['first']['second']['third']['end'] = 'yay!'; | |
$search = $txt; | |
while (($part = array_shift($key)) && isset($search[$part])) |
NewerOlder