Funnyduck

Добро пожаловать на мой сайт.

23.12.2025. Скоро уже рождество, но как-то внезапно у меня упал runtipi и пока победить у меня его не получилось, надо заниматься - времени нет. недосып как обычно 2-3 часа. ездил в гранд-юг, много мебели красивой и люстра, хочется диван купить и кровать, но нехватает на мебель около 300тыс.

19.12.2005. немного лучше сегодня, потомушто спать лег наверно в22. но вставать все равно в 6.30 решил попытаться и печатать на бумаге. посмотрим. хотелось бы увидеть оригинал.

Social card example

18.12.2005. Сижу уставший и не выспавшийся на работе всталв 6.30 на улице холодно, надо сделать 35листов А3 голова болит, насморк. Деньги кончились почти. зато можно сьесть печеньку с кофе. вот такой канун рождества 2025.

залил себе кодик на гити чаёк попивай - протестировал, работает import java.time.Duration; import java.time.LocalTime;

public class SimpleConsoleTimer { public static void main(String[] args) throws InterruptedException { LocalTime targetTime = LocalTime.of(18, 0, 0);

    System.out.println("=== ТАЙМЕР ДО 18:00 (электронные часы) ===\n");
    
    while (true) {
        LocalTime currentTime = LocalTime.now();
        
        if (currentTime.isBefore(targetTime)) {
            Duration duration = Duration.between(currentTime, targetTime);
            long hours = duration.toHours();
            long minutes = duration.toMinutesPart();
            long seconds = duration.toSecondsPart();
            
            // Используем ANSI цвета для зеленой подсветки
            String green = "\u001B[32m";
            String brightGreen = "\u001B[92m";
            String reset = "\u001B[0m";
            
            // Эффект мигания
            if (System.currentTimeMillis() % 1000 < 500) {
                System.out.print(green + "═══════════════════════════════\n");
                System.out.print("  ╔═══════════════════════╗\n");
                System.out.print("  ║     " + 
                    String.format("%02d:%02d:%02d", hours, minutes, seconds) + 
                    "     ║\n");
                System.out.print("  ╚═══════════════════════╝\n");
                System.out.print("═══════════════════════════════\n" + reset);
            } else {
                System.out.print(brightGreen + "═══════════════════════════════\n");
                System.out.print("  ╔═══════════════════════╗\n");
                System.out.print("  ║     " + 
                    String.format("%02d:%02d:%02d", hours, minutes, seconds) + 
                    "     ║\n");
                System.out.print("  ╚═══════════════════════╝\n");
                System.out.print("═══════════════════════════════\n" + reset);
            }
            
        } else {
            String red = "\u001B[31m";
            String reset = "\u001B[0m";
            
            System.out.print(red + "═══════════════════════════════\n");
            System.out.print("  ╔═══════════════════════╗\n");
            System.out.print("  ║     18:00:00         ║\n");
            System.out.print("  ║   ВРЕМЯ ВЫШЛО!       ║\n");
            System.out.print("  ╚═══════════════════════╝\n");
            System.out.print("═══════════════════════════════\n" + reset);
        }
        
        // Пауза и очистка
        Thread.sleep(1000);
        clearConsole();
    }
}

private static void clearConsole() {
    try {
        if (System.getProperty("os.name").contains("Windows")) {
            new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
        } else {
            System.out.print("\033[H\033[2J");
            System.out.flush();
        }
    } catch (Exception e) {
        // Если не получилось очистить - просто выводим пустые строки
        for (int i = 0; i < 10; i++) {
            System.out.println();
        }
    }
} }

Social card example

github pages MIT license

Social card example

ᕦʕ •ᴥ•ʔᕤ Duck Club

github pages MIT license

Overview

A lightweight Hugo theme based on Bear Blog and Hugo Bear Blog.

Bear Cub takes care of speed and optimization, so you can focus on writing good content. It is free, multilingual, optimized for search engines, no-nonsense, responsive, light, and fast. Really fast.

Installation

Follow Hugo’s quick start to create an empty website and then clone Bear Cub into the themes directory as a Git submodule:

git submodule add https://github.com/clente/hugo-bearcub themes/hugo-bearcub

To finish off, append a line to the site configuration file:

echo 'theme = "hugo-bearcub"' >> hugo.toml

Features

Like Bear Blog, this theme:

But that’s not all! Bear Cub is also…

Accessible

Bear Cub has a few accessibility upgrades when compared to its predecessors. The color palette has been overhauled to make sure everything is readable for users with low vision impairments or color deficiencies, and some interactive elements were made bigger to facilitate clicking for users with a motor impairment.

These small changes mean that Bear Cub passes Google’s PageSpeed test with flying colors.

PageSpeed score

Secure

Bear Cub’s demo is hosted on GitHub and therefore I’m not in control of its Content Security Policy. However, the theme itself was made with security in mind: there are no inline styles and it uses no JavaScript at all.

If you want to improve your Mozilla Observatory score even further, you should be able to simply add a few headers to your hosting service’s configuration (e.g. Netlify or Cloudflare Pages) and never have to think about it again. My _headers file, for example, looks like this:

/*
  X-Content-Type-Options: nosniff
  Strict-Transport-Security: "max-age=31536000; includeSubDomains; preload" env=HTTPS
  Cache-Control: max-age=31536000, public
  X-Frame-Options: deny
  Referrer-Policy: no-referrer
  Feature-Policy: microphone 'none'; payment 'none'; geolocation 'none'; midi 'none'; sync-xhr 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'
  Content-Security-Policy: default-src 'none'; manifest-src 'self'; font-src 'self'; img-src 'self'; style-src 'self'; form-action 'none'; frame-ancestors 'none'; base-uri 'none'
  X-XSS-Protection: 1; mode=block

Multilingual

If you need to write a blog that supports more than one language, Bear Cub has you covered! Check out the demo’s hugo.toml file for a sample of how you can setup multilingual support.

By default, the theme creates a translation button that gets disabled when the current page is only available in any other language. You can also choose to hide this button (instead of disabling it) by setting hideUntranslated = true.

More

Every once in a while, as I keep using Bear Cub, I notice that there is some functionality missing. Currently, these are the “advanced features” that I have already implemented:

Social card example

Configuration

Bear Cub can be customized with a hugo.toml file. Check out the configuration of the demo for more information.

# Basic config
baseURL = "https://example.com"
theme = "hugo-bearcub"
copyright = "John Doe (CC BY 4.0)"
defaultContentLanguage = "en"

# Generate a nice robots.txt for SEO
enableRobotsTXT = true

# Setup syntax highlighting without inline styles. For more information about
# why you'd want to avoid inline styles, see
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles
[markup]
  [markup.highlight]
    lineNos = true
    lineNumbersInTable = false
    # This allows Bear Cub to use a variation of Dracula that is more accessible
    # to people with poor eyesight. For more information about color contrast
    # and accessibility, see https://web.dev/color-and-contrast-accessibility/
    noClasses = false

# Multilingual mode config. More for information about how to setup translation,
# see https://gohugo.io/content-management/multilingual/
[languages]
  [languages.en]
    title = "Bear Cub"
    languageName = "en-US 🇺🇸"
    LanguageCode = "en-US"
    contentDir = "content"
    [languages.en.params]
      madeWith = "Made with [Bear Cub](https://github.com/clente/hugo-bearcub)"
  [languages.pt]
    title = "Bear Cub"
    languageName = "pt-BR 🇧🇷"
    LanguageCode = "pt-BR"
    contentDir = "content.pt"
    [languages.pt.params]
      madeWith = "Feito com [Bear Cub](https://github.com/clente/hugo-bearcub)"

[params]
  # The description of your website
  description = "Bear Cub Demo"

  # The path to your favicon
  favicon = "images/favicon.png"

  # These images will show up when services want to generate a preview of a link
  # to your site. Ignored if `generateSocialCard = true`. For more information
  # about previews, see https://gohugo.io/templates/internal#twitter-cards and
  # https://gohugo.io/templates/internal#open-graph
  images = ["images/share.webp"]

  # This title is used as the site_name on the Hugo's internal opengraph
  # structured data template
  title = "Bear Cub"

  # Dates are displayed following the format below. For more information about
  # formatting, see https://gohugo.io/functions/format/
  dateFormat = "2006-01-02"

  # If your blog is multilingual but you haven't translated a page, this theme
  # will create a disabled link. By setting `hideUntranslated` to true, you can
  # have the theme simply not show any link
  hideUntranslated = false

  # (EXPERIMENTAL) This theme has two options for its CSS styles: "original" and
  # "herman". The former is what you see on Bear Cub's demo (an optimized
  # version of Hugo Bear Blog), while the latter has a more modern look based on
  # Herman Martinus's version of the Blogster Minimal theme for Astro.
  themeStyle = "original"

  # (EXPERIMENTAL) This theme is capable of dynamically generating social cards
  # for posts that don't have `images` defined in their front matter; By setting
  # `generateSocialCard` to false, you can prevent this behavior. For more
  # information see layouts/partials/social_card.html
  generateSocialCard = true

  # Social media. Delete any item you aren't using to make sure it won't show up
  # in your website's metadata.
  [params.social]
    twitter = "example" # Twitter handle (without '@')
    facebook_admin = "0000000000" # Facebook Page Admin ID

  # Author metadata. This is mostly used for the RSS feed of your site, but the
  # email is also added to the footer of each post. You can hide the "reply to"
  # link by using a `hideReply` param in front matter.
  [params.author]
    name = "John Doe" # Your name as shown in the RSS feed metadata
    email = "me@example.com" # Added to the footer so readers can reply to posts

Contributing

If you come across any problems while using Bear Cub, you can file an issue or create a pull request.