This howto describes installing entware for the Tomato open-source router firmware.
- USB stick - 1G or more in size
- USB-capable router running TomatoUSB.
| const SecretsManager = require('aws-sdk/clients/secretsmanager'); | |
| const CloudFront = require('aws-sdk/clients/cloudfront'); | |
| const { URL } = require('url'); | |
| const responseBodyTemplate = `<!DOCTYPE html> | |
| <html lang="ja"> | |
| <meta http-equiv="refresh" content="1; url=###URL###"> | |
| <meta charset="utf-8"> | |
| <title>redirect..</title> | |
| 移動しない場合は<a href="###URL###">こちら</a>をクリックしてください`; |
| var express = require('express'); | |
| var expressWs = require('express-ws'); | |
| var expressWs = expressWs(express()); | |
| var app = expressWs.app; | |
| app.use(express.static('public')); | |
| var aWss = expressWs.getWss('/'); | |
| app.ws('/', function(ws, req) { |
| class FizzBuzz: | |
| def __init__(self,num): | |
| self.count(num) | |
| def count(self,num): | |
| if num >= 1: | |
| self.count(num - 1) | |
| self.fizz_buzz(num) | |
| def fizz_buzz(self,num): |
This howto describes installing entware for the Tomato open-source router firmware.
| /** | |
| * Converts a string to a "URL-safe" slug. | |
| * Allows for some customization with two optional parameters: | |
| * | |
| * @param {string} Delimiter used. If not specified, defaults to a dash "-" | |
| * @param {array} Adds to the list of non-alphanumeric characters which | |
| * will be converted to the delimiter. The default list includes: | |
| * ['–', '—', '―', '~', '\\', '/', '|', '+', '\'', '‘', '’', ' '] | |
| */ | |
| if (!String.prototype.slugify) { |
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| function slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |