Module: Roebe
- Includes:
- Encoding
- Defined in:
- lib/roebe/math/pi.rb,
lib/roebe/base/env.rb,
lib/roebe/base/run.rb,
lib/roebe/base/base.rb,
lib/roebe/base/copy.rb,
lib/roebe/base/misc.rb,
lib/roebe/base/next.rb,
lib/roebe/base/opnn.rb,
lib/roebe/base/simp.rb,
lib/roebe/base/time.rb,
lib/roebe/cat/class.rb,
lib/roebe/math/fact.rb,
lib/roebe/math/math.rb,
lib/roebe/time/time.rb,
lib/roebe/base/chdir.rb,
lib/roebe/base/reset.rb,
lib/roebe/classes/at.rb,
lib/roebe/classes/in.rb,
lib/roebe/math/log10.rb,
lib/roebe/base/editor.rb,
lib/roebe/classes/mbl.rb,
lib/roebe/classes/ram.rb,
lib/roebe/classes/vte.rb,
lib/roebe/linux/linux.rb,
lib/roebe/math/circle.rb,
lib/roebe/math/sphere.rb,
lib/roebe/mouse/mouse.rb,
lib/roebe/base/colours.rb,
lib/roebe/base/esystem.rb,
lib/roebe/base/symlink.rb,
lib/roebe/browser/menu.rb,
lib/roebe/browser/misc.rb,
lib/roebe/classes/dbus.rb,
lib/roebe/classes/done.rb,
lib/roebe/classes/imdb.rb,
lib/roebe/classes/into.rb,
lib/roebe/classes/quiz.rb,
lib/roebe/classes/zoll.rb,
lib/roebe/math/anagram.rb,
lib/roebe/math/binning.rb,
lib/roebe/windows/misc.rb,
lib/roebe/base/encoding.rb,
lib/roebe/browser/reset.rb,
lib/roebe/classes/clock.rb,
lib/roebe/classes/conky.rb,
lib/roebe/classes/email.rb,
lib/roebe/classes/empty.rb,
lib/roebe/classes/merge.rb,
lib/roebe/classes/mrxvt.rb,
lib/roebe/classes/my_ip.rb,
lib/roebe/classes/rdate.rb,
lib/roebe/classes/story.rb,
lib/roebe/classes/today.rb,
lib/roebe/classes/unrar.rb,
lib/roebe/classes/usage.rb,
lib/roebe/constants/www.rb,
lib/roebe/math/steigung.rb,
lib/roebe/math/zylinder.rb,
lib/roebe/www/std_linux.rb,
lib/roebe/base/constants.rb,
lib/roebe/base/prototype.rb,
lib/roebe/classes/bezirk.rb,
lib/roebe/classes/enable.rb,
lib/roebe/classes/github.rb,
lib/roebe/classes/inhalt.rb,
lib/roebe/classes/ipaste.rb,
lib/roebe/classes/nvidia.rb,
lib/roebe/classes/to_buy.rb,
lib/roebe/classes/to_utf.rb,
lib/roebe/classes/undone.rb,
lib/roebe/classes/update.rb,
lib/roebe/classes/zenity.rb,
lib/roebe/constants/misc.rb,
lib/roebe/math/draw_line.rb,
lib/roebe/modules/as_uid.rb,
lib/roebe/www/module_www.rb,
lib/roebe/browser/firefox.rb,
lib/roebe/classes/aliases.rb,
lib/roebe/classes/disable.rb,
lib/roebe/classes/holiday.rb,
lib/roebe/classes/n_files.rb,
lib/roebe/classes/n_fotos.rb,
lib/roebe/classes/rbashrc.rb,
lib/roebe/classes/run/run.rb,
lib/roebe/classes/schlafe.rb,
lib/roebe/classes/size_of.rb,
lib/roebe/classes/slogans.rb,
lib/roebe/classes/stories.rb,
lib/roebe/classes/to_next.rb,
lib/roebe/classes/upcaser.rb,
lib/roebe/colours/colours.rb,
lib/roebe/constants/roebe.rb,
lib/roebe/project/project.rb,
lib/roebe/shell/help/help.rb,
lib/roebe/version/version.rb,
lib/roebe/base/is_on_roebe.rb,
lib/roebe/browser/palemoon.rb,
lib/roebe/classes/calendar.rb,
lib/roebe/classes/ethernet.rb,
lib/roebe/classes/make_gem.rb,
lib/roebe/classes/modright.rb,
lib/roebe/classes/open_pdf.rb,
lib/roebe/classes/ruby_cat.rb,
lib/roebe/classes/ruby_seq.rb,
lib/roebe/classes/run/menu.rb,
lib/roebe/classes/terminal.rb,
lib/roebe/classes/treeview.rb,
lib/roebe/commandline/help.rb,
lib/roebe/commandline/menu.rb,
lib/roebe/commandline/misc.rb,
lib/roebe/constants/emojis.rb,
lib/roebe/browser/constants.rb,
lib/roebe/classes/all_games.rb,
lib/roebe/classes/autodater.rb,
lib/roebe/classes/clipboard.rb,
lib/roebe/classes/copy_here.rb,
lib/roebe/classes/daemonize.rb,
lib/roebe/classes/date_sort.rb,
lib/roebe/classes/fetch_url.rb,
lib/roebe/classes/identical.rb,
lib/roebe/classes/last_line.rb,
lib/roebe/classes/mount_dvd.rb,
lib/roebe/classes/move_file.rb,
lib/roebe/classes/nutrition.rb,
lib/roebe/classes/passwords.rb,
lib/roebe/classes/qemu/qemu.rb,
lib/roebe/classes/ruby_main.rb,
lib/roebe/classes/slow_load.rb,
lib/roebe/classes/test_yaml.rb,
lib/roebe/classes/to_binary.rb,
lib/roebe/classes/to_tar_gz.rb,
lib/roebe/classes/translate.rb,
lib/roebe/classes/use_jruby.rb,
lib/roebe/classes/wallpaper.rb,
lib/roebe/classes/wikipedia.rb,
lib/roebe/classes/wlan/wlan.rb,
lib/roebe/classes/word_wrap.rb,
lib/roebe/constants/newline.rb,
lib/roebe/editors/ruby_nano.rb,
lib/roebe/encoding/encoding.rb,
lib/roebe/shell/shell/shell.rb,
lib/roebe/base/verbose_truth.rb,
lib/roebe/classes/books/menu.rb,
lib/roebe/classes/check_yaml.rb,
lib/roebe/classes/create_iso.rb,
lib/roebe/classes/create_zip.rb,
lib/roebe/classes/cute_emoji.rb,
lib/roebe/classes/do_install.rb,
lib/roebe/classes/good_night.rb,
lib/roebe/classes/hex_to_rgb.rb,
lib/roebe/classes/iso_to_usb.rb,
lib/roebe/classes/meal_maker.rb,
lib/roebe/classes/move_mouse.rb,
lib/roebe/classes/n_symlinks.rb,
lib/roebe/classes/send_email.rb,
lib/roebe/classes/sourcerank.rb,
lib/roebe/classes/to_tar_bz2.rb,
lib/roebe/classes/yaml_check.rb,
lib/roebe/math/draw_triangle.rb,
lib/roebe/toplevel_methods/e.rb,
lib/roebe/windows/powershell.rb,
lib/roebe/classes/all_my_gems.rb,
lib/roebe/classes/append_this.rb,
lib/roebe/classes/automounter.rb,
lib/roebe/classes/books/books.rb,
lib/roebe/classes/file_filter.rb,
lib/roebe/classes/file_parser.rb,
lib/roebe/classes/fix_mcookie.rb,
lib/roebe/classes/hello_world.rb,
lib/roebe/classes/java_header.rb,
lib/roebe/classes/java_runner.rb,
lib/roebe/classes/line_padder.rb,
lib/roebe/classes/nano_config.rb,
lib/roebe/classes/php_to_ruby.rb,
lib/roebe/classes/publish_gem.rb,
lib/roebe/classes/random_open.rb,
lib/roebe/classes/remote_gems.rb,
lib/roebe/classes/remove_gems.rb,
lib/roebe/classes/remove_line.rb,
lib/roebe/classes/ruby_header.rb,
lib/roebe/classes/set_aliases.rb,
lib/roebe/classes/set_chained.rb,
lib/roebe/classes/set_hwclock.rb,
lib/roebe/classes/show_sigint.rb,
lib/roebe/classes/std_renamer.rb,
lib/roebe/classes/supermerger.rb,
lib/roebe/classes/tic_tac_toe.rb,
lib/roebe/classes/to_squashfs.rb,
lib/roebe/constants/constants.rb,
lib/roebe/modules/remove_html.rb,
lib/roebe/windows/usb_devices.rb,
lib/roebe/base/write_what_into.rb,
lib/roebe/classes/css_analyzer.rb,
lib/roebe/classes/day_calendar.rb,
lib/roebe/classes/file_renamer.rb,
lib/roebe/classes/fix_timezone.rb,
lib/roebe/classes/inputrc/misc.rb,
lib/roebe/classes/kill_firefox.rb,
lib/roebe/classes/misc/anteile.rb,
lib/roebe/classes/non_symlinks.rb,
lib/roebe/classes/number_files.rb,
lib/roebe/classes/prepend_this.rb,
lib/roebe/classes/rxinitrc/run.rb,
lib/roebe/classes/terminal_ps1.rb,
lib/roebe/classes/test_openssl.rb,
lib/roebe/configuration/module.rb,
lib/roebe/gui/gtk4/shell/shell.rb,
lib/roebe/toplevel_methods/env.rb,
lib/roebe/toplevel_methods/irb.rb,
lib/roebe/toplevel_methods/rds.rb,
lib/roebe/classes/add_irc_quote.rb,
lib/roebe/classes/caesar_cipher.rb,
lib/roebe/classes/dhcpcd/dhcpcd.rb,
lib/roebe/classes/done_and_open.rb,
lib/roebe/classes/foto_searcher.rb,
lib/roebe/classes/grub_appender.rb,
lib/roebe/classes/kill_palemoon.rb,
lib/roebe/classes/mrxvt_options.rb,
lib/roebe/classes/n_directories.rb,
lib/roebe/classes/pristine_gems.rb,
lib/roebe/classes/pull_together.rb,
lib/roebe/classes/rxinitrc/help.rb,
lib/roebe/classes/sorted_output.rb,
lib/roebe/classes/start_program.rb,
lib/roebe/classes/todo_overview.rb,
lib/roebe/custom_methods/module.rb,
lib/roebe/math/regel_von_sarrus.rb,
lib/roebe/shell/colours/colours.rb,
lib/roebe/shell/project/project.rb,
lib/roebe/shell/session/session.rb,
lib/roebe/shell/shell/constants.rb,
lib/roebe/sql_paradise/commands.rb,
lib/roebe/toplevel_methods/jp2a.rb,
lib/roebe/toplevel_methods/mama.rb,
lib/roebe/toplevel_methods/math.rb,
lib/roebe/toplevel_methods/misc.rb,
lib/roebe/toplevel_methods/opnn.rb,
lib/roebe/toplevel_methods/time.rb,
lib/roebe/toplevel_methods/trad.rb,
lib/roebe/toplevel_methods/wget.rb,
lib/roebe/toplevel_methods/zlib.rb,
lib/roebe/classes/append_to_line.rb,
lib/roebe/classes/calendar_maker.rb,
lib/roebe/classes/compile_kernel.rb,
lib/roebe/classes/font_installer.rb,
lib/roebe/classes/fragment_maker.rb,
lib/roebe/classes/gzip_this_file.rb,
lib/roebe/classes/hosts_appender.rb,
lib/roebe/classes/mount_iso_file.rb,
lib/roebe/classes/pad_via_quotes.rb,
lib/roebe/classes/proper_english.rb,
lib/roebe/classes/remove_missing.rb,
lib/roebe/classes/set_background.rb,
lib/roebe/classes/size_of_states.rb,
lib/roebe/classes/syntax_checker.rb,
lib/roebe/classes/system_checker.rb,
lib/roebe/classes/telnet_wrapper.rb,
lib/roebe/classes/test_for_psych.rb,
lib/roebe/classes/todo_sanitizer.rb,
lib/roebe/toplevel_methods/chdir.rb,
lib/roebe/toplevel_methods/email.rb,
lib/roebe/toplevel_methods/files.rb,
lib/roebe/toplevel_methods/ntrad.rb,
lib/roebe/toplevel_methods/regex.rb,
lib/roebe/toplevel_methods/setup.rb,
lib/roebe/toplevel_methods/video.rb,
lib/roebe/toplevel_methods/whois.rb,
lib/roebe/classes/add_user_lighty.rb,
lib/roebe/classes/basic_configure.rb,
lib/roebe/classes/copy_from_glibc.rb,
lib/roebe/classes/covid_lethality.rb,
lib/roebe/classes/cut_after_colon.rb,
lib/roebe/classes/duplicate_files.rb,
lib/roebe/classes/handle_lighttpd.rb,
lib/roebe/classes/inputrc/inputrc.rb,
lib/roebe/classes/install_my_gems.rb,
lib/roebe/classes/install_wrapper.rb,
lib/roebe/classes/kde/restore_kde.rb,
lib/roebe/classes/remove_newlines.rb,
lib/roebe/classes/set_current_iso.rb,
lib/roebe/classes/show_only_files.rb,
lib/roebe/classes/special_symlink.rb,
lib/roebe/classes/take_screenshot.rb,
lib/roebe/classes/top_ten_aliases.rb,
lib/roebe/classes/unicode_snowman.rb,
lib/roebe/classes/unified_padding.rb,
lib/roebe/classes/upload_to_imgur.rb,
lib/roebe/classes/upwards_counter.rb,
lib/roebe/classes/usb/usb_devices.rb,
lib/roebe/classes/write_what_into.rb,
lib/roebe/constants/archive_types.rb,
lib/roebe/toplevel_methods/base64.rb,
lib/roebe/toplevel_methods/chroot.rb,
lib/roebe/toplevel_methods/cliner.rb,
lib/roebe/toplevel_methods/editor.rb,
lib/roebe/toplevel_methods/enable.rb,
lib/roebe/toplevel_methods/images.rb,
lib/roebe/toplevel_methods/to_mp3.rb,
lib/roebe/classes/config_generator.rb,
lib/roebe/classes/count_characters.rb,
lib/roebe/classes/doskey_generator.rb,
lib/roebe/classes/enable_autologin.rb,
lib/roebe/classes/extract_gem_file.rb,
lib/roebe/classes/file_filters/jpg.rb,
lib/roebe/classes/find_empty_files.rb,
lib/roebe/classes/fotos_für_ingrid.rb,
lib/roebe/classes/generate_locales.rb,
lib/roebe/classes/get_dependencies.rb,
lib/roebe/classes/key_value_parser.rb,
lib/roebe/classes/nibble_converter.rb,
lib/roebe/classes/open_random_book.rb,
lib/roebe/classes/remove_directory.rb,
lib/roebe/classes/remove_extension.rb,
lib/roebe/classes/remove_localhost.rb,
lib/roebe/classes/serve_local_page.rb,
lib/roebe/classes/show_ten_aliases.rb,
lib/roebe/classes/simple_extractor.rb,
lib/roebe/classes/traverse_install.rb,
lib/roebe/classes/umlaut_converter.rb,
lib/roebe/custom_methods/constants.rb,
lib/roebe/editors/vim_paradise/run.rb,
lib/roebe/jruby/jruby_enhancements.rb,
lib/roebe/math/primfaktorzerlegung.rb,
lib/roebe/requires/require_unicode.rb,
lib/roebe/shell/module_methods/ftp.rb,
lib/roebe/sql_paradise/insert_into.rb,
lib/roebe/sql_paradise/sql_command.rb,
lib/roebe/toplevel_methods/c_debug.rb,
lib/roebe/toplevel_methods/chained.rb,
lib/roebe/toplevel_methods/disable.rb,
lib/roebe/toplevel_methods/esystem.rb,
lib/roebe/toplevel_methods/extract.rb,
lib/roebe/toplevel_methods/newstud.rb,
lib/roebe/toplevel_methods/no_caps.rb,
lib/roebe/toplevel_methods/rubyzip.rb,
lib/roebe/toplevel_methods/to_bool.rb,
lib/roebe/toplevel_methods/warning.rb,
lib/roebe/toplevel_methods/webrick.rb,
lib/roebe/toplevel_methods/windows.rb,
lib/roebe/www/embeddable_interface.rb,
lib/roebe/classes/add_newline_after.rb,
lib/roebe/classes/alltagsgeschichte.rb,
lib/roebe/classes/available_classes.rb,
lib/roebe/classes/burn_iso/burn_iso.rb,
lib/roebe/classes/colourize_numbers.rb,
lib/roebe/classes/correct_gibberish.rb,
lib/roebe/classes/english_to_german.rb,
lib/roebe/classes/filter_apache_log.rb,
lib/roebe/classes/generate_rtf_file.rb,
lib/roebe/classes/html_form_fetcher.rb,
lib/roebe/classes/inputrc/constants.rb,
lib/roebe/classes/manipulate_quotes.rb,
lib/roebe/classes/number_to_english.rb,
lib/roebe/classes/on_screen_display.rb,
lib/roebe/classes/random_background.rb,
lib/roebe/classes/replace_what_with.rb,
lib/roebe/classes/rxinitrc/rxinitrc.rb,
lib/roebe/classes/show_appointments.rb,
lib/roebe/classes/show_non_symlinks.rb,
lib/roebe/classes/symlink_directory.rb,
lib/roebe/classes/usb/automount_usb.rb,
lib/roebe/editors/vim_paradise/help.rb,
lib/roebe/editors/vim_paradise/menu.rb,
lib/roebe/linux/slackware/slackware.rb,
lib/roebe/shell/module_methods/misc.rb,
lib/roebe/sql_paradise/create_table.rb,
lib/roebe/toplevel_methods/heredocs.rb,
lib/roebe/toplevel_methods/hostname.rb,
lib/roebe/toplevel_methods/keywords.rb,
lib/roebe/toplevel_methods/lighttpd.rb,
lib/roebe/toplevel_methods/platform.rb,
lib/roebe/toplevel_methods/studium1.rb,
lib/roebe/base/commandline_arguments.rb,
lib/roebe/classes/backup_core_system.rb,
lib/roebe/classes/burn_iso/constants.rb,
lib/roebe/classes/chmod_current_time.rb,
lib/roebe/classes/copy_kernel_config.rb,
lib/roebe/classes/create_jar_archive.rb,
lib/roebe/classes/delete_empty_files.rb,
lib/roebe/classes/dhcpcd/kill_dhcpcd.rb,
lib/roebe/classes/do_a_google_search.rb,
lib/roebe/classes/downcase_extension.rb,
lib/roebe/classes/euclidian_distance.rb,
lib/roebe/classes/general_overviewer.rb,
lib/roebe/classes/generate_alsa_conf.rb,
lib/roebe/classes/generate_ls_colors.rb,
lib/roebe/classes/generate_protocols.rb,
lib/roebe/classes/google_url_cleaner.rb,
lib/roebe/classes/make_cookbooks_gem.rb,
lib/roebe/classes/one_line_passwords.rb,
lib/roebe/classes/output_random_line.rb,
lib/roebe/classes/percentage_counter.rb,
lib/roebe/classes/remove_lighty_logs.rb,
lib/roebe/classes/require_everything.rb,
lib/roebe/classes/rxinitrc/constants.rb,
lib/roebe/classes/show_prime_numbers.rb,
lib/roebe/classes/simple_boot_script.rb,
lib/roebe/classes/sum_of_all_numbers.rb,
lib/roebe/classes/threshold_splitter.rb,
lib/roebe/classes/wochentag_anzeiger.rb,
lib/roebe/classes/youtube_downloader.rb,
lib/roebe/shell/colours/colour_codes.rb,
lib/roebe/toplevel_methods/autoprune.rb,
lib/roebe/toplevel_methods/fibonacci.rb,
lib/roebe/toplevel_methods/halloween.rb,
lib/roebe/toplevel_methods/load_yaml.rb,
lib/roebe/toplevel_methods/move_file.rb,
lib/roebe/toplevel_methods/pp_output.rb,
lib/roebe/toplevel_methods/purgeboth.rb,
lib/roebe/toplevel_methods/puts_this.rb,
lib/roebe/toplevel_methods/rinstall2.rb,
lib/roebe/toplevel_methods/tokenitor.rb,
lib/roebe/toplevel_methods/variables.rb,
lib/roebe/classes/alphabetical_sorter.rb,
lib/roebe/classes/become_another_user.rb,
lib/roebe/classes/burn_iso/initialize.rb,
lib/roebe/classes/create_desktop_file.rb,
lib/roebe/classes/display_gcc_version.rb,
lib/roebe/classes/feet_to_centimetres.rb,
lib/roebe/classes/find_expanded_alias.rb,
lib/roebe/classes/find_out_version_of.rb,
lib/roebe/classes/install_debian_file.rb,
lib/roebe/classes/kde/kde_konsole/run.rb,
lib/roebe/classes/kde/konsole_new_tab.rb,
lib/roebe/classes/mark_this_directory.rb,
lib/roebe/classes/pascalsches_dreieck.rb,
lib/roebe/classes/path_generator/misc.rb,
lib/roebe/classes/prepend_todays_date.rb,
lib/roebe/classes/remove_solo_numbers.rb,
lib/roebe/classes/return_random_image.rb,
lib/roebe/classes/scan_for_http_links.rb,
lib/roebe/classes/set_normal_alias_to.rb,
lib/roebe/classes/show_kernel_modules.rb,
lib/roebe/classes/show_twenty_aliases.rb,
lib/roebe/classes/webfancy_controller.rb,
lib/roebe/gui/libui/rundll32/rundll32.rb,
lib/roebe/math/average_of_differences.rb,
lib/roebe/math/calculate_the_variance.rb,
lib/roebe/toplevel_methods/arrow_keys.rb,
lib/roebe/toplevel_methods/background.rb,
lib/roebe/toplevel_methods/cp_to_here.rb,
lib/roebe/toplevel_methods/multimedia.rb,
lib/roebe/toplevel_methods/open_ports.rb,
lib/roebe/toplevel_methods/return_pwd.rb,
lib/roebe/toplevel_methods/sitelibdir.rb,
lib/roebe/classes/check_for_bad_blocks.rb,
lib/roebe/classes/create_asoundrc_file.rb,
lib/roebe/classes/create_iso_for_games.rb,
lib/roebe/classes/downcase_directories.rb,
lib/roebe/classes/generate_grub_config.rb,
lib/roebe/classes/install_ruby_project.rb,
lib/roebe/classes/kde/kde_konsole/help.rb,
lib/roebe/classes/kde/kde_konsole/menu.rb,
lib/roebe/classes/kde/kde_konsole/misc.rb,
lib/roebe/classes/kde/kde_servicemenus.rb,
lib/roebe/classes/level_subdirectories.rb,
lib/roebe/classes/path_generator/reset.rb,
lib/roebe/classes/purge_gmon_out_files.rb,
lib/roebe/classes/readme_generator/run.rb,
lib/roebe/classes/ruby_use_config_file.rb,
lib/roebe/classes/show_available_fonts.rb,
lib/roebe/classes/show_available_users.rb,
lib/roebe/classes/skel_maker/constants.rb,
lib/roebe/classes/string_colour_parser.rb,
lib/roebe/classes/tales_from_the_crypt.rb,
lib/roebe/classes/wlan/eduroam/eduroam.rb,
lib/roebe/editors/vim_paradise/colours.rb,
lib/roebe/sql_paradise/create_database.rb,
lib/roebe/toplevel_methods/display_mbr.rb,
lib/roebe/toplevel_methods/grab_colour.rb,
lib/roebe/toplevel_methods/hello_world.rb,
lib/roebe/toplevel_methods/install_nss.rb,
lib/roebe/toplevel_methods/is_on_roebe.rb,
lib/roebe/toplevel_methods/mount_procs.rb,
lib/roebe/toplevel_methods/nano_addons.rb,
lib/roebe/toplevel_methods/remove_user.rb,
lib/roebe/toplevel_methods/return_date.rb,
lib/roebe/toplevel_methods/xorg_buffer.rb,
lib/roebe/base/home_directory_of_user_x.rb,
lib/roebe/classes/celsius_to_fahrenheit.rb,
lib/roebe/classes/create_benchmark_file.rb,
lib/roebe/classes/create_my_directories.rb,
lib/roebe/classes/extract_documentation.rb,
lib/roebe/classes/find_static_libraries.rb,
lib/roebe/classes/kde/kde_konsole/reset.rb,
lib/roebe/classes/lilo_config_generator.rb,
lib/roebe/classes/married_with_children.rb,
lib/roebe/classes/n_gems_exist_in_total.rb,
lib/roebe/classes/package_java_compiler.rb,
lib/roebe/classes/pound_to_kg_converter.rb,
lib/roebe/classes/readme_generator/misc.rb,
lib/roebe/classes/remove_file_extension.rb,
lib/roebe/classes/ruby_version_switcher.rb,
lib/roebe/classes/skel_maker/skel_maker.rb,
lib/roebe/classes/time/display_weekdays.rb,
lib/roebe/classes/time/query_world_time.rb,
lib/roebe/classes/wayland_or_xorgserver.rb,
lib/roebe/commandline/parse_commandline.rb,
lib/roebe/dosbox/generate_dosbox_config.rb,
lib/roebe/knowledge_base/knowledge_base.rb,
lib/roebe/mouse/libffi_is_not_available.rb,
lib/roebe/shell/commandline/commandline.rb,
lib/roebe/shell/module_methods/encoding.rb,
lib/roebe/shell/standalone_classes/todo.rb,
lib/roebe/toplevel_methods/install_rust.rb,
lib/roebe/toplevel_methods/sanitize_url.rb,
lib/roebe/toplevel_methods/to_camelcase.rb,
lib/roebe/base/support_for_beautiful_url.rb,
lib/roebe/classes/add_two_binary_numbers.rb,
lib/roebe/classes/birthday_notifications.rb,
lib/roebe/classes/conky_rcfile_generator.rb,
lib/roebe/classes/delete_all_directories.rb,
lib/roebe/classes/download_from_this_url.rb,
lib/roebe/classes/generate_nsswitch_conf.rb,
lib/roebe/classes/generate_rewrite_rules.rb,
lib/roebe/classes/generate_system_values.rb,
lib/roebe/classes/grant_superuser_rights.rb,
lib/roebe/classes/readme_generator/reset.rb,
lib/roebe/classes/remove_duplicate_lines.rb,
lib/roebe/classes/roman_number_converter.rb,
lib/roebe/classes/simple_markdown_parser.rb,
lib/roebe/editors/vim_paradise/constants.rb,
lib/roebe/shell/module_methods/anmeldung.rb,
lib/roebe/shell/module_methods/main_file.rb,
lib/roebe/toplevel_methods/calculate_bmi.rb,
lib/roebe/toplevel_methods/display_array.rb,
lib/roebe/toplevel_methods/prime_numbers.rb,
lib/roebe/toplevel_methods/to_underscore.rb,
lib/roebe/toplevel_methods/update_pciids.rb,
lib/roebe/toplevel_methods/verbose_truth.rb,
lib/roebe/classes/compare_these_two_files.rb,
lib/roebe/classes/lotto/handle_quicktipps.rb,
lib/roebe/classes/paragraph_onto_one_line.rb,
lib/roebe/classes/permission_ascii_format.rb,
lib/roebe/classes/purge_ordoc_directories.rb,
lib/roebe/classes/report_same_named_files.rb,
lib/roebe/classes/time/set_hardware_clock.rb,
lib/roebe/classes/turn_ruby_file_into_gem.rb,
lib/roebe/classes/usb/create_bootable_usb.rb,
lib/roebe/classes/xfce/set_xfce_wallpaper.rb,
lib/roebe/shell/help/colourized_help_line.rb,
lib/roebe/shell/module_methods/benchmarks.rb,
lib/roebe/snippets/obtain_all_descendants.rb,
lib/roebe/toplevel_methods/ascii_paradise.rb,
lib/roebe/toplevel_methods/human_readable.rb,
lib/roebe/toplevel_methods/module_methods.rb,
lib/roebe/toplevel_methods/open_in_editor.rb,
lib/roebe/toplevel_methods/report_classes.rb,
lib/roebe/toplevel_methods/show_processes.rb,
lib/roebe/classes/create_file_skeleton/run.rb,
lib/roebe/classes/create_firefox_extension.rb,
lib/roebe/classes/delete_empty_directories.rb,
lib/roebe/classes/generate_robots_txt_file.rb,
lib/roebe/classes/generate_xauthority_file.rb,
lib/roebe/classes/interactive_file_creator.rb,
lib/roebe/classes/keys_generator/constants.rb,
lib/roebe/classes/left_hyphen_in_this_file.rb,
lib/roebe/classes/menu_generator/append_to.rb,
lib/roebe/classes/menu_generator/constants.rb,
lib/roebe/classes/path_generator/constants.rb,
lib/roebe/classes/run_each_line_as_esystem.rb,
lib/roebe/classes/time/trivial_time_parser.rb,
lib/roebe/toplevel_methods/beautify_system.rb,
lib/roebe/toplevel_methods/blinking_cursor.rb,
lib/roebe/toplevel_methods/crazy_make_mode.rb,
lib/roebe/toplevel_methods/download_emojis.rb,
lib/roebe/toplevel_methods/increase_volume.rb,
lib/roebe/toplevel_methods/install_vivaldi.rb,
lib/roebe/toplevel_methods/new_konsole_tab.rb,
lib/roebe/toplevel_methods/open_in_browser.rb,
lib/roebe/toplevel_methods/register_sigint.rb,
lib/roebe/toplevel_methods/set_ten_aliases.rb,
lib/roebe/toplevel_methods/write_what_into.rb,
lib/roebe/classes/copy_these_directories_to.rb,
lib/roebe/classes/custom_table/custom_table.rb,
lib/roebe/classes/kde/kde_konsole/constants.rb,
lib/roebe/classes/lighttpd_config_generator.rb,
lib/roebe/classes/my_default_webrick_server.rb,
lib/roebe/classes/remove_bad_fluxbox_styles.rb,
lib/roebe/classes/remove_comments/constants.rb,
lib/roebe/classes/twentyfour_hours_notation.rb,
lib/roebe/configuration/class/configuration.rb,
lib/roebe/editors/vim_paradise/vim_paradise.rb,
lib/roebe/gui/libui/todo_viewer/todo_viewer.rb,
lib/roebe/gui/universal_widgets/shell/shell.rb,
lib/roebe/linux/slackware/remove_pulseaudio.rb,
lib/roebe/math/traurige_oder_fröhliche_zahl.rb,
lib/roebe/shell/configuration/configuration.rb,
lib/roebe/shell/gui/gtk3/vte_terminal_frame.rb,
lib/roebe/shell/module_methods/startup_time.rb,
lib/roebe/toplevel_methods/create_directory.rb,
lib/roebe/toplevel_methods/newstud/newstud1.rb,
lib/roebe/toplevel_methods/newstud/newstud2.rb,
lib/roebe/toplevel_methods/newstud/newstud3.rb,
lib/roebe/toplevel_methods/newstud/newstud4.rb,
lib/roebe/toplevel_methods/newstud/newstud5.rb,
lib/roebe/toplevel_methods/newstud/newstud6.rb,
lib/roebe/toplevel_methods/newstud/newstud7.rb,
lib/roebe/toplevel_methods/newstud/newstud8.rb,
lib/roebe/toplevel_methods/newstud/newstud9.rb,
lib/roebe/toplevel_methods/word_frequencies.rb,
lib/roebe/classes/apache_configuration_maker.rb,
lib/roebe/classes/batch_generate_all_my_gems.rb,
lib/roebe/classes/create_file_skeleton/reset.rb,
lib/roebe/classes/current_monitor_resolution.rb,
lib/roebe/classes/generate_gemspec/constants.rb,
lib/roebe/classes/grub/grub_config_generator.rb,
lib/roebe/classes/icewm/icewm_keys_generator.rb,
lib/roebe/classes/kde/kde_konsole/initialize.rb,
lib/roebe/classes/parse_apache_log/constants.rb,
lib/roebe/classes/purge_files_or_directories.rb,
lib/roebe/classes/readme_generator/constants.rb,
lib/roebe/classes/setup_chrooted_environment.rb,
lib/roebe/gui/gtk3/os_installer/os_installer.rb,
lib/roebe/gui/shared_code/email/email_module.rb,
lib/roebe/shell/help/documented_help_options.rb,
lib/roebe/shell/shell/menu_for_the_main_loop.rb,
lib/roebe/toplevel_methods/download_certdata.rb,
lib/roebe/toplevel_methods/install_this_font.rb,
lib/roebe/toplevel_methods/newstud/newstud10.rb,
lib/roebe/toplevel_methods/newstud/newstud11.rb,
lib/roebe/toplevel_methods/newstud/newstud12.rb,
lib/roebe/toplevel_methods/newstud/newstud13.rb,
lib/roebe/toplevel_methods/newstud/newstud14.rb,
lib/roebe/toplevel_methods/newstud/newstud15.rb,
lib/roebe/toplevel_methods/newstud/newstud16.rb,
lib/roebe/toplevel_methods/newstud/newstud17.rb,
lib/roebe/toplevel_methods/newstud/newstud18.rb,
lib/roebe/toplevel_methods/newstud/newstud19.rb,
lib/roebe/toplevel_methods/newstud/newstud20.rb,
lib/roebe/toplevel_methods/newstud/newstud21.rb,
lib/roebe/toplevel_methods/newstud/newstud22.rb,
lib/roebe/toplevel_methods/newstud/newstud23.rb,
lib/roebe/toplevel_methods/newstud/newstud24.rb,
lib/roebe/toplevel_methods/newstud/newstud25.rb,
lib/roebe/toplevel_methods/unicode/completed.rb,
lib/roebe/classes/install_flash/install_flash.rb,
lib/roebe/classes/kde/kde_konsole/kde_konsole.rb,
lib/roebe/classes/n_downloads_on_rubygems_org.rb,
lib/roebe/classes/readme_generator/initialize.rb,
lib/roebe/constants/home_of_the_user_called_x.rb,
lib/roebe/gui/libui/md5_comparer/md5_comparer.rb,
lib/roebe/gui/libui/show_aliases/show_aliases.rb,
lib/roebe/modules/http_status_codes/constants.rb,
lib/roebe/shell/module_methods/home_directory.rb,
lib/roebe/shell/shellrc_parser/shellrc_parser.rb,
lib/roebe/toplevel_methods/boku_opening_times.rb,
lib/roebe/toplevel_methods/convert_global_env.rb,
lib/roebe/toplevel_methods/copy_setup_rb_file.rb,
lib/roebe/toplevel_methods/create_this_c_file.rb,
lib/roebe/toplevel_methods/master_boot_record.rb,
lib/roebe/toplevel_methods/programs_directory.rb,
lib/roebe/toplevel_methods/repetition_pattern.rb,
lib/roebe/toplevel_methods/show_beauty_string.rb,
lib/roebe/toplevel_methods/silent_redirection.rb,
lib/roebe/classes/create_ruby_directory_layout.rb,
lib/roebe/classes/files_that_could_become_apps.rb,
lib/roebe/classes/generate_master_shell_script.rb,
lib/roebe/classes/generate_xorg_conf/constants.rb,
lib/roebe/classes/install_openssl_certificates.rb,
lib/roebe/classes/kde/kde_konsole_send_command.rb,
lib/roebe/classes/monthly_activity_on_rubygems.rb,
lib/roebe/classes/traurige_oder_fröhliche_zahl.rb,
lib/roebe/toplevel_methods/bundle_exam_results.rb,
lib/roebe/toplevel_methods/important_pdf_files.rb,
lib/roebe/toplevel_methods/install_this_locale.rb,
lib/roebe/classes/compare_these_two_directories.rb,
lib/roebe/classes/convert_encoding_of_this_file.rb,
lib/roebe/classes/create_local_images_yaml_file.rb,
lib/roebe/classes/find_all_files_encoded_in_iso.rb,
lib/roebe/classes/fluxbox/install_fluxbox_style.rb,
lib/roebe/classes/generate_etc_resolv_conf_file.rb,
lib/roebe/classes/increment_application_version.rb,
lib/roebe/classes/install_libreoffice/constants.rb,
lib/roebe/classes/kde/return_pid_of_kde_konsole.rb,
lib/roebe/classes/keys_generator/keys_generator.rb,
lib/roebe/classes/menu_generator/menu_generator.rb,
lib/roebe/classes/total_pages_in_finished_books.rb,
lib/roebe/gui/libui/foto_searcher/foto_searcher.rb,
lib/roebe/gui/sinatra/md5_comparer/md5_comparer.rb,
lib/roebe/pdf/prawn/all_in_one_showcasing_prawn.rb,
lib/roebe/toplevel_methods/calculate_hypotenuse.rb,
lib/roebe/toplevel_methods/colourized_tokenitor.rb,
lib/roebe/toplevel_methods/install_roebe_addons.rb,
lib/roebe/www/ginger_der_bandit/GingerDerBandit.rb,
lib/roebe/classes/add_newline_after_n_characters.rb,
lib/roebe/classes/convert_file_into_utf_encoding.rb,
lib/roebe/classes/create_file_skeleton/constants.rb,
lib/roebe/classes/kde/install_this_konsole_theme.rb,
lib/roebe/classes/prepend_this_line_to_that_file.rb,
lib/roebe/classes/put_all_gems_into_this_project.rb,
lib/roebe/classes/shells/generate_etc_shell_file.rb,
lib/roebe/classes/time/current_time_in_singapore.rb,
lib/roebe/constants/file_and_directory_constants.rb,
lib/roebe/toplevel_methods/copy_the_linux_kernel.rb,
lib/roebe/toplevel_methods/install_the_hack_font.rb,
lib/roebe/toplevel_methods/instance_variable_get.rb,
lib/roebe/browser/output_url_then_open_in_browser.rb,
lib/roebe/classes/create_docbook_sgml_dtd_catalog.rb,
lib/roebe/classes/remove_comments/remove_comments.rb,
lib/roebe/classes/return_aliases/return_n_aliases.rb,
lib/roebe/gui/libui/wlan_interface/wlan_interface.rb,
lib/roebe/gui/universal_widgets/ifconfig/ifconfig.rb,
lib/roebe/requires/require_all_standalone_classes.rb,
lib/roebe/requires/require_all_standalone_modules.rb,
lib/roebe/shell/standalone_classes/time_converter.rb,
lib/roebe/toplevel_methods/load_custom_ruby_files.rb,
lib/roebe/toplevel_methods/build_all_my_local_gems.rb,
lib/roebe/toplevel_methods/create_directory_layout.rb,
lib/roebe/toplevel_methods/does_this_program_exist.rb,
lib/roebe/www/die_katze_im_schnee/DieKatzeImSchnee.rb,
lib/roebe/classes/add_this_user_to_the_sudoers_file.rb,
lib/roebe/classes/generate_gemspec/generate_gemspec.rb,
lib/roebe/classes/parse_apache_log/parse_apache_log.rb,
lib/roebe/classes/return_aliases/return_ten_aliases.rb,
lib/roebe/gui/gtk3/guess_the_world_capitals/capital.rb,
lib/roebe/shell/module_methods/available_components.rb,
lib/roebe/toplevel_methods/require_this_roebe_class.rb,
lib/roebe/toplevel_methods/wlan/scan_for_wlan_spots.rb,
lib/roebe/classes/fluxbox/autogenerate_fluxbox_files.rb,
lib/roebe/classes/fluxbox/generate_fluxbox_apps_file.rb,
lib/roebe/classes/fluxbox/generate_fluxbox_keys_file.rb,
lib/roebe/classes/mate_terminal/rename_mate_terminal.rb,
lib/roebe/constants/array_install_these_gem_projects.rb,
lib/roebe/shell/module_methods/commandline_arguments.rb,
lib/roebe/toplevel_methods/generate_konsole_css_file.rb,
lib/roebe/toplevel_methods/install_the_cascadia_font.rb,
lib/roebe/toplevel_methods/move_to_torrent_directory.rb,
lib/roebe/toplevel_methods/n_characters_in_this_file.rb,
lib/roebe/toplevel_methods/replace_leading_file_name.rb,
lib/roebe/classes/audio_information/audio_information.rb,
lib/roebe/classes/books/finished_books/finished_books.rb,
lib/roebe/classes/differences_between_two_directories.rb,
lib/roebe/classes/find_all_files_with_a_question_mark.rb,
lib/roebe/gui/libui/show_ten_aliases/show_ten_aliases.rb,
lib/roebe/gui/universal_widgets/calculator/calculator.rb,
lib/roebe/gui/universal_widgets/send_email/send_email.rb,
lib/roebe/gui/universal_widgets/view_image/view_image.rb,
lib/roebe/modules/http_status_codes/http_status_codes.rb,
lib/roebe/toplevel_methods/install_and_update_rcfiles.rb,
lib/roebe/toplevel_methods/open_in_editor_and_browser.rb,
lib/roebe/classes/auto_rename_file_based_on_time_today.rb,
lib/roebe/classes/find_duplicate_entries_in_alias_file.rb,
lib/roebe/classes/kde/split_kde_konsole_tab_vertically.rb,
lib/roebe/classes/remove_this_substring_from_all_files.rb,
lib/roebe/classes/return_aliases/return_twenty_aliases.rb,
lib/roebe/gui/shared_code/calculator/calculator_module.rb,
lib/roebe/shell/module_methods/generate_tab_completion.rb,
lib/roebe/toplevel_methods/replace_localhost_with_data.rb,
lib/roebe/classes/generate_xorg_conf/generate_xorg_conf.rb,
lib/roebe/classes/last_called_logger/last_called_logger.rb,
lib/roebe/classes/replace_global_variables_in_this_file.rb,
lib/roebe/gui/universal_widgets/ping_widget/ping_widget.rb,
lib/roebe/gui/universal_widgets/task_viewer/task_viewer.rb,
lib/roebe/gui/universal_widgets/todo_viewer/todo_viewer.rb,
lib/roebe/classes/create_file_skeleton/generate_c_string.rb,
lib/roebe/math/calculate_the_distance_between_two_points.rb,
lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb,
lib/roebe/classes/generate_fstab_file/generate_fstab_file.rb,
lib/roebe/classes/generate_unit_files/generate_unit_files.rb,
lib/roebe/classes/install_libreoffice/install_libreoffice.rb,
lib/roebe/gui/universal_widgets/md5_comparer/md5_comparer.rb,
lib/roebe/gui/universal_widgets/show_aliases/show_aliases.rb,
lib/roebe/gui/universal_widgets/simple_clock/simple_clock.rb,
lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb,
lib/roebe/toplevel_methods/wlan/bring_up_this_wlan_device.rb,
lib/roebe/classes/create_file_skeleton/generate_cpp_string.rb,
lib/roebe/gui/shared_code/simple_clock/simple_clock_module.rb,
lib/roebe/toplevel_methods/colourize_files_and_directories.rb,
lib/roebe/toplevel_methods/run_this_file_in_the_background.rb,
lib/roebe/toplevel_methods/unicode/display_unicode_snowman.rb,
lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb,
lib/roebe/classes/create_file_skeleton/create_file_skeleton.rb,
lib/roebe/classes/create_file_skeleton/generate_ruby_string.rb,
lib/roebe/classes/symlink_all_directories_in_this_directory.rb,
lib/roebe/gui/universal_widgets/system_widget/system_widget.rb,
lib/roebe/toplevel_methods/install_linux_kernel_api_headers.rb,
lib/roebe/toplevel_methods/install_the_jet_brains_mono_font.rb,
lib/roebe/toplevel_methods/unicode/download_unicode_dataset.rb,
lib/roebe/classes/output_text_then_assign_to_the_xorg_buffer.rb,
lib/roebe/toplevel_methods/report_the_gtk_versions_available.rb,
lib/roebe/toplevel_methods/unicode/colourful_unicode_snowmen.rb,
lib/roebe/validation/validate_roeberia_environment_variables.rb,
lib/roebe/www/ariolante_and_the_kitten/AriolanteAndTheKitten.rb,
lib/roebe/classes/auto_rename_file_based_on_its_creation_date.rb,
lib/roebe/classes/modify_shebang_header/modify_shebang_header.rb,
lib/roebe/gui/universal_widgets/code_generator/code_generator.rb,
lib/roebe/gui/universal_widgets/world_capitals/world_capitals.rb,
lib/roebe/toplevel_methods/does_this_terminal_support_unicode.rb,
lib/roebe/toplevel_methods/unicode/return_all_unicode_symbols.rb,
lib/roebe/classes/ascii/fix_missing_numbers_for_ascii_paradise.rb,
lib/roebe/toplevel_methods/unicode/map_input_to_unicode_symbol.rb,
lib/roebe/classes/prepend_this_string_to_every_line_of_this_file.rb,
lib/roebe/toplevel_methods/try_to_enable_the_expanded_cd_aliases.rb,
lib/roebe/toplevel_methods/unicode/decompose_this_unicode_symbol.rb,
lib/roebe/classes/obtain_audio_recordings_from_voice_recorder/run.rb,
lib/roebe/gui/universal_widgets/show_ten_aliases/show_ten_aliases.rb,
lib/roebe/classes/aggregate_all_files_together_from_this_directory.rb,
lib/roebe/classes/generate_overview_of_the_locally_available_books.rb,
lib/roebe/classes/obtain_audio_recordings_from_voice_recorder/help.rb,
lib/roebe/classes/report_how_many_classes_exist_for_this_directory.rb,
lib/roebe/toplevel_methods/return_all_remote_entries_from_this_url.rb,
lib/roebe/gui/gtk3/guess_the_world_capitals/guess_the_world_capitals.rb,
lib/roebe/toplevel_methods/permanently_set_project_base_directory_to.rb,
lib/roebe/toplevel_methods/return_even_numbered_lines_from_this_file.rb,
lib/roebe/toplevel_methods/report_the_location_of_the_default_browser.rb,
lib/roebe/classes/convert_this_cgi_file_into_a_sinatrafied_application.rb,
lib/roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb,
lib/roebe/classes/books/sanitize_this_book_path/sanitize_this_book_path.rb,
lib/roebe/classes/obtain_audio_recordings_from_voice_recorder/constants.rb,
lib/roebe/gui/libui/interactive_caesar_cipher/interactive_caesar_cipher.rb,
lib/roebe/toplevel_methods/downcase_all_entries_in_the_current_directory.rb,
lib/roebe/gui/universal_widgets/microsoft_controller/microsoft_controller.rb,
lib/roebe/classes/symlink_everything_from_that_directory_to_this_directory.rb,
lib/roebe/shell/module_methods/report_where_the_home_directory_can_be_found.rb,
lib/roebe/toplevel_methods/check_whether_an_internet_connection_is_available.rb,
lib/roebe/toplevel_methods/update_the_main_pdf_viewer_file_with_this_program.rb,
lib/roebe/classes/replace_space_with_underscore/replace_space_with_underscore.rb,
lib/roebe/classes/update_static_html_pages_in_the_directory_containing_my_fotos.rb,
lib/roebe/gui/universal_widgets/wlan_information_center/wlan_information_center.rb,
lib/roebe/classes/symlink_directories_from_that_directory_to_the_current_directory.rb,
lib/roebe/gui/universal_widgets/interactive_caesar_cipher/interactive_caesar_cipher.rb,
lib/roebe/gui/shared_code/interactive_caesar_cipher/interactive_caesar_cipher_module.rb,
lib/roebe/gui/universal_widgets/generate_xorg_configuration/generate_xorg_configuration.rb,
lib/roebe/classes/move_content_of_this_directory_to_that_directory_unless_target_already_exists.rb,
lib/roebe/classes/obtain_audio_recordings_from_voice_recorder/obtain_audio_recordings_from_voice_recorder.rb,
lib/roebe/classes/symlink_files_from_that_directory_to_the_current_directory/symlink_files_from_that_directory_to_the_current_directory.rb
Overview
#
Roebe::GUI::InteractiveCaesarCipherModule
#
require ‘roebe/gui/shared_code/interactive_caesar_cipher/interactive_caesar_cipher_module.rb’ include Roebe::GUI::InteractiveCaesarCipherModule
#
Defined Under Namespace
Modules: ArrowKeys, BlinkingCursor, CdHelperModule, Chess, Configuration, CustomMethods, DisplayArray, Editors, EmbeddableInterface, Encoding, GUI, HtmlColours, HttpStatusCodes, HumanReadable, Jruby, KnowledgeBase, Linux, Math, Menu, Process, RemoveHtml, SaveFile, Sigint, SqlParadise, Stories, Terminal, Time, WWW, Warning, Windows, WordWrap
Classes: AddIrcQuote, AddNewlineAfter, AddNewlineAfterNCharacters, AddThisUserToTheSudoersFile, AddTwoBinaryNumbers, AddUserLighty, AggregateAllFilesTogetherFromThisDirectory, Aliases, AllGames, AllInOneShowcasingPrawn, AllMyGems, Alltagsgeschichte, AlphabeticalSorter, Anteile, ApacheConfigurationMaker, AppendThis, AppendToLine, At, AudioInformation, AutoRenameFileBasedOnItsCreationDate, AutoRenameFileBasedOnTimeToday, Autodater, AutomountUSB, Automounter, AvailableClasses, BackupCoreSystem, Base, BasicConfigure, BatchGenerateAllMyGems, BecomeAnotherUser, Bezirk, BirthdayNotifications, Books, Browser, BurnISO, CSS_Analyzer, CaesarCipher, Calendar, CalendarMaker, Cat, CelsiusToFahrenheit, CheckForBadBlocks, CheckYaml, Child, ChmodCurrentTime, Clipboard, Clock, ColourizeNumbers, CompareTheseTwoDirectories, CompareTheseTwoFiles, CompileKernel, ConfigGenerator, Conky, ConkyRcfileGenerator, ConvertEncodingOfThisFile, ConvertFileIntoUtfEncoding, ConvertThisCgiFileIntoASinatrafiedApplication, CopyFromGlibc, CopyHere, CopyKernelConfig, CopyTheseDirectoriesTo, CorrectGibberish, CountCharacters, CovidLethality, CreateAsoundrcFile, CreateBenchmarkFile, CreateBootableUSB, CreateDesktopFile, CreateDocbookSgmlDtdCatalog, CreateFileSkeleton, CreateFirefoxExtension, CreateISO, CreateIsoForGames, CreateJarArchive, CreateLocalImagesYamlFile, CreateMyDirectories, CreateRubyDirectoryLayout, CreateZip, CurrentMonitorResolution, CurrentTimeInSingapore, CustomTable, CutAfterColon, CuteEmoji, Daemonize, DateSort, DayCalendar, Dbus, DeleteAllDirectories, DeleteEmptyDirectories, DeleteEmptyFiles, Dhcpcd, DifferencesBetweenTwoDirectories, Disable, DisplayGccVersion, DisplayWeekdays, DoAGoogleSearch, DoInstall, Done, DoneAndOpen, DoskeyGenerator, DowncaseDirectories, DowncaseExtension, DownloadFromThisUrl, DuplicateFiles, Eduroam, Email, Empty, Enable, EnableAutologin, EnglishToGerman, Ethernet, EuclidianDistance, ExtractDocumentation, ExtractGemFile, FeetToCentimetres, FetchUrl, FileFilter, FileParser, FileRenamer, FilesThatCouldBecomeApps, FilterApacheLog, FindAllFilesEncodedInISO, FindAllFilesWithAQuestionMark, FindDuplicateEntriesInAliasFile, FindEmptyFiles, FindExpandedAlias, FindOutVersionOf, FindStaticLibraries, FinishedBooks, Firefox, FixMcookie, FixMissingNumbersForAsciiParadise, FixTimezone, FontInstaller, FotoSearcher, FotosFürIngrid, FragmentMaker, GeneralOverviewer, GenerateAlsaConf, GenerateDosboxConfig, GenerateEtcResolvConfFile, GenerateEtcShellFile, GenerateFluxboxAppsFile, GenerateFluxboxKeysFile, GenerateFstabFile, GenerateGemspec, GenerateGrubConfig, GenerateLocales, GenerateLsColors, GenerateMasterShellScript, GenerateNanoConfig, GenerateNsswitchConf, GenerateOverviewOfTheLocallyAvailableBooks, GenerateProtocols, GenerateRewriteRules, GenerateRobotsTxtFile, GenerateRtfFile, GenerateSystemValues, GenerateUnitFiles, GenerateXauthorityFile, GenerateXorgConf, GetDependencies, Github, GoodNight, GoogleUrlCleaner, GrandChild, GrantSuperuserRights, GrubAppender, GrubConfigGenerator, GzipThisFile, HandleLightppd, HandleQuicktipps, HelloWorld, HexToRGB, Holiday, HostsAppender, HtmlFormFetcher, IPaste, IcewmKeysGenerator, Identical, Imdb, In, IncrementApplicationVersion, Inhalt, Inputrc, InstallDebianFile, InstallFlash, InstallFluxboxStyle, InstallLibreoffice, InstallMyGems, InstallOpensslCertificates, InstallRubyProject, InstallThisKonsoleTheme, InstallWrapper, InteractiveFileCreator, Into, IsoToUsb, JavaHeader, JavaRunner, Jpg, KdeKonsole, KdeKonsoleSendCommand, KdeServicemenus, KeyValueParser, KeysGenerator, KillDhcpcd, KillFirefox, KillPalemoon, KonsoleNewTab, LastCalledLogger, LastLine, LeftHyphenInThisFile, LevelSubdirectories, LighttpdConfigGenerator, LiloConfigGenerator, LinePadder, Log10, MakeCookbooksGem, MakeGem, ManipulateQuotes, MarkThisDirectory, MarriedWithChildren, Mbl, MealMaker, Merge, ModifyShebangHeader, Modright, MonthlyActivityOnRubygems, MountDVD, MountIsoFile, Mouse, MoveContentOfThisDirectoryToThatDirectoryUnlessTargetAlreadyExists, MoveFile, MoveMouse, Mrxvt, MrxvtOptions, MyDefaultWebrickServer, MyIp, NDirectories, NDownloadsOnRubygemsOrg, NFiles, NFotos, NGemsExistInTotal, NSymlinks, NcursesTerminal, NibbleConverter, NonSymlinks, NumberFiles, NumberToEnglish, Nutrition, Nvidia, ObtainAudioRecordingsFromVoiceRecorder, OnScreenDisplay, OneLinePasswords, OpenPDF, OpenRandomBook, OutputRandomLine, OutputTextThenAssignToTheXorgBuffer, OutputUrlThenOpenInBrowser, PackageJavaCompiler, PadViaQuotes, Palemoon, ParagraphOntoOneLine, Parent, ParseApacheLog, PascalschesDreieck, Passwords, PathGenerator, PercentageCounter, PermissionAsciiFormat, PhpToRuby, PoundToKgConverter, PrependThis, PrependThisLineToThatFile, PrependThisStringToEveryLineOfThisFile, PrependTodaysDate, Primfaktorzerlegung, PristineGems, ProperEnglish, PublishGem, PullTogether, PurgeFilesOrDirectories, PurgeGmonOutFiles, PurgeOrdocDirectories, PutAllGemsIntoThisProject, Qemu, QueryWorldTime, Quiz, RXinitrc, Ram, RandomBackground, RandomOpen, Rbashrc, Rdate, ReadmeGenerator, RegelVonSarrus, RemoteGems, RemoveBadFluxboxStyles, RemoveComments, RemoveDirectory, RemoveDuplicateLines, RemoveExtension, RemoveFileExtension, RemoveGems, RemoveLightyLogs, RemoveLine, RemoveLocalhost, RemoveMissing, RemoveNewlines, RemoveSoloNumbers, RemoveThisSubstringFromAllFiles, RenameMateTerminal, ReplaceGlobalVariablesInThisFile, ReplaceSpaceWithUnderscore, ReplaceWhatWith, ReportHowManyClassesExistForThisDirectory, ReportSameNamedFiles, RequireEverything, RestoreKde, ReturnNAliases, ReturnRandomImage, ReturnTenAliases, ReturnTwentyAliases, RomanNumberConverter, RubyCat, RubyHeader, RubyMain, RubyNano, RubySeq, RubyUseConfigFile, RubyVersionSwitcher, Run, RunEachLineAsEsystem, Rundll32, SanitizeThisBookPath, ScanForHttpLinks, Schlafe, SendEmail, ServeLocalPage, SetAliases, SetBackground, SetChained, SetCurrentISO, SetHardwareClock, SetHwclock, SetNormalAliasTo, SetXfceWallpaper, SetupChrootedEnvironment, Shell, ShowAppointments, ShowAvailableFonts, ShowAvailableUsers, ShowKernelModules, ShowNonSymlinks, ShowOnlyFiles, ShowPrimeNumbers, ShowSigint, ShowTenAliases, ShowTwentyAliases, SimpleBootScript, SimpleExtractor, SimpleMarkdownParser, SizeOf, SizeOfStates, SkelMaker, Slackware, Slogans, SlowLoad, SortedOutput, Sourcerank, SpecialSymlink, StartProgram, StdRenamer, Story, StringColourParser, SumOfAllNumbers, Supermerger, SymlinkAllDirectoriesInThisDirectory, SymlinkDirectoriesFromThatDirectoryToTheCurrentDirectory, SymlinkDirectory, SymlinkEverythingFromThatDirectoryToThisDirectory, SymlinkFilesFromThatDirectoryToTheCurrentDirectory, SyntaxChecker, SystemChecker, TakeScreenshot, TalesFromTheCrypt, TelnetWrapper, TerminalPS1, TestForPsych, TestOpenssl, TestYaml, ThresholdSplitter, TicTacToe, ToBinary, ToBuy, ToNext, ToSquashfs, ToTarBz2, ToTarGz, ToUtf, Today, TodoOverview, TodoSanitizer, TopTenAliases, TotalPagesInFinishedBooks, Translate, TraurigeOderFröhlicheZahl, TraverseInstall, Treeview, TrivialTimeParser, TurnRubyFileIntoGem, TwentyfourHoursNotation, UmlautConverter, Undone, UnicodeSnowman, UnifiedPadding, Unrar, Upcaser, Update, UpdateStaticHtmlPagesInTheDirectoryContainingMyFotos, UploadToImgur, UpwardsCounter, Usage, UsbDevices, UseJruby, ValidateRoeberiaEnvironmentVariables, VteStarter, Wallpaper, WaylandOrXorgserver, WebfancyController, Wikipedia, Wlan, WochentagAnzeiger, WriteWhatInto, YamlCheck, YoutubeDownloader, Zenity, Zoll
Constant Summary
collapse
- ONE_MINUTE =
Roebe::Time::ONE_MINUTE
- ONE_HOUR =
Roebe::Time::ONE_HOUR
- ONE_DAY =
Roebe::Time::ONE_DAY
- DAY_NAMES =
Roebe::Time::DAY_NAMES
- ERROR_LINE =
'2>&1'
- MAIN_EDITOR_TO_USE =
#
MAIN_EDITOR_TO_USE
This used to be bluefish until May 2019 where it was changed to geany.
#
'bluefish'
- BROWSER_TO_USE_BY_DEFAULT =
#
BROWSER_TO_USE_BY_DEFAULT
Which browser to use by default.
#
'palemoon'
- STUDIUM =
"#{HOME_DIRECTORY_OF_USER_X}studium/"
- STUDIUM_DIRECTORY =
STUDIUM
- STUDIUM_DIR =
STUDIUM
- DIRECTORY_ROEBE_YAML_PDF =
#
Roebe::DIRECTORY_ROEBE_YAML_PDF
The next constant is the base towards the various pdf-yaml files, such as pdf1.yml, pdf2.yml and so forth.
#
"#{Roebe.project_yaml_directory?}pdf/"
- ASCII_DIFFERENCE =
#
Roebe::ASCII_DIFFERENCE
Ascii difference means the difference between an upcased and a downcased string.
#
32
- TEMP_DIR =
'/tmp/'
- FILE_BROWSER_YAML =
#
Roebe::FILE_BROWSER_YAML
This may be at a location such as:
/usr/lib/ruby/site_ruby/3.1.0/roebe/yaml/browser.yml
#
"#{project_yaml_dir?}browser.yml"
- PROGRAMS_DIRECTORY =
'/Programs/'
- VALID_IMAGES =
#
Roebe::VALID_IMAGES
All valid image formats shall be denoted here.
In the long run we may have to use ImageParadise for this, as it seems nonsensical to maintain the same dataset in multiple different locations.
#
%w(
.png
.jpg
.gif
.jpeg
.avif
)
- FILE_USE_COLOURS =
#
Roebe::FILE_USE_COLOURS
#
"#{project_base_dir?}yaml/use_colours.yml"
- COLOURS =
nil
- ROEBE_IRB_PROMPT =
#
Roebe::ROEBE_IRB_PROMPT
#
{
PROMPT_I: "", PROMPT_N: ".. ", PROMPT_S: '"', PROMPT_C: '',
RETURN: "=> %s\n"
}
- PC =
"#{HOME_OF_THE_USER_CALLED_X}data/PC/"
- LINUX_YAML =
ENV['LINUX_YAML'].to_s
- ROEBE_DATA_DIRECTORY =
#
Roebe::ROEBE_DATA_DIRECTORY
#
"#{HOME_OF_THE_USER_CALLED_X}data/"
- ROEBE_PERSONAL_DIRECTORY =
#
ROEBE_PERSONAL_DIRECTORY
#
"#{ROEBE_DATA_DIRECTORY}personal/"
- FILE_CONTACTS_YAML =
"#{ROEBE_DATA_DIRECTORY}/personal/yaml/contacts.yml"
- FILE_CONTACTS =
FILE_CONTACTS_YAML
- PROJECT_BASE_DIRECTORY =
#
Roebe::PROJECT_BASE_DIRECTORY
Note that the constant here is only used as the initial setter. The real query-value comes from @project_base_directory defined lateron in this file. Reason being that you can also lateron, at runtime, re-define that variable.
#
File.absolute_path("#{__dir__}/..")+'/'
- FILE_PROJECT_BASE_DIRECTORY =
#
FILE_PROJECT_BASE_DIRECTORY
#
"#{Roebe.project_base_directory?}yaml/project_base_directory.yml"
- VERSION =
'0.5.191'
- LAST_UPDATE =
#
LAST_UPDATE
This constant will keep track of when this project was last updated. We will store the time here in dd.mm.yyyy notation. Do note that this constant is not updated very frequently, so do not rely on it too much - it is more a “hint” as to when a last important updated happened.
#
'31.01.2024'
- URL_TO_THE_DOCUMENTATION =
#
URL_TO_THE_DOCUMENTATION
#
"https://www.rubydoc.info/gems/#{self.to_s.downcase}/#{VERSION}"
- BOOK_EMOJI =
#
Roebe::BOOK_EMOJI
This is specifically used for .pdf-related functionality, to show a useful book-icon to the user - both on the commandline, as well as for web-related sites. See class Roebe::GenerateOverviewOfTheLocallyAvailableBooks.
#
'📚'
- N =
#
N
Simply a constant towards a newline.
#
"\n"
- NAMESPACE =
inspect
- EURO =
13.760300
- ALPHABET =
('a'..'z').to_a
- FILE_SIZE_OF_COUNTRIES =
#
FILE_SIZE_OF_COUNTRIES
#
"#{project_base_dir?}yaml/size_of_countries.yml"
- RUBY_SRC_DIR =
HOME_OF_THE_USER_CALLED_X+'programming/ruby/src/'
- RUBY_SRC =
RUBY_SRC_DIR
'# ====================================================================== #'
- TOKEN =
STD_COMMENT
- EOL =
"\r\n"
- FILE_TO_BROWSER =
#
Roebe::FILE_TO_BROWSER
Denote where the browser.yml file resides, by default.
This is obviously highly specific for my own home system.
#
HOME_OF_THE_USER_CALLED_X+'DATA/PC/yaml/browser.yml'
- ARRAY_VIDEO_FILE_TYPES =
#
ARRAY_VIDEO_FILE_TYPES
#
%w(
.vob
.avi
.flv
.mp4
)
'#!/System/Index/bin/ruby -w
# Encoding: UTF-8
# frozen_string_literal: true
# =========================================================================== #
'
- WEEKDAYS_FROM_ENGLISH_TO_GERMAN =
#
Roebe::WEEKDAYS_FROM_ENGLISH_TO_GERMAN
We start with Monday.
#
{ 'Mon' => 'Montag',
'Tue' => 'Dienstag',
'Wed' => 'Mittwoch',
'Thu' => 'Donnerstag',
'Fri' => 'Freitag',
'Sat' => 'Samstag',
'Sun' => 'Sonntag',
}
- ENGLISH_TO_GERMAN_WEEKDAY =
#
ENGLISH_TO_GERMAN_WEEKDAY
#
{
'Monday' => 'Montag',
'Tuesday' => 'Dienstag',
'Wednesday' => 'Mittwoch',
'Thursday' => 'Donnerstag',
'Friday' => 'Freitag',
'Saturday' => 'Samstag',
'Sunday' => 'Sonntag'
}
- WEEKDAYS_FROM_GERMAN_TO_ENGLISH =
#
Roebe::WEEKDAYS_FROM_GERMAN_TO_ENGLISH
We start with Monday.
#
{ 'Montag' => 'Monday',
'Dienstag' => 'Tuesday',
'Mittwoch' => 'Wednesday',
'Donnerstag' => 'Thursday',
'Freitag' => 'Friday',
'Samstag' => 'Saturday',
'Sonntag' => 'Sunday',
}
- HASH_SHORT_TO_LONG_WEEKDAYS =
#
HASH_SHORT_TO_LONG_WEEKDAYS
#
{
'Mon' => 'Monday',
'Tue' => 'Tuesday',
'Wed' => 'Wednesday',
'Thu' => 'Thursday',
'Fri' => 'Friday',
'Sat' => 'Saturday',
'Sun' => 'Sunday'
}
- ARCHIVE_TYPES =
#
ARCHIVE_TYPES
Possible archive types are stored here.
#
%w(
.gz
.bz2
.xz
.tar
.zip
.tar.xz
.tar.gz
.tar.bz2
.lz
)
- ARRAY_RUBY_KEYWORDS =
#
Roebe::ARRAY_RUBY_KEYWORDS
#
%w(
__ENCODING__
__FILE__
__LINE__
alias
and
BEGIN
begin
break
case
class def defined
do else elsif END end ensure false for if in module
next nil not or redo rescue retry return self super
then true undef unless until when while yield
)
- RUBY_RESERVED_KEYWORDS =
ARRAY_RUBY_KEYWORDS
- Keywords =
ARRAY_RUBY_KEYWORDS
- FBSETBG_COMMAND =
#
Roebe::FBSETBG_COMMAND
#
'fbsetbg -c '
- CHECKMARK_COMPLETED =
#
CHECKMARK_COMPLETED
See here:
https://www.compart.com/en/unicode/U+2714
This is also called the “heavy check mark” (U+2714), aka ‘✔’.
#
"\342\234\224"
- CHECKMARK_COMPLETED_THIN =
#
CHECKMARK_COMPLETED_THIN
See here:
https://www.compart.com/en/unicode/U+2713
#
"\342\234\223"
- HOME_OF_THE_USER_CALLED_X =
#
Roebe::HOME_OF_THE_USER_CALLED_X
#
'/home/x/'
- MASTER_BOOD_RECORD_SIZE =
#
MASTER_BOOD_RECORD_SIZE
This constant keeps track of the MBR Total Size.
This size is calculated like so:
446 + 64 + 2 = 512
These values are derived from:
446 bytes - Bootstrap size.
64 bytes - Partition table size.
2 bytes - Signature size.
On the www there is also the 446 commonly used with “dd”. You can use 446 bytes to overwrite or restore your /dev/XYZ MBR boot code only with the contents of $mbr.backup.file.
You can use 512 bytes to overwrite or restore your /dev/XYZ the full MBR (which contains both boot code and the drive’s partition table) with the contents of $mbr.backup.file.
#
512
- LINUX_DIRECTORY_FOR_TTF_FONTS =
#
LINUX_DIRECTORY_FOR_TTF_FONTS
#
'/usr/share/fonts/TTF/'
- FILE_MARK_THIS_DIRECTORY =
#
FILE_MARK_THIS_DIRECTORY
#
"#{project_base_dir?}yaml/mark_this_directory.yml"
- DIRECTORY_CONTAINING_THE_NANO_RC_FILES =
#
DIRECTORY_CONTAINING_THE_NANO_RC_FILES
#
"#{PROJECT_BASE_DIRECTORY}nano/"
- LOG_DIRECTORY =
'/Depot/Temp/roebe/'
- HOME_DIRECTORY_OF_USER_X =
#
Roebe::HOME_DIRECTORY_OF_USER_X
This constant is only useful on my home system.
#
'/home/x/'
- FILE_CD_ALIASES =
"#{HOME_DIRECTORY_OF_USER_X}programming/ruby/src/"\
"rcfiles/lib/rcfiles/yaml/cd_aliases.yml"
- FILE_ALIASES =
"#{HOME_DIRECTORY_OF_USER_X}programming/ruby/src/"\
"rcfiles/lib/rcfiles/yaml/aliases.yml"
- FILE_AUTOSTART_THESE_PROGRAMS =
#
FILE_AUTOSTART_THESE_PROGRAMS
On my home system, the following .yml file can be found here:
bl $RSRC/roebe/lib/roebe/yaml/autostart_these_programs.yml
#
"#{Roebe.project_base_dir?}yaml/autostart_these_programs.yml"
- FILE_DIRECTORY_STRUCTURE =
#
Roebe::FILE_DIRECTORY_STRUCTURE
Use the method below - it is more robust in the long run, IMO.
#
"#{Roebe.project_base_dir?}yaml/directory_structure.yml"
- ARRAY_INSTALL_THESE_GEM_PROJECTS =
#
Roebe::ARRAY_INSTALL_THESE_GEM_PROJECTS
Although the listing will be sorted via a .sort, it is better to keep the entries sorted at all times - this will make later manual additions simpler.
#
%w(
ascii_countdown
ascii_paradise
autostart
backup_paradise
beautiful_url
bioroebe
case_parser
chemistry_paradise
class_docu_shower
cliner
collect_first_word_of_case_menu
colours
convert_global_env
csv_paradise
cyberweb
dictionaries
directory_paradise
easycompile
environment_information
esystem
extracter
find_line_in_file
ftp_paradise
generate_rc_file
generate_shell_completion
gtk_paradise
hardware_information
hours_to_seconds
html_tags
image_paradise
irc_paradise
kaisers
md5sum
method_introspection
mountpoints
multimedia_paradise
opn
pdf_paradise
percentage
program_information
rbt
remove_file_suffix
repackage
roebe
ruby_token_parser
save_file
show_rdoc_docu
stat_file
studium
symlink
tiss_project
totarxz
verbose_truth
wget
xorg_buffer
tk_paradise
fox_paradise
economy_paradise
libui_paradise
open
rcfiles
universal_pipe_handler
games_and_rpg_paradise
swing_paradise
universal_widgets
emoji_paradise
).sort
Constants included
from Encoding
Encoding::ENCODING_BIT, Encoding::ENCODING_ISO, Encoding::ENCODING_UTF, Encoding::ISO_ENCODING, Encoding::UNICODE, Encoding::USE_THIS_ENCODING
Class Method Summary
collapse
-
.[](i = '') ⇒ Object
# === RequireEverything[].
-
.add_comment(i = 76) ⇒ Object
-
.add_user_lighty ⇒ Object
# === Roebe.add_user_lighty =========================================================================== #.
-
.all_unicode_nodes ⇒ Object
# === Roebe.all_unicode_nodes.
-
.almost_equal_to ⇒ Object
# === Roebe.almost_equal_to.
-
.append_this_onto_that_file(what, into = 'foobar.md') ⇒ Object
# === Roebe.append_this_onto_that_file.
-
.append_this_program_to_the_autostart_array(i) ⇒ Object
# === Roebe.append_this_program_to_the_autostart_array.
-
.append_to_gem_install_command(i) ⇒ Object
# === Roebe.append_to_gem_install_command ========================================================================= #.
-
.are_these_two_strings_an_anagram?(string1, string2) ⇒ Boolean
# === Roebe.are_these_two_strings_an_anagram? ========================================================================= #.
-
.array_install_these_gem_projects ⇒ Object
# === Roebe.array_install_these_gem_projects.
-
.array_short_monthnames ⇒ Object
# === Roebe.array_short_monthnames.
-
.at(i = nil) ⇒ Object
# === Roebe.at =========================================================================== #.
-
.auto_rename_file_based_on_its_creation_date(i = ARGV) ⇒ Object
# === Roebe.auto_rename_file_based_on_its_creation_date =========================================================================== #.
-
.auto_rename_file_based_on_time_today(i = ARGV) ⇒ Object
# === Roebe.auto_rename_file_based_on_time_today =========================================================================== #.
-
.autodater(i = ARGV) ⇒ Object
# === Roebe.autodater =========================================================================== #.
-
.autogenerate_fluxbox_files ⇒ Object
# === Roebe.autogeneraet_fluxbox_files ========================================================================= #.
-
.autoprune(i = ARGV) ⇒ Object
# === Roebe.autoprune.
-
.autosource ⇒ Object
# === Roebe.autosource =========================================================================== #.
-
.available_classes(optional_input = nil) ⇒ Object
# === Roebe.available_classes =========================================================================== #.
-
.average_of_differences(array1 = %w( 34.9 44.4 33.6 40.1 41.5 40.3 32.6 39.3 29.3 40.5 31.4 ).map(&:to_f), array2 = %w( 38.2 38.5 40.0 38.2 37.4 37.8 40.3 36.7 38.3 40.4 38.7 ).map(&:to_f)) ⇒ Object
# === Roebe.average_of_differences.
-
.backup_master_boot_record(save_in_this_file = 'backup_mbr', use_this_as_input_device = '/dev/sda') ⇒ Object
# === Roebe.backup_master_boot_record.
-
.base64(this_file = 'image.png') ⇒ Object
# === Roebe.base64.
-
.batch ⇒ Object
# === Roebe.batch (batch tag).
-
.batch_rename_pdf_files_systematically(counter = 5) ⇒ Object
# === Roebe.batch_rename_pdf_files_systematically.
-
.beamed_eighth_note ⇒ Object
# === Roebe.beamed_eighth_note ========================================================================= #.
-
.beamed_eighth_notes ⇒ Object
# === Roebe.beamed_eighth_notes.
-
.beamed_sixteenth_notes ⇒ Object
# === Roebe.beamed_sixteenth_notes.
-
.beautify_system ⇒ Object
# === Roebe.beautify_system.
-
.binding? ⇒ Boolean
# === Roebe.binding? =========================================================================== #.
-
.binning(i, n_bins = 3) ⇒ Object
# === Roebe.binning.
-
.black_chess_bishop ⇒ Object
# === Roebe.black_chess_bishop ========================================================================= #.
-
.black_chess_king ⇒ Object
# === Roebe.black_chess_king ========================================================================= #.
-
.black_chess_knight ⇒ Object
# === Roebe.black_chess_knight ========================================================================= #.
-
.black_chess_pawn ⇒ Object
# === Roebe.black_chess_pawn ========================================================================= #.
-
.black_chess_queen ⇒ Object
# === Roebe.black_chess_queen ========================================================================= #.
-
.black_chess_rook ⇒ Object
# === Roebe.black_chess_rook ========================================================================= #.
-
.black_circle ⇒ Object
# === Roebe.black_circle.
-
.black_lozenge ⇒ Object
# === Roebe.black_lozenge ========================================================================= #.
-
.black_medium_diamond ⇒ Object
# === Roebe.black_medium_diamond ========================================================================= #.
-
.black_right_pointing_triangle ⇒ Object
# === Roebe.black_right_pointing_triangle ========================================================================= #.
-
.black_rightwards_arrow ⇒ Object
# === Roebe.black_rightwards_arrow.
-
.black_shogi_piece ⇒ Object
# === Roebe.black_shogi_piece ========================================================================= #.
-
.black_smiling_face ⇒ Object
# === Roebe.black_smiling_face ========================================================================= #.
-
.black_square ⇒ Object
# === Roebe.black_square.
-
.blinking_cursor ⇒ Object
# === Roebe.blinking_cursor =========================================================================== #.
-
.boku_opening_dates ⇒ Object
# === Studium.boku_opening_dates ========================================================================= #.
-
.box_drawings_heavy_down_and_horizontal ⇒ Object
# === Roebe.box_drawings_heavy_down_and_horizontal ========================================================================= #.
-
.box_drawings_heavy_down_and_left ⇒ Object
# === Roebe.box_drawings_heavy_down_and_left ========================================================================= #.
-
.box_drawings_heavy_down_and_right ⇒ Object
# === Roebe.box_drawings_heavy_down_and_right.
-
.box_drawings_heavy_horizontal ⇒ Object
# === Roebe.box_drawings_heavy_horizontal.
-
.box_drawings_heavy_up_and_horizontal ⇒ Object
# === Roebe.box_drawings_heavy_up_and_horizontal ========================================================================= #.
-
.box_drawings_heavy_up_and_left ⇒ Object
# === Roebe.box_drawings_heavy_up_and_left ========================================================================= #.
-
.box_drawings_heavy_up_and_right ⇒ Object
# === Roebe.box_drawings_heavy_up_and_right ========================================================================= #.
-
.box_drawings_heavy_vertical ⇒ Object
# === Roebe.box_drawings_heavy_vertical ========================================================================= #.
-
.bring_up_this_wlan_device(use_this_device = 'wlan0') ⇒ Object
# === Roebe.bring_up_this_wlan_device.
-
.browser(use_this_url = ARGV, use_this_browser = BROWSER_TO_USE_BY_DEFAULT) ⇒ Object
# === Roebe.browser.
-
.bug ⇒ Object
# === Roebe.bug ========================================================================= #.
-
.build_all_my_local_gems ⇒ Object
# === Roebe.build_all_my_local_gems.
-
.bundle_exam_results ⇒ Object
# === Roebe.bundle_exam_results.
-
.c_debug? ⇒ Boolean
# === Roebe.c_debug? ========================================================================= #.
-
.calculate_bmi(weight = 16.9, height = 105.4, round = 1) ⇒ Object
# === Roebe.calculate_bmi.
-
.calculate_hypotenuse(a, b) ⇒ Object
# === Roebe.calculate_hypotenuse.
-
.calculate_the_distance_between_two_points(p1 = ARGV, p2 = nil) ⇒ Object
# === Roebe.calculate_the_distance_between_two_points.
-
.calculate_the_variance(*i) ⇒ Object
# === Roebe.calculate_the_variance.
-
.calendar(i = ARGV) ⇒ Object
# === Roebe.calendar =========================================================================== #.
-
.capitalize_this_file(i = nil) ⇒ Object
# === Roebe.capitalize_this_file.
-
.cat(i = ARGV) ⇒ Object
# === Roebe.cat (cat tag).
-
.chained(i = ARGV) ⇒ Object
# === Roebe.chained ========================================================================= #.
-
.chdir(i = :home_dir) ⇒ Object
# === Roebe.chdir (chdir tag, cd tag).
-
.check_mark ⇒ Object
# === Roebe.check_mark.
-
.check_whether_an_internet_connection_is_available ⇒ Object
# === Roebe.check_whether_an_internet_connection_is_available.
-
.checkmark_completed_thin? ⇒ Boolean
# === Roebe.checkmark_completed_thin? ========================================================================= #.
-
.cheering_megaphone ⇒ Object
# === Roebe.cheering_megaphone.
-
.cliner(use_this_character = :default, how_often_to_use_that_token = :default, use_this_colour = :default) ⇒ Object
# === Roebe.cliner.
-
.clock ⇒ Object
# === Roebe.clock =========================================================================== #.
-
.colourize_files_and_directories(i = ARGF) ⇒ Object
# === Roebe.colourize_files_and_directories ========================================================================= #.
-
.colourized_tokenitor1(n_times = 80) ⇒ Object
# === Roebe.colourized_tokenitor1 ========================================================================= #.
-
.colourized_tokenitor2(n_times = 80) ⇒ Object
# === Roebe.colourized_tokenitor2 ========================================================================= #.
-
.colourized_tokenitor3(n_times = 80) ⇒ Object
# === Roebe.colourized_tokenitor3 ========================================================================= #.
-
.colourized_tokenitor4(n_times = 80) ⇒ Object
# === Roebe.colourized_tokenitor4 ========================================================================= #.
-
.colourized_tokenitor5(n_times = 80) ⇒ Object
# === Roebe.colourized_tokenitor5 ========================================================================= #.
-
.compile_as_appdir(i = Dir.pwd) ⇒ Object
# === Roebe.compile_as_appdir (appconf, appdir).
-
.completed ⇒ Object
# === Roebe.completed.
-
.controller ⇒ Object
# === Roebe.controller.
-
.convert_global_env(i) ⇒ Object
# === Roebe.convert_global_env (global tag, ENV tag).
-
.copy_bluefish_configuration_files(copy_from = Dir['/home/x/programming/ruby/src/roebe/lib/roebe/www/bluefish/*'], copy_to = ENV['HOME'].to_s+'/.bluefish/') ⇒ Object
# === Roebe.copy_bluefish_configuration_files.
-
.copy_file(file, where_to = return_pwd, be_verbose = true) ⇒ Object
# === Roebe.copy_file.
-
.copy_setup_file_to_pwd ⇒ Object
# === Roebe.copy_setup_file_to_pwd.
-
.copy_setup_rb_file ⇒ Object
# === Roebe.copy_setup_rb_file.
-
.copy_the_linux_kernel ⇒ Object
# === Roebe.copy_the_linux_kernel.
-
.cp_to_here(copy_what = ARGV) ⇒ Object
# === Roebe.cp_to_here ========================================================================= #.
-
.cpp_header? ⇒ Boolean
-
.crazy_make_mode ⇒ Object
# === Roebe.crazy_make_mode.
-
.crc32(i) ⇒ Object
# === Roebe.crc32.
-
.create_desktop_file_for(this_program) ⇒ Object
# === Roebe.create_desktop_file_for.
-
.create_directories ⇒ Object
# === Roebe.create_directories (idirs tag, generate_my_directories tag).
-
.create_directory(i, be_verbose = false) ⇒ Object
# === Roebe.create_directory.
-
.create_directory_layout(use_this_as_the_directory_structure = :use_the_roebe_project_in_order_to_infer_the_directory_structure) ⇒ Object
# === Roebe.create_directory_layout.
-
.create_firefox_extension(i = ARGV) ⇒ Object
# === Roebe.create_firefox_extension =========================================================================== #.
-
.create_games_iso(i = '--default') ⇒ Object
# === Roebe.create_games_iso =========================================================================== #.
-
.create_iso(i = DEFAULT_DIRECTORY, run_already = :default, &block) ⇒ Object
# === Roebe.create_iso =========================================================================== #.
-
.create_lua_pc_file ⇒ Object
# === Roebe.create_lua_pc_file =========================================================================== #.
-
.create_mad_pkgconfig_file(store_where = '/usr/lib/pkgconfig/mad.pc', use_this_prefix = '/usr') ⇒ Object
# === Roebe.create_mad_pkgconfig_file.
-
.create_my_gems(i = ARGV) ⇒ Object
# === Roebe.create_my_gems =========================================================================== #.
-
.create_this_c_file(name_of_the_c_file = 'hello_world.c', file_content_as_string = '#include <stdio.h> int main() { /* This will print hello world, in C */ printf("Hello, World! \n"); return 0; } ') ⇒ Object
# === Roebe.create_this_c_file ========================================================================= #.
-
.create_wpa_supplicant_build_file(into = 'wpa_supplicant/.config') ⇒ Object
# === Roebe.create_wpa_supplicant_build_file ========================================================================= #.
-
.create_zip(i) ⇒ Object
# === Roebe.create_zip =========================================================================== #.
-
.current_stable_version_of_ruby(this_file = yaml_dir?+'current_ruby_versions.yml') ⇒ Object
# === Roebe.current_stable_version_of_ruby ========================================================================= #.
-
.custom_shebang? ⇒ Boolean
# === Roebe.custom_shebang? ========================================================================= #.
-
.cweb1 ⇒ Object
# === Roebe.cweb1 ========================================================================= #.
-
.cweb2 ⇒ Object
# === Roebe.cweb2 ========================================================================= #.
-
.cweb3 ⇒ Object
# === Roebe.cweb3 ========================================================================= #.
-
.dark_shade ⇒ Object
# === Roebe.dark_shade ========================================================================= #.
-
.date_sort_based_on_filename(array = [ %w( 22.05.2023-foobar1.mp4 22.03.2011-foobar2.mp4 )) ⇒ Object
# === Roebe.date_sort_based_on_filename.
-
.decompose_this_unicode_symbol(i) ⇒ Object
# === Roebe.decompose_this_unicode_symbol.
-
.default_comment_line ⇒ Object
-
.default_file_read(i) ⇒ Object
# === Roebe.default_file_read ========================================================================= #.
-
.determine_whether_colours_will_be_used_based_on_the_file_use_colours(use_this_file = FILE_USE_COLOURS) ⇒ Object
# === Roebe.determine_whether_colours_will_be_used_based_on_the_file_use_colours.
-
.dhcpcd(i = ARGV) ⇒ Object
# === Roebe.dhcpcd =========================================================================== #.
-
.directory_roebe_yaml_pdf? ⇒ Boolean
# === Roebe.directory_roebe_yaml_pdf? ========================================================================= #.
-
.disable(*i) ⇒ Object
# === disable (disable tag) ========================================================================= #.
-
.disable_colours ⇒ Object
# === Roebe.disable_colours ========================================================================= #.
-
.display_mbr ⇒ Object
# === Roebe.display_mbr ========================================================================= #.
-
.display_unicode_snowman ⇒ Object
# === Roebe.display_unicode_snowman.
-
.do_compile_this_java_file_statically(work_on_these_files) ⇒ Object
# === Roebe.do_compile_this_java_file_statically.
-
.do_use_unicode_environment ⇒ Object
# === Roebe.do_use_unicode_environment ========================================================================= #.
-
.does_this_program_exist?(i = nil) ⇒ Boolean
# === Roebe.does_this_program_exist?.
-
.does_this_terminal_support_unicode? ⇒ Boolean
# === Roebe.does_this_terminal_support_unicode? ========================================================================= #.
-
.dosbox_config(i = ARGV) ⇒ Object
# === Roebe.dosbox_config.
-
.double_low_quotation_mark ⇒ Object
# === Roebe.double_low_quotation_mark.
-
.downcase_all_entries_in_the_current_directory(entries = ARGV) ⇒ Object
# === Roebe.downcase_all_entries_in_the_current_directory.
-
.downcase_extension(i = ARGV) ⇒ Object
# === Roebe.downcase_extension =========================================================================== #.
-
.download_autogenerated_rcfiles ⇒ Object
# === Roebe.download_autogenerated_rcfiles.
-
.download_certdata ⇒ Object
# === Roebe.download_certdata.
-
.download_emojis(i = :default) ⇒ Object
# === Roebe.download_emojis.
-
.download_unicode_dataset(use_this_url = 'https://www.unicode.org/Public/UNIDATA/') ⇒ Object
# === Roebe.download_unicode_dataset.
-
.downwards_arrow ⇒ Object
# === Roebe.downwards_arrow.
-
.draw_line(i = 5) ⇒ Object
# === Roebe.draw_line ========================================================================= #.
-
.draw_triangle(i = 5) ⇒ Object
# === Roebe.draw_triangle ========================================================================= #.
-
.e(i = '', make_newline = true) ⇒ Object
# === Roebe.e ========================================================================= #.
-
.ecomment(i) ⇒ Object
-
.edir(i = '') ⇒ Object
# === Roebe.edir ========================================================================= #.
-
.editor? ⇒ Boolean
# === Roebe.editor? =========================================================================== #.
-
.efancy(i = '') ⇒ Object
# === Roebe.efancy ========================================================================= #.
-
.eighth_note ⇒ Object
# === Roebe.eighth_note.
-
.email(i = ARGV) ⇒ Object
# === Roebe.email =========================================================================== #.
-
.email? ⇒ Boolean
# === Roebe.email? ========================================================================= #.
-
.embeddable_interface ⇒ Object
# === Roebe.embeddable_interface =========================================================================== #.
-
.empty?(i = ARGF) ⇒ Boolean
# === Roebe.empty? =========================================================================== #.
-
.enable(*i) ⇒ Object
# === enable (enable tag) ========================================================================= #.
-
.enable_colours ⇒ Object
# === Roebe.enable_colours ========================================================================= #.
-
.encoding? ⇒ Boolean
# === Roebe.encoding? ========================================================================= #.
-
.encoding_iso ⇒ Object
# === Roebe.encoding_iso.
-
.encoding_utf8 ⇒ Object
# === Roebe.encoding_utf8.
-
.ensure_main_encoding(i, use_this_encoding = encoding? ) ⇒ Object
# === Roebe.ensure_main_encoding.
-
.enter_chroot(which_variant = :depot_chroot, chroot_target = '/Depot/Chroot/', use_this_path_for_env = '/usr/bin/env') ⇒ Object
# === Roebe.enter_chroot.
-
.env? ⇒ Boolean
# === Roebe.env? ========================================================================= #.
-
.eparse(i) ⇒ Object
# === Roebe.eparse ========================================================================= #.
-
.error_line? ⇒ Boolean
# === Roebe.error_line? ========================================================================= #.
-
.esystem(i) ⇒ Object
# === Roebe.esystem.
-
.expand_this_array(array) ⇒ Object
# === Roebe.expand_this_array ========================================================================= #.
-
.extract_gem_file(this_gem_file) ⇒ Object
-
.extract_this_file(i, to = Dir.pwd) ⇒ Object
-
.extract_what_to(what, to = return_pwd, optional_use_this_colour = nil) ⇒ Object
-
.face_with_tears_of_joy ⇒ Object
# === Roebe.face_with_tears_of_joy.
-
.face_without_mouth ⇒ Object
# === Roebe.face_without_mouth.
-
.fast_fibonacci(i) ⇒ Object
# === Roebe.fast_fibonacci.
-
.fast_fibonacci_implementation(i) ⇒ Object
# === Roebe.fast_fibonacci_implementation.
-
.feedback_base_dir ⇒ Object
# === Roebe.feedback_base_dir.
-
.file_binary_to_hexadecimal ⇒ Object
# === Roebe.file_binary_to_hexadecimal ========================================================================= #.
-
.file_binäre_einheiten ⇒ Object
# === Roebe.file_binäre_einheiten ========================================================================= #.
-
.file_contacts ⇒ Object
-
.file_directory_structure ⇒ Object
# === Roebe.file_directory_structure ========================================================================= #.
-
.file_does_not_exist(i) ⇒ Object
# === Roebe.file_does_not_exist.
-
.file_holidays ⇒ Object
# === Roebe.file_holidays ========================================================================= #.
-
.file_kernel ⇒ Object
# === Roebe.file_kernel.
-
.file_network ⇒ Object
# === Roebe.file_network ========================================================================= #.
-
.file_pdf1? ⇒ Boolean
# === Roebe.file_pdf1? ========================================================================= #.
-
.file_pdf2? ⇒ Boolean
# === Roebe.file_pdf2? ========================================================================= #.
-
.file_pdf3? ⇒ Boolean
# === Roebe.file_pdf3? ========================================================================= #.
-
.file_pdf4? ⇒ Boolean
# === Roebe.file_pdf4? ========================================================================= #.
-
.file_pdf5? ⇒ Boolean
# === Roebe.file_pdf5? ========================================================================= #.
-
.file_pdf6? ⇒ Boolean
# === Roebe.file_pdf6? ========================================================================= #.
-
.file_pdf7? ⇒ Boolean
# === Roebe.file_pdf7? ========================================================================= #.
-
.file_pdf8? ⇒ Boolean
# === Roebe.file_pdf8? ========================================================================= #.
-
.file_pdf9? ⇒ Boolean
# === Roebe.file_pdf9? ========================================================================= #.
-
.file_roeberia_settings ⇒ Object
# === Roebe.file_roeberia_settings ========================================================================= #.
-
.file_these_pdf_files_were_opened ⇒ Object
# === Roebe.file_these_pdf_files_were_opened ========================================================================= #.
-
.find_duplicate_entries_in_alias_file(i) ⇒ Object
# === Roebe.find_duplicate_entries_in_alias_file =========================================================================== #.
-
.find_expanded_alias(i = ARGV) ⇒ Object
# === Roebe.find_expanded_alias.
-
.firefox(this_remote_url = ARGV) ⇒ Object
# === Roebe.firefox =========================================================================== #.
-
.fix_iptables6 ⇒ Object
# === Roebe.fix_iptables6 ========================================================================= #.
-
.foto_searcher(i = ARGV) ⇒ Object
# === Roebe.foto_searcher =========================================================================== #.
-
.fragments(i = nil) ⇒ Object
# === Roebe.fragments =========================================================================== #.
-
.full_block ⇒ Object
# === Roebe.full_block ========================================================================= #.
-
.geas_it ⇒ Object
# === Roebe.geas_it ========================================================================= #.
-
.geas_it2 ⇒ Object
# === Roebe.geas_it2 ========================================================================= #.
-
.gem_install(use_this_command_to_install_the_gem = ::Roebe.gem_install_command, also_output_the_cmd = true) ⇒ Object
# === Roebe.gem_install.
-
.gem_install_command ⇒ Object
# === Roebe.gem_install_command ========================================================================= #.
-
.generate_aliases(i = :for_windows) ⇒ Object
# === Roebe.generate_aliases.
-
.generate_aliases_for_windows ⇒ Object
# === Roebe.generate_aliases_for_windows ========================================================================= #.
-
.generate_alsa_conf(i = ARGV) ⇒ Object
# === Roebe.generate_alsa_conf =========================================================================== #.
-
.generate_fluxbox_apps_file(&block) ⇒ Object
# === Roebe.generate_fluxbox_apps_file =========================================================================== #.
-
.generate_fluxbox_keys_and_apps_file ⇒ Object
# === Roebe.generate_fluxbox_keys_and_apps_file ========================================================================= #.
-
.generate_fluxbox_keys_file ⇒ Object
# === Roebe.generate_fluxbox_keys_file =========================================================================== #.
-
.generate_ginger_the_cat_html_page(from_this_page = 'http://localhost/programming/ruby/src/roebe/lib/roebe/www/ginger_der_bandit/ginger_der_bandit.cgi') ⇒ Object
# === Roebe.generate_ginger_the_cat_html_page.
-
.generate_html_table_for_individuelles_curriculum ⇒ Object
# === Roebe.generate_html_table_for_individuelles_curriculum.
-
.generate_konsole_css_file(save_into_this_file = 'konsole.css', use_this_colour = :skyblue) ⇒ Object
# === Roebe.generate_konsole_css_file.
-
.generate_lighttpd_configuration ⇒ Object
# === Roebe.generate_lighttpd_configuration.
-
.generate_liloconfig ⇒ Object
# === Roebe.generate_liloconfig ========================================================================= #.
-
.generate_locales ⇒ Object
# === RBT.generate_locales =========================================================================== #.
-
.generate_ls_colors ⇒ Object
# === Roebe.generate_ls_colors =========================================================================== #.
-
.generate_nano_config ⇒ Object
# === Roebe.generate_nano_config =========================================================================== #.
-
.generate_protocols ⇒ Object
# === Roebe.generate_protocols =========================================================================== #.
-
.generate_the_cfdg_files ⇒ Object
# === Roebe.generate_the_cfdg_files.
-
.generate_the_file_alsa_conf ⇒ Object
# === Roebe.generate_the_file_alsa_conf.
-
.generate_xauthority_file(i = ARGV) ⇒ Object
# === Roebe.generate_xauthority_file =========================================================================== #.
-
.generate_xorg_conf(i = ARGV) ⇒ Object
# === Roebe.generate_xorg_conf =========================================================================== #.
-
.get_file_content(i) ⇒ Object
# === Roebe.get_file_content.
-
.get_instance_variables(from_this_object = self) ⇒ Object
# === Roebe.get_instance_variables.
-
.git_colours ⇒ Object
# === Roebe.git_colours ========================================================================= #.
-
.gold(i = '', use_colours = @use_colours) ⇒ Object
# === Roebe.gold ========================================================================= #.
-
.google_for(i = ARGV) ⇒ Object
# === Roebe.google_for =========================================================================== #.
-
.google_url_cleaner(this_url) ⇒ Object
# === Roebe.google_url_cleaner.
-
.grab_colour ⇒ Object
# === Roebe.grab_colour.
-
.gzip_this_file(i = ARGV) ⇒ Object
# === Roebe.gzip_this_file ====================================================================== #.
-
.halloween(available_where = ENV['CARTOONS']) ⇒ Object
# === Roebe.halloween ========================================================================= #.
-
.has_german_umlaut?(i) ⇒ Boolean
# === Roebe.has_german_umlaut?.
-
.has_openssl_support? ⇒ Boolean
# === Roebe.has_openssl_support? =========================================================================== #.
-
.hash_birthday_notifications(i = ARGV) ⇒ Object
# === Roebe.hash_birthday_notifications =========================================================================== #.
-
.heart_spacer(n_times = 40) ⇒ Object
# === Roebe.heart_spacer.
-
.hello_world(pad_the_string = true) ⇒ Object
# === Roebe.hello_world ========================================================================= #.
-
.heredocs? ⇒ Boolean
# === Roebe.heredocs? (eof tag).
-
.hexdigest(i) ⇒ Object
# === Roebe.hexdigest.
-
.hh_mm_ss(i = ::Time.now) ⇒ Object
# === Roebe.hh_mm_ss.
-
.holiday ⇒ Object
# === Roebe.holiday =========================================================================== #.
-
.horizontal_double_bar ⇒ Object
# === Roebe.horizontal_double_bar ========================================================================= #.
-
.host_os? ⇒ Boolean
# === Roebe.host_os?.
-
.hot_beverage ⇒ Object
# === Roebe.hot_beverage ========================================================================= #.
-
.hypotenuse(a = 3, b = 5) ⇒ Object
# === Roebe.hypotenuse.
-
.identical(string1, string2) ⇒ Object
# === Roebe.identical =========================================================================== #.
-
.important_pdf_files? ⇒ Boolean
# === Roebe.important_pdf_files? ========================================================================= #.
-
.increase_volume(of_this_file = ARGV) ⇒ Object
# === Roebe.increase_volume ========================================================================= #.
-
.infinity ⇒ Object
# === Roebe.infinity ========================================================================= #.
-
.install_all_registered_fonts ⇒ Object
# === Roebe.install_all_registered_fonts.
-
.install_and_update_rcfiles ⇒ Object
# === Roebe.install_and_update_rcfiles.
-
.install_go(url = 'https://dl.google.com/go/go1.12.linux-amd64.tar.gz') ⇒ Object
# === Roebe.install_go.
-
.install_in_ruby_gem_manner(optional_copy_the_gem_to_this_location = nil) ⇒ Object
# === Roebe.install_in_ruby_gem_manner.
-
.install_in_ruby_setup_manner(use_this_binary = 'ruby') ⇒ Object
# === Roebe.install_in_ruby_setup_manner.
-
.install_linux_kernel_api_headers(target = '/home/x/SRC/linux/linux-5.1.7.tar.xz') ⇒ Object
-
.install_my_gems ⇒ Object
# === Roebe.install_my_gems.
-
.install_nss(use_this_version = '3.44') ⇒ Object
# === Roebe.install_nss.
-
.install_openssl_certifications(i = ARGV) ⇒ Object
# === Roebe.install_openssl_certifications =========================================================================== #.
-
.install_roebe_addons ⇒ Object
# === Roebe.install_roebe_addons.
-
.install_ruby_project(i) ⇒ Object
# === Roebe.install_ruby_project =========================================================================== #.
-
.install_rust ⇒ Object
# === Roebe.install_rust ========================================================================= #.
-
.install_the_cascadia_font(target = LINUX_DIRECTORY_FOR_TTF_FONTS, url = url_to_the_cascadia_font? ) ⇒ Object
# === Roebe.install_the_cascadia_font ========================================================================= #.
-
.install_the_hack_font(target = :home_directory, url = url_to_the_hack_font?(:zip_file)) ⇒ Object
# === Roebe.install_the_hack_font ========================================================================= #.
-
.install_the_jet_brains_mono_font(target = LINUX_DIRECTORY_FOR_TTF_FONTS, url = url_to_the_jet_brains_font?(:zip_file)) ⇒ Object
# === Roebe.install_the_jet_brains_mono_font ========================================================================= #.
-
.install_this_font(i = :default, font_directory = LINUX_DIRECTORY_FOR_TTF_FONTS) ⇒ Object
# === Roebe.install_this_font.
-
.install_this_locale(i) ⇒ Object
# === Roebe.install_this_locale ========================================================================= #.
-
.install_usb_ids(use_this_remote_url = 'http://www.linux-usb.org/usb.ids') ⇒ Object
# === Roebe.install_usb_ids.
-
.install_vivaldi ⇒ Object
# === Roebe.install_vivaldi.
-
.instance_variable_get(i) ⇒ Object
# === Roebe.instance_variable_get.
-
.interactive_file_creator ⇒ Object
# === Roebe.interactive_file_creator =========================================================================== #.
-
.invoke_xorg_buffer ⇒ Object
# === self.invoke_xorg_buffer.
-
.is_a_html_colour?(i) ⇒ Boolean
# === Roebe.is_a_html_colour? ========================================================================= #.
-
.is_audio_file?(i) ⇒ Boolean
# === Roebe.is_audio_file?.
-
.is_image_file?(i) ⇒ Boolean
# === Roebe.is_image_file?.
-
.is_not_on_roebe ⇒ Object
# === Roebe.is_not_on_roebe ========================================================================= #.
-
.is_on_roebe ⇒ Object
# === Roebe.is_on_roebe.
-
.is_on_roebe? ⇒ Boolean
# === Roebe.is_on_roebe?.
-
.is_on_windows? ⇒ Boolean
# === Roebe.is_on_windows? ========================================================================= #.
-
.is_prime?(i) ⇒ Boolean
# === Roebe.is_prime? ========================================================================= #.
-
.is_this_port_open?(port = 4568, outfile = '/dev/null') ⇒ Boolean
# === Roebe.is_this_port_open?.
-
.is_video_file?(i) ⇒ Boolean
# === Roebe.is_video_file?.
-
.java_header(output_result = true) ⇒ Object
-
.jp2a(use_this_image = random_image) ⇒ Object
# === Roebe.jp2a.
-
.kde_konsole_command(i = 'ls') ⇒ Object
# === Roebe.kde_konsole_command.
-
.keywords? ⇒ Boolean
# === Roebe.keywords?.
-
.kill_dhcpcd(i = ARGV) ⇒ Object
# === Roebe.kill_dhcpcd =========================================================================== #.
-
.kill_firefox ⇒ Object
# === Roebe.kill_firefox.
-
.kill_palemoon ⇒ Object
# === Roebe.kill_palemoon.
-
.left_five_eights_block ⇒ Object
# === Roebe.left_five_eights_block ========================================================================= #.
-
.left_half_block ⇒ Object
# === Roebe.left_half_block ========================================================================= #.
-
.left_one_eight_block ⇒ Object
# === Roebe.left_one_eight_block ========================================================================= #.
-
.left_one_quarter_block ⇒ Object
# === Roebe.left_one_quarter_block ========================================================================= #.
-
.left_pointing_index ⇒ Object
# === Roebe.left_pointing_index.
-
.left_seven_eights_block ⇒ Object
# === Roebe.left_seven_eights_block ========================================================================= #.
-
.left_three_eights_block ⇒ Object
# === Roebe.left_three_eights_block ========================================================================= #.
-
.left_three_quarters_block ⇒ Object
# === Roebe.left_three_quarters_block ========================================================================= #.
-
.leftwards_arrow ⇒ Object
# === Roebe.leftwards_arrow.
-
.libui1 ⇒ Object
# === Roebe.libui1 =========================================================================== #.
-
.libui2 ⇒ Object
# === Roebe.libui2 =========================================================================== #.
-
.libui3 ⇒ Object
# === Roebe.libui3 =========================================================================== #.
-
.light_shade ⇒ Object
# === Roebe.light_shade ========================================================================= #.
-
.link?(optional_id = ARGV) ⇒ Boolean
# === Roebe.link?.
-
.load_custom_ruby_files(array = ARRAY_INSTALL_THESE_GEM_PROJECTS) ⇒ Object
# === Roebe.load_custom_ruby_files ========================================================================= #.
-
.load_wirble ⇒ Object
# === Roebe.load_wirble.
-
.load_yaml(input_file) ⇒ Object
# === Roebe.load_yaml.
-
.local_fotos_js ⇒ Object
# === Roebe.local_fotos_js =========================================================================== #.
-
.log10(i) ⇒ Object
# === Roebe.log10 =========================================================================== #.
-
.log_directory? ⇒ Boolean
# === Roebe.log_directory?.
-
.low_line ⇒ Object
# === Roebe.low_line ========================================================================= #.
-
.lower_alpha ⇒ Object
# === Roebe.lower_alpha.
-
.lower_five ⇒ Object
# === Roebe.lower_five.
-
.lower_five_eighths_block ⇒ Object
# === Roebe.lower_five_eighths_block ========================================================================= #.
-
.lower_half_block ⇒ Object
# === Roebe.lower_half_block ========================================================================= #.
-
.lower_one ⇒ Object
# === Roebe.lower_one ========================================================================= #.
-
.lower_one_eighth_block ⇒ Object
# === Roebe.lower_one_eighth_block ========================================================================= #.
-
.lower_one_quarter_block ⇒ Object
# === Roebe.lower_one_quarter_block ========================================================================= #.
-
.lower_seven_eighths_block ⇒ Object
# === Roebe.lower_seven_eighths_block ========================================================================= #.
-
.lower_six ⇒ Object
# === Roebe.lower_six.
-
.lower_three_eighths_block ⇒ Object
# === Roebe.lower_three_eighths_block ========================================================================= #.
-
.lower_three_quarters_block ⇒ Object
# === Roebe.lower_three_quarters_block ========================================================================= #.
-
.make_gem ⇒ Object
# === Roebe.make_gem ========================================================================= #.
-
.make_nodes_and_mount_dev_entries(mount_at_this_target) ⇒ Object
# === Roebe.make_nodes_and_mount_dev_entries.
-
.mama? ⇒ Boolean
# === Roebe.mama? ========================================================================= #.
-
.map_input_to_unicode_symbol(i = :snowman) ⇒ Object
-
.median(i) ⇒ Object
-
.medium_black_circle ⇒ Object
# === Roebe.medium_black_circle ========================================================================= #.
-
.medium_shade ⇒ Object
# === Roebe.medium_shade ========================================================================= #.
-
.medium_small_white_circle ⇒ Object
# === Roebe.medium_small_white_circle.
-
.medium_white_circle ⇒ Object
# === Roebe.medium_white_circle ========================================================================= #.
-
.mediumorchid(i = '') ⇒ Object
# === Roebe.mediumorchid ========================================================================= #.
-
.mediumpurple(i = '') ⇒ Object
# === Roebe.mediumpurple ========================================================================= #.
-
.menu(i) ⇒ Object
-
.middle_dot ⇒ Object
# === Roebe.middle_dot.
-
.misc(start_position = 11, end_position = 45, this_word = 'plasma') ⇒ Object
# === Roebe.misc.
-
.mittelwert(i) ⇒ Object
# === Roebe.mittelwert =========================================================================== #.
-
.mixed_case(i) ⇒ Object
# === Roebe.mixed_case.
-
.money_bag ⇒ Object
# === Roebe.money_bag.
-
.month_to_number(i = 'Sep') ⇒ Object
# === Roebe.month_to_number.
-
.mount_procs(use_this_directory_for_the_chroot = '/Depot/Chroot/') ⇒ Object
# === Roebe.mount_procs.
-
.move_content_of_this_directory_to_that_directory_unless_target_already_exists(a, b) ⇒ Object
# === Roebe.move_content_of_this_directory_to_that_directory_unless_target_already_exists =========================================================================== #.
-
.move_to_torrent_directory(i = :all_torrent_files_in_the_current_directory, target_directory = '/Depot/Torrents/', be_verbose = :be_verbose) ⇒ Object
# === Roebe.move_to_torrent_directory.
-
.music_flat_sign ⇒ Object
# === Roebe.music_flat_sign.
-
.music_natural_sign ⇒ Object
# === Roebe.music_natural_sign.
-
.music_sharp_sign ⇒ Object
# === Roebe.music_sharp_sign.
-
.mv(old, new, be_verbose = false) ⇒ Object
# === Roebe.mv.
-
.n_characters_in_this_file(this_file, ignore_newlines = true) ⇒ Object
# === Roebe.n_characters_in_this_file.
-
.n_files(i = ARGV) ⇒ Object
# === Roebe.n_files =========================================================================== #.
-
.n_files_are_available_in_total ⇒ Object
# === Roebe.n_files_are_available_in_total.
-
.nano_addons ⇒ Object
# === Roebe.nano_addons ========================================================================= #.
-
.new_konsole_tab ⇒ Object
# === Roebe.new_konsole_tab.
-
.newstud1 ⇒ Object
# === Roebe.newstud1.
-
.newstud10 ⇒ Object
# === Roebe.newstud10.
-
.newstud11 ⇒ Object
# === Roebe.newstud11.
-
.newstud12 ⇒ Object
# === Roebe.newstud12.
-
.newstud13 ⇒ Object
# === Roebe.newstud13.
-
.newstud14 ⇒ Object
# === Roebe.newstud14.
-
.newstud15 ⇒ Object
# === Roebe.newstud15.
-
.newstud16 ⇒ Object
# === Roebe.newstud16.
-
.newstud17 ⇒ Object
# === Roebe.newstud17.
-
.newstud18 ⇒ Object
# === Roebe.newstud18.
-
.newstud19 ⇒ Object
# === Roebe.newstud19.
-
.newstud2 ⇒ Object
# === Roebe.newstud2.
-
.newstud20 ⇒ Object
# === Roebe.newstud20.
-
.newstud21 ⇒ Object
# === Roebe.newstud21.
-
.newstud22 ⇒ Object
# === Roebe.newstud22.
-
.newstud23 ⇒ Object
# === Roebe.newstud23.
-
.newstud24 ⇒ Object
# === Roebe.newstud24.
-
.newstud25 ⇒ Object
# === Roebe.newstud25.
-
.newstud3 ⇒ Object
# === Roebe.newstud3.
-
.newstud4 ⇒ Object
# === Roebe.newstud4.
-
.newstud5 ⇒ Object
# === Roebe.newstud5.
-
.newstud6 ⇒ Object
# === Roebe.newstud6.
-
.newstud7 ⇒ Object
# === Roebe.newstud7.
-
.newstud8 ⇒ Object
# === Roebe.newstud8.
-
.newstud9 ⇒ Object
# === Roebe.newstud9.
-
.no_caps ⇒ Object
# === Roebe.no_caps.
-
.non_ascii ⇒ Object
# === Roebe.non_ascii.
-
.not_equal_to ⇒ Object
# === Roebe.not_equal_to.
-
.ntrad(i = ARGV) ⇒ Object
# === Roebe.ntrad (ntrad tag).
-
.number_to_english(i = 1) ⇒ Object
# === Roebe.number_to_english =========================================================================== #.
-
.ocra_build(a = ARGV, b = :default) ⇒ Object
# === Roebe.ocra_build =========================================================================== #.
-
.open(i = ARGV) ⇒ Object
# === Roebe.open ========================================================================= #.
-
.open_in_browser(i = ARGV) ⇒ Object
# === Roebe.open_in_browser.
-
.open_in_editor(i = ARGV) ⇒ Object
# === Roebe.open_in_editor (open tag).
-
.open_in_editor_and_browser(this = ARGV) ⇒ Object
# === Roebe.open_in_editor_and_browser.
-
.open_ports? ⇒ Boolean
# === Roebe.open_ports?.
-
.opnn(use_this_namespace = { namespace: NAMESPACE }) ⇒ Object
# === Roebe.opnn ========================================================================= #.
-
.orange(i = '') ⇒ Object
# === Roebe.orange ========================================================================= #.
-
.orchid(i = '', use_colours = @use_colours) ⇒ Object
# === Roebe.orchid ========================================================================= #.
-
.padding? ⇒ Boolean
# === Roebe.padding?.
-
.palemoon(this_remote_url = ARGV) ⇒ Object
# === Roebe.palemoon =========================================================================== #.
-
.parse_commandline(i = ARGV) ⇒ Object
# === Roebe.parse_commandline ========================================================================= #.
-
.password(i = ARGV) ⇒ Object
# === Roebe.password.
-
.path? ⇒ Boolean
# === Roebe.path?.
-
.permanently_disable_colours ⇒ Object
# === Roebe.permanently_disable_colours ========================================================================= #.
-
.permanently_set_project_base_directory_to(i) ⇒ Object
# === Roebe.permanently_set_project_base_directory_to.
-
.permanently_use_palemoon(where = DEFAULT_ASSUMED_PATH_TO_THE_PALEMOON_BINARY) ⇒ Object
# === Roebe.permanently_use_palemoon.
-
.ping_widget ⇒ Object
-
.platform ⇒ Object
-
.play_columbo_files(use_this_base_directory = '/home/x/video/', play_n_files = nil) ⇒ Object
# === Roebe.play_columbo_files.
-
.play_random_married_with_children_video ⇒ Object
# === Roebe.play_random_married_with_children_video ========================================================================= #.
-
.play_random_simpsons_movie(i = ARGV) ⇒ Object
# === Roebe.play_random_simpsons_movie ========================================================================= #.
-
.play_random_songs(from_this_directory = '/home/x/songs/') ⇒ Object
# === Roebe.play_random_songs.
-
.populate_important_pdf_files(use_this_directory = DIRECTORY_ROEBE_YAML_PDF) ⇒ Object
# === Roebe.populate_important_pdf_files.
-
.populate_this_directory_with_rcfiles(i) ⇒ Object
# === Roebe.populate_this_directory_with_rcfiles ========================================================================= #.
-
.pp_output(i) ⇒ Object
# === Roebe.pp_output.
-
.prepare_geas ⇒ Object
# === Roebe.prepare_geas.
-
.prettify_url(i = :installation, shall_we_replace_the_localhost = :default) ⇒ Object
# === Roebe.prettify_url.
-
.print_this_unicode_input(i = ARGV) ⇒ Object
-
.pristine_gems(i = ARGV) ⇒ Object
# === Roebe.pristine_gems =========================================================================== #.
-
.programs_directory? ⇒ Boolean
# === Roebe.programs_directory?.
-
.project_base_dir? ⇒ Boolean
# === Roebe.project_base_dir? ========================================================================= #.
-
.project_yaml_dir?(i = @project_base_directory) ⇒ Boolean
# === Roebe.project_yaml_dir?.
-
.publish_gem(i = ARGV) ⇒ Object
# === Roebe.publish_gem =========================================================================== #.
-
.purge_both(i = ARGV) ⇒ Object
# === Roebe.purge_both.
-
.purgebin(i) ⇒ Object
# === Roebe.purgebin ========================================================================= #.
-
.purgelib(i) ⇒ Object
# === Roebe.purgelib ========================================================================= #.
-
.purple(i = '', use_colours = @use_colours) ⇒ Object
# === Roebe.purple ========================================================================= #.
-
.puts_this(i) ⇒ Object
# === Roebe.puts_this ========================================================================= #.
-
.pythagoras(a, b) ⇒ Object
# === Roebe.pythagoras.
-
.python_multiline ⇒ Object
# === Roebe.python_multiline ========================================================================= #.
-
.quadrant_lower_left ⇒ Object
# === Roebe.quadrant_lower_left ========================================================================= #.
-
.quadrant_lower_right ⇒ Object
# === Roebe.quadrant_lower_right ========================================================================= #.
-
.quadrant_upper_left ⇒ Object
# === Roebe.quadrant_upper_left ========================================================================= #.
-
.quadrant_upper_left_and_lower_left_and_lower_right ⇒ Object
# === Roebe.quadrant_upper_left_and_lower_left_and_lower_right ========================================================================= #.
-
.quadrant_upper_left_and_lower_right ⇒ Object
# === Roebe.quadrant_upper_left_and_lower_right ========================================================================= #.
-
.quadrant_upper_left_and_upper_right_and_lower_left ⇒ Object
# === Roebe.quadrant_upper_left_and_upper_right_and_lower_left ========================================================================= #.
-
.quadrant_upper_left_and_upper_right_and_lower_right ⇒ Object
# === Roebe.quadrant_upper_left_and_upper_right_and_lower_right ========================================================================= #.
-
.quadrant_upper_right ⇒ Object
# === Roebe.quadrant_upper_right ========================================================================= #.
-
.quadrant_upper_right_and_lower_left ⇒ Object
# === Roebe.quadrant_upper_right_and_lower_left ========================================================================= #.
-
.quadrant_upper_right_and_lower_left_and_lower_right ⇒ Object
# === Roebe.quadrant_upper_right_and_lower_left_and_lower_right ========================================================================= #.
-
.quarter_note ⇒ Object
# === Roebe.quarter_note.
-
.query_length_of(i = main_file? ) ⇒ Object
# === Roebe.query_length_of ========================================================================= #.
-
.random_background(i = ARGV) ⇒ Object
# === Roebe.random_background =========================================================================== #.
-
.random_background_via_n_delay(i = ARGV, delay = 1) ⇒ Object
# === Roebe.random_background_via_n_delay =========================================================================== #.
-
.random_gtk ⇒ Object
# === Roebe.random_gtk ========================================================================= #.
-
.random_open(i = ARGV) ⇒ Object
# === Roebe.random_open =========================================================================== #.
-
.rds(i = '') ⇒ Object
# === RBT.rds.
-
.readlines(i) ⇒ Object
# === Roebe.readlines.
-
.register_sigint(optional_show_this_message = '', &block) ⇒ Object
# === Roebe.register_sigint =========================================================================== #.
-
.registered_unicode_symbols ⇒ Object
# === Roebe.registered_unicode_symbols.
-
.remove_directory(i = ARGV, delete_only_empty_directories = false) ⇒ Object
# === Roebe.remove_directory.
-
.remove_escape_code(from_this_string) ⇒ Object
# === Roebe.remove_escape_code.
-
.remove_extension(i) ⇒ Object
# === Roebe.remove_extension =========================================================================== #.
-
.remove_file(this_file, be_verbose = true) ⇒ Object
# === Roebe.remove_file (delete tag, rm tag).
-
.remove_html(i = ARGV) ⇒ Object
# === Roebe.remove_html.
-
.remove_line(i = ARGV) ⇒ Object
# === Roebe.remove_line =========================================================================== #.
-
.remove_old_gem ⇒ Object
# === Roebe.remove_old_gem ========================================================================= #.
-
.remove_user(i) ⇒ Object
# === Roebe.remove_user.
-
.rename_ascii_files(do_rename_the_files = true, start_position = 24, end_position = 56) ⇒ Object
# === Roebe.rename_ascii_files.
-
.rename_file(old_filename, new_filename, be_verbose = true) ⇒ Object
# === Roebe.rename_file (rename tag).
-
.rename_konsole(i = 'Testing (1) (2) (3)', be_verbose = false) ⇒ Object
# === Roebe.rename_konsole.
-
.repetition_pattern(n_times = 3, this_character = '#') ⇒ Object
# === Roebe.repetition_pattern ========================================================================= #.
-
.replace_leading_file_name(i) ⇒ Object
# === Roebe.replace_leading_file_name.
-
.replace_localhost_with_data(i) ⇒ Object
# === Roebe.replace_localhost_with_data This method will replace the leading “localhost” string with “/home/x/data/”.
-
.replace_space_with_underscore(i = ARGV, &block) ⇒ Object
# === Roebe.replace_space_with_underscore =========================================================================== #.
-
.report_classes ⇒ Object
# === Roebe.report_classes.
-
.report_pwd ⇒ Object
# === Roebe.report_pwd ========================================================================= #.
-
.report_ruby_version ⇒ Object
# === Roebe.report_ruby_version ========================================================================= #.
-
.report_the_gtk_versions_available ⇒ Object
# === Roebe.report_the_gtk_versions_available ========================================================================= #.
-
.report_the_location_of_the_default_browser ⇒ Object
# === Roebe.report_the_location_of_the_default_browser.
-
.report_version ⇒ Object
# === Roebe.report_version ========================================================================= #.
-
.require_all_new_stud_ruby_files ⇒ Object
# === Roebe.require_all_new_stud_ruby_files ========================================================================= #.
-
.require_all_standalone_classes ⇒ Object
# === Roebe.require_all_standalone_classes ========================================================================= #.
-
.require_all_standalone_module_methods ⇒ Object
# === Roebe.require_all_standalone_module_methods ========================================================================= #.
-
.require_all_standalone_modules ⇒ Object
# === Roebe.require_all_standalone_modules.
-
.require_then_include_this_gem(i = :cyberweb) ⇒ Object
# === Roebe.require_then_include_this_gem ========================================================================= #.
-
.require_this_roebe_class(i) ⇒ Object
# === Roebe.require_this_roebe_class ========================================================================= #.
-
.require_unicode ⇒ Object
# === Roebe.require_unicode ========================================================================= #.
-
.restore_kde ⇒ Object
# === Roebe.restore_kde =========================================================================== #.
-
.restore_master_boot_record(save_in_this_file = 'backup_mbr', use_this_as_input_device = '/dev/sda') ⇒ Object
# === Roebe.restore_master_boot_record ========================================================================= #.
-
.return_all_remote_entries_from_this_url(i = ARGV) ⇒ Object
# === Roebe.return_all_remote_entries_from_this_url.
-
.return_all_unicode_symbols(max_number = 20_000) ⇒ Object
# === Roebe.return_all_unicode_symbols.
-
.return_audio_logo(new_title = ARGV) ⇒ Object
# === Roebe.return_audio_logo.
-
.return_cat_face_with_wry_smile ⇒ Object
# === Roebe.return_cat_face_with_wry_smile ========================================================================= #.
-
.return_coloured_unicode_snowman ⇒ Object
# === Roebe.return_coloured_unicode_snowman ========================================================================= #.
-
.return_date ⇒ Object
# === Roebe.return_date ========================================================================= #.
-
.return_english_weekday(i) ⇒ Object
# === Roebe.return_english_weekday.
-
.return_even_numbered_lines_from_this_file(i) ⇒ Object
# === Roebe.return_even_numbered_lines_from_this_file.
-
.return_german_weekday(i = '08.05.2022') ⇒ Object
# === Roebe.return_german_weekday.
-
.return_hostname ⇒ Object
# === Roebe.return_hostname.
-
.return_important_notification(new_title = ARGV, use_this_as_logo = 'emblem-important') ⇒ Object
# === Roebe.return_important_notification.
-
.return_n_aliases(i = ARGV, &block) ⇒ Object
# === Roebe.return_n_aliases.
-
.return_natürliche_zahl ⇒ Object
# === Roebe.return_natürliche_zahl.
-
.return_pid_of_kde_konsole ⇒ Object
# === Roebe.return_pid_of_kde_konsole.
-
.return_pile_of_poo ⇒ Object
# === Roebe.return_pile_of_poo.
-
.return_pwd ⇒ Object
# === Roebe.return_pwd ========================================================================= #.
-
.return_random_alphabet_character ⇒ Object
# === Roebe.return_random_alphabet_character.
-
.return_real_filename(i) ⇒ Object
# === Roebe.return_real_filename.
-
.return_ruby_header ⇒ Object
-
.return_ruby_use_config_file ⇒ Object
# === Roebe.return_ruby_use_config_file =========================================================================== #.
-
.return_ten_aliases? ⇒ Boolean
# === Roebe.return_ten_aliases? =========================================================================== #.
-
.return_the_date_of_this_doc_file(i) ⇒ Object
# === Roebe.return_the_date_of_this_doc_file.
-
.return_twenty_aliases? ⇒ Boolean
# === Roebe.return_twenty_aliases? =========================================================================== #.
-
.return_unicode_ascending_node ⇒ Object
# === Roebe.return_unicode_ascending_node.
-
.return_unicode_ballot_box ⇒ Object
# === Roebe.return_unicode_ballot_box ========================================================================= #.
-
.return_unicode_ballot_box_with_check ⇒ Object
# === Roebe.return_unicode_ballot_box_with_check ========================================================================= #.
-
.return_unicode_ballot_box_with_x ⇒ Object
# === Roebe.return_unicode_ballot_box_with_x ========================================================================= #.
-
.return_unicode_black_star ⇒ Object
# === Roebe.return_unicode_black_star.
-
.return_unicode_black_sun_with_rays ⇒ Object
# === Roebe.return_unicode_black_sun_with_rays.
-
.return_unicode_black_telephone ⇒ Object
# === Roebe.return_unicode_black_telephone.
-
.return_unicode_cat ⇒ Object
# === Roebe.return_unicode_cat.
-
.return_unicode_cat_face ⇒ Object
# === Roebe.return_unicode_cat_face.
-
.return_unicode_cloud ⇒ Object
# === Roebe.return_unicode_cloud.
-
.return_unicode_comet ⇒ Object
# === Roebe.return_unicode_comet.
-
.return_unicode_conjunction ⇒ Object
# === Roebe.return_unicode_conjunction.
-
.return_unicode_descending_node ⇒ Object
# === Roebe.return_unicode_descending_node.
-
.return_unicode_dog ⇒ Object
# === Roebe.return_unicode_dog ========================================================================= #.
-
.return_unicode_dog_face ⇒ Object
# === Roebe.return_unicode_dog_face ========================================================================= #.
-
.return_unicode_heart ⇒ Object
# === Roebe.return_unicode_heart ========================================================================= #.
-
.return_unicode_high_voltage_sign ⇒ Object
# === Roebe.return_unicode_high_voltage_sign.
-
.return_unicode_keyboard ⇒ Object
# === Roebe.return_unicode_keyboard ========================================================================= #.
-
.return_unicode_king ⇒ Object
# === Roebe.return_unicode_king ========================================================================= #.
-
.return_unicode_lightning ⇒ Object
# === Roebe.return_unicode_lightning.
-
.return_unicode_opposition ⇒ Object
# === Roebe.return_unicode_opposition.
-
.return_unicode_phone ⇒ Object
# === Roebe.return_unicode_phone ========================================================================= #.
-
.return_unicode_shamrock ⇒ Object
# === Roebe.return_unicode_shamrock ========================================================================= #.
-
.return_unicode_snowman ⇒ Object
# === Roebe.return_unicode_snowman.
-
.return_unicode_sun ⇒ Object
# === Roebe.return_unicode_sun.
-
.return_unicode_television ⇒ Object
# === Roebe.return_unicode_television.
-
.return_unicode_thunderstorm ⇒ Object
# === Roebe.return_unicode_thunderstorm.
-
.return_unicode_umbrella ⇒ Object
# === Roebe.return_unicode_cloud.
-
.return_unicode_white_star ⇒ Object
# === Roebe.return_unicode_white_star.
-
.return_unicode_white_telephone ⇒ Object
# === Roebe.return_unicode_white_telephone.
-
.return_unicode_yin_yang ⇒ Object
# === Roebe.return_unicode_yin_yang.
-
.return_url_to_the_blackchancery_font ⇒ Object
# === Roebe.return_url_to_the_blackchancery_font ========================================================================= #.
-
.return_url_to_the_envy_font ⇒ Object
# === Roebe.return_url_to_the_envy_font ========================================================================= #.
-
.rev(use_colours = @use_colours) ⇒ Object
# === Roebe.rev ========================================================================= #.
-
.reversed_rotated_floral_heart_bullet ⇒ Object
# === Roebe.reversed_rotated_floral_heart_bullet ========================================================================= #.
-
.right_half_block ⇒ Object
# === Roebe.right_half_block ========================================================================= #.
-
.right_one_eight_block ⇒ Object
# === Roebe.right_one_eight_block ========================================================================= #.
-
.right_pointing_index ⇒ Object
# === Roebe.right_pointing_index.
-
.rightwards_arrow ⇒ Object
# === Roebe.rightwards_arrow.
-
.rightwards_harpoon_over_leftwards_harpoon ⇒ Object
Roebe.rightwards_harpoon_over_leftwards_harpoon.
-
.rinstall2(be_verbose = true) ⇒ Object
# === Roebe.rinstall2 (r2 tag).
-
.royalblue(i = '') ⇒ Object
# === Roebe.royalblue ========================================================================= #.
-
.ruby_header(output_result = true) ⇒ Object
-
.ruby_main(i = ARGV) ⇒ Object
# === Roebe.ruby_main =========================================================================== #.
-
.ruby_main_string(i = ARGV) ⇒ Object
# === Roebe.ruby_main_string.
-
.ruby_ssl? ⇒ Boolean
# === Roebe.ruby_ssl? ========================================================================= #.
-
.ruby_use_config_file(output_result = true) ⇒ Object
# === Roebe.ruby_use_config_file =========================================================================== #.
-
.rubycalc(i = ARGV) ⇒ Object
# === Roebe.rubycalc ========================================================================= #.
-
.rubyzip(target_directory = (Dir.pwd+'/').squeeze('/')) ⇒ Object
# === Roebe.rubyzip.
-
.run(i = ARGV) ⇒ Object
# === Roebe.run =========================================================================== #.
-
.run_rdate(optional_arguments = nil) ⇒ Object
# === Roebe.run_rdate =========================================================================== #.
-
.run_shell(i = ARGV, &block) ⇒ Object
# === Roebe.run_shell.
-
.run_this_file_in_the_background(this_file = ARGV) ⇒ Object
# === Roebe.run_this_file_in_the_background ========================================================================= #.
-
.run_this_sinatra_app(i = 1) ⇒ Object
# === Roebe.run_this_sinatra_app.
-
.run_traverse_install ⇒ Object
# === Roebe.run_traverse_install ========================================================================= #.
-
.rvid(i) ⇒ Object
# === Roebe.rvid.
-
.rxinitrc(i = ARGV) ⇒ Object
# === Roebe.rxinitrc =========================================================================== #.
-
.saltire ⇒ Object
# === Roebe.saltire ========================================================================= #.
-
.sandybrown(i = '') ⇒ Object
# === Roebe.sandybrown ========================================================================= #.
-
.scan_for_wlan_spots(use_this_device = 'wlp2s0') ⇒ Object
# === Roebe.scan_for_wlan_spots.
-
.sdir(i = '', use_colours = @use_colours) ⇒ Object
# === Roebe.sdir ========================================================================= #.
-
.seagreen(i = '', use_colours = @use_colours) ⇒ Object
# === Roebe.seagreen ========================================================================= #.
-
.second_most_stable_version_of_ruby(this_file = yaml_dir?+'current_ruby_versions.yml') ⇒ Object
# === Roebe.second_most_stable_version_of_ruby.
-
.serve_local_page(this_page, run_already = true) ⇒ Object
# === ServeLocalPage.new ========================================================================= #.
-
.set_alias(number, to = '') ⇒ Object
# === Roebe.set_alias.
-
.set_alias_1(to = '') ⇒ Object
# === Roebe.set_alias_1 =========================================================================== #.
-
.set_alias_10(to = '') ⇒ Object
# === Roebe.set_alias_10 =========================================================================== #.
-
.set_alias_11(to = '') ⇒ Object
# === Roebe.set_alias_11 =========================================================================== #.
-
.set_alias_12(to = '') ⇒ Object
# === Roebe.set_alias_12 =========================================================================== #.
-
.set_alias_13(to = '') ⇒ Object
# === Roebe.set_alias_13 =========================================================================== #.
-
.set_alias_14(to = '') ⇒ Object
# === Roebe.set_alias_14 =========================================================================== #.
-
.set_alias_15(to = '') ⇒ Object
# === Roebe.set_alias_15 =========================================================================== #.
-
.set_alias_16(to = '') ⇒ Object
# === Roebe.set_alias_16 =========================================================================== #.
-
.set_alias_17(to = '') ⇒ Object
# === Roebe.set_alias_17 =========================================================================== #.
-
.set_alias_18(to = '') ⇒ Object
# === Roebe.set_alias_18 =========================================================================== #.
-
.set_alias_19(to = '') ⇒ Object
# === Roebe.set_alias_19 =========================================================================== #.
-
.set_alias_2(to = '') ⇒ Object
# === Roebe.set_alias_2 =========================================================================== #.
-
.set_alias_20(to = '') ⇒ Object
# === Roebe.set_alias_20 =========================================================================== #.
-
.set_alias_21(to = '') ⇒ Object
# === Roebe.set_alias_21 =========================================================================== #.
-
.set_alias_22(to = '') ⇒ Object
# === Roebe.set_alias_22 =========================================================================== #.
-
.set_alias_23(to = '') ⇒ Object
# === Roebe.set_alias_23 =========================================================================== #.
-
.set_alias_24(to = '') ⇒ Object
# === Roebe.set_alias_24 =========================================================================== #.
-
.set_alias_25(to = '') ⇒ Object
# === Roebe.set_alias_25 =========================================================================== #.
-
.set_alias_3(to = '') ⇒ Object
# === Roebe.set_alias_3 =========================================================================== #.
-
.set_alias_4(to = '') ⇒ Object
# === Roebe.set_alias_4 =========================================================================== #.
-
.set_alias_5(to = '') ⇒ Object
# === Roebe.set_alias_5 =========================================================================== #.
-
.set_alias_6(to = '') ⇒ Object
# === Roebe.set_alias_6 =========================================================================== #.
-
.set_alias_7(to = '') ⇒ Object
# === Roebe.set_alias_7 =========================================================================== #.
-
.set_alias_8(to = '') ⇒ Object
# === Roebe.set_alias_8 =========================================================================== #.
-
.set_alias_9(to = '') ⇒ Object
# === Roebe.set_alias_9 =========================================================================== #.
-
.set_background(optional_argument = nil) ⇒ Object
# === Roebe.set_background (background tag).
-
.set_pdf1(i) ⇒ Object
# === Roebe.set_pdf1.
-
.set_pdf2(i) ⇒ Object
# === Roebe.set_pdf2 =========================================================================== #.
-
.set_pdf3(i) ⇒ Object
# === Roebe.set_pdf3 =========================================================================== #.
-
.set_pdf4(i) ⇒ Object
# === Roebe.set_pdf4 =========================================================================== #.
-
.set_pdf5(i) ⇒ Object
# === Roebe.set_pdf5 =========================================================================== #.
-
.set_pdf6(i) ⇒ Object
# === Roebe.set_pdf6 =========================================================================== #.
-
.set_pdf7(i) ⇒ Object
# === Roebe.set_pdf7 =========================================================================== #.
-
.set_pdf8(i) ⇒ Object
# === Roebe.set_pdf8 =========================================================================== #.
-
.set_pdf9(i) ⇒ Object
# === Roebe.set_pdf9 =========================================================================== #.
-
.set_pdf_for_this_number(number = 1, path_to_use) ⇒ Object
# === Roebe.set_pdf_for_this_number.
-
.set_permanently_use_this_browser(i) ⇒ Object
# === Roebe.set_permanently_use_this_browser =========================================================================== #.
-
.set_project_base_directory=(i) ⇒ Object
# === Roebe.set_project_base_directory= ========================================================================= #.
-
.set_ten_aliases(*i) ⇒ Object
# === Roebe.set_ten_aliases ========================================================================= #.
-
.set_xorg_buffer(i) ⇒ Object
# === Roebe.set_xorg_buffer ========================================================================= #.
-
.sfancy(i = '', use_colours = @use_colours) ⇒ Object
# === Roebe.sfancy ========================================================================= #.
-
.sfile(i = '', use_colours = @use_colours) ⇒ Object
# === Roebe.sfile ========================================================================= #.
-
.show_all_256_colours ⇒ Object
# === Roebe.show_all_256_colours =========================================================================== #.
-
.show_appointments ⇒ Object
# === Roebe.show_appointments =========================================================================== #.
-
.show_available_licences_for_the_installed_gems ⇒ Object
# === Roebe.show_available_licences_for_the_installed_gems.
-
.show_available_users(i = ARGV, &block) ⇒ Object
# === Roebe.show_available_users =========================================================================== #.
-
.show_beauty_string ⇒ Object
# === Roebe.show_beauty_string ========================================================================= #.
-
.show_eduroam_help ⇒ Object
# === Roebe.show_eduroam_help =========================================================================== #.
-
.show_games ⇒ Object
# === Roebe.show_games.
-
.show_help ⇒ Object
# === Roebe.show_help.
-
.show_information_related_to_chello ⇒ Object
-
.show_nano_config ⇒ Object
# === Roebe.show_nano_config.
-
.show_POSIX_character_classes ⇒ Object
# === Roebe.show_POSIX_character_classes ========================================================================= #.
-
.show_processes ⇒ Object
# === Roebe.show_processes ========================================================================= #.
-
.show_regexp(string = ARGV, pattern = nil) ⇒ Object
# === Roebe.show_regexp ========================================================================= #.
-
.show_sigint ⇒ Object
# === Roebe.show_sigint =========================================================================== #.
-
.show_the_last_opened_pdf_files ⇒ Object
# === Roebe.show_the_last_opened_pdf_files.
-
.show_time ⇒ Object
# === Roebe.show_time =========================================================================== #.
-
.show_tv_channels(i = ::Roebe::Shell::TV_CHANNELS) ⇒ Object
# === Roebe.show_tv_channels.
-
.silent_redirection? ⇒ Boolean
# === Roebe.silent_redirection? ========================================================================= #.
-
.simp(i = '', use_colours = @use_colours) ⇒ Object
# === Roebe.simp ========================================================================= #.
-
.simple_markdown_parser(i = ARGV) ⇒ Object
# === Roebe.simple_markdown_parser =========================================================================== #.
-
.sitelibdir? ⇒ Boolean
# === Roebe.sitelibdir? ========================================================================= #.
-
.slateblue(i = '') ⇒ Object
# === Roebe.slateblue ========================================================================= #.
-
.sort_by_highest_price(this_file = '/home/x/data/games/magic_the_gathering/Kartenliste_mit_Preisen_15.09.2016.csv') ⇒ Object
# === Roebe.sort_by_highest_price.
-
.split_kde_konsole_tab_vertically ⇒ Object
# === Roebe.split_kde_konsole_tab_vertically.
-
.start_irb(use_this_prompt = '') ⇒ Object
# === Roebe.start_irb.
-
.start_lighttpd(use_this_file_for_determining_the_port = :default_port) ⇒ Object
# === Roebe.start_lighttpd.
-
.start_pdf_libui(i = ARGV) ⇒ Object
# === Roebe.start_pdf_libui.
-
.start_the_libui_shell(i = ARGV) ⇒ Object
# === Roebe.start_the_libui_shell ========================================================================= #.
-
.start_webrick(port = :default, document_root_to_use = '/home/x/', config = {}) ⇒ Object
# === Roebe.start_webrick.
-
.std_renamer(i) ⇒ Object
# === Roebe.std_renamer =========================================================================== #.
-
.steelblue(i = '') ⇒ Object
# === Roebe.steelblue ========================================================================= #.
-
.steigung(point1 = [1, 4], point2 = [5, -4], float_or_integer_values = :integer) ⇒ Object
# === Roebe.steigung.
-
.stop_lighty ⇒ Object
# === Roebe.stop_lighty =========================================================================== #.
-
.stories(i = ARGV) ⇒ Object
# === Roebe.stories =========================================================================== #.
-
.string_to_hash(i = ' Susie 400 John 100 Mary 200 Marie 500 John 100 Tim 500 ') ⇒ Object
# === Roebe.string_to_hash.
-
.studium1 ⇒ Object
# === Roebe.studium1 ========================================================================= #.
-
.subscript_four ⇒ Object
# === Roebe.subscript_four.
-
.subscript_six ⇒ Object
# === Roebe.subscript_six.
-
.subscript_three ⇒ Object
# === Roebe.subscript_three.
-
.subscript_two ⇒ Object
# === Roebe.subscript_two.
-
.superscript_minus ⇒ Object
# === Roebe.superscript_minus.
-
.superscript_plus ⇒ Object
# === Roebe.superscript_plus.
-
.swarn(i = '', use_colours = @use_colours) ⇒ Object
# === Roebe.swarn ========================================================================= #.
-
.symlink_files_from(i = ARGV) ⇒ Object
# === Roebe.symlink_files_from =========================================================================== #.
-
.tales_from_the_crypt ⇒ Object
# === Roebe.tales_from_the_crypt =========================================================================== #.
-
.temp_dir? ⇒ Boolean
# === Roebe.temp_dir?.
-
.third_most_stable_version_of_ruby(this_file = yaml_dir?+'current_ruby_versions.yml') ⇒ Object
# === Roebe.third_most_stable_version_of_ruby.
-
.tibetan_symbol_padma_gdan ⇒ Object
# === Roebe.tibetan_symbol_padma_gdan ========================================================================= #.
-
.to_bool(i) ⇒ Object
# === Roebe.to_bool.
-
.to_camelcase(i) ⇒ Object
# === Roebe.to_camelcase.
-
.to_current(this_dir = ARGV.first) ⇒ Object
# === Roebe.to_current.
-
.to_movie(i = @_, store_here = '/Depot/Video/output_images.avi') ⇒ Object
# === Roebe.to_movie.
-
.to_mp3(i = ARGV) ⇒ Object
# === Roebe.to_mp3.
-
.to_underscore(i) ⇒ Object
# === Roebe.to_underscore.
-
.tokenitor(use_this_colour = :steelblue) ⇒ Object
# === Roebe.tokenitor ========================================================================= #.
-
.tomato(i = '') ⇒ Object
# === Roebe.tomato ========================================================================= #.
-
.top_left_corner_thin ⇒ Object
# === Roebe.top_left_corner_thin.
-
.trad(i = ARGV) ⇒ Object
# === Roebe.trad.
-
.traditional_fibonacci(i = 1) ⇒ Object
# === Roebe.traditional_fibonacci.
-
.traurige_oder_fröhliche_zahl(i) ⇒ Object
# === Roebe.traurige_oder_fröhliche_zahl.
-
.try_to_enable_the_expanded_cd_aliases(be_verbose = true) ⇒ Object
# === Roebe.try_to_enable_the_expanded_cd_aliases.
-
.try_to_extract_this_gem(i) ⇒ Object
-
.try_to_require_the_colours_project(be_verbose = true) ⇒ Object
# === Roebe.try_to_require_the_colours_project ========================================================================= #.
-
.try_to_run_the_ascii_paradise_demo ⇒ Object
# === Roebe.try_to_run_the_ascii_paradise_demo ========================================================================= #.
-
.turquoise(i = '') ⇒ Object
# === Roebe.turquoise ========================================================================= #.
-
.umbrella_with_raindrops ⇒ Object
# === Roebe.umbrella_with_raindrops ========================================================================= #.
-
.umfang(i = ARGV) ⇒ Object
# === Roebe.umfang =========================================================================== #.
-
.unicode_chess_symbols? ⇒ Boolean
# === Roebe.unicode_chess_symbols? =========================================================================== #.
-
.unicode_cliner ⇒ Object
# === Roebe.unicode_cliner.
-
.unicode_integral_symbol ⇒ Object
# === Roebe.unicode_integral_symbol.
-
.university_email? ⇒ Boolean
# === Roebe.university_email? ========================================================================= #.
-
.upcase_all_files(from = return_pwd) ⇒ Object
# === Roebe.upcase_all_files.
-
.update(install_how = :both) ⇒ Object
# === Roebe.update (iruby tag, update tag).
-
.update_pciids(i = :ruby_way, remote_url_to_use = 'http://pci-ids.ucw.cz/v2.2/pci.ids') ⇒ Object
# === Roebe.update_pciids.
-
.update_roebe(i = "#{HOME_DIRECTORY_OF_USER_X}data/PROGRAMMING_LANGUAGES/RUBY/src/roebe/") ⇒ Object
# === Roebe.update_roebe.
-
.update_the_main_pdf_viewer_file_with_this_program(what) ⇒ Object
# === Roebe.update_the_main_pdf_viewer_file_with_this_program.
-
.upper_half_block ⇒ Object
# === Roebe.upper_half_block.
-
.upper_one_eighth_block ⇒ Object
# === Roebe.upper_one_eighth_block ========================================================================= #.
-
.upwards_arrow ⇒ Object
# === Roebe.upwards_arrow.
-
.url_to_the_cascadia_font? ⇒ Boolean
# === Roebe.url_to_the_cascadia_font?.
-
.url_to_the_hack_font?(general_URL_or_URL_to_the_zip_file = :general) ⇒ Boolean
# === Roebe.url_to_the_hack_font?.
-
.url_to_the_jet_brains_font?(general_URL_or_URL_to_the_zip_file = :general) ⇒ Boolean
# === Roebe.url_to_the_jet_brains_font? ========================================================================= #.
-
.use_atril ⇒ Object
# === Roebe.use_atril.
-
.use_colours? ⇒ Boolean
# === Roebe.use_colours? ========================================================================= #.
-
.use_evince ⇒ Object
# === Roebe.use_evince.
-
.user_install_all_registered_gems(use_gem_or_setup_rb = :setup_rb) ⇒ Object
# === Roebe.user_install_all_registered_gems.
-
.verbose_truth(i) ⇒ Object
# === Roebe.verbose_truth ========================================================================= #.
-
.version? ⇒ Boolean
# === Roebe.version? ========================================================================= #.
-
.vetmed? ⇒ Boolean
# === Roebe.vetmed? ========================================================================= #.
-
.warning_sign ⇒ Object
# === Roebe.warning_sign.
-
.weekday?(this_weekday_as_number = Date.today.wday) ⇒ Boolean
# === Roebe.weekday?.
-
.wget(i) ⇒ Object
# === Roebe.wget ========================================================================= #.
-
.wheel_of_dharma ⇒ Object
# === Roebe.wheel_of_dharma ========================================================================= #.
-
.white_chess_bishop ⇒ Object
# === Roebe.white_chess_bishop ========================================================================= #.
-
.white_chess_king ⇒ Object
# === Roebe.white_chess_king ========================================================================= #.
-
.white_chess_knight ⇒ Object
# === Roebe.white_chess_knight ========================================================================= #.
-
.white_chess_pawn ⇒ Object
# === Roebe.white_chess_pawn ========================================================================= #.
-
.white_chess_queen ⇒ Object
# === Roebe.white_chess_queen ========================================================================= #.
-
.white_chess_rook ⇒ Object
# === Roebe.white_chess_rook ========================================================================= #.
-
.white_frowning_face ⇒ Object
# === Roebe.white_frowning_face.
-
.white_shogi_piece ⇒ Object
# === Roebe.white_shogi_piece ========================================================================= #.
-
.white_sun_with_rays ⇒ Object
# === Roebe.white_sun_with_rays ========================================================================= #.
-
.whois(i = nil) ⇒ Object
# === Roebe.whois ========================================================================= #.
-
.wochentag?(i = ARGV.first) ⇒ Boolean
# === Roebe.wochentag? (weekday).
-
.wochentag_anzeiger(i) ⇒ Object
# === Roebe.wochentag_anzeiger =========================================================================== #.
-
.word_count(i = ARGV) ⇒ Object
# === Roebe.word_count ========================================================================= #.
-
.word_frequencies(i = 'We tried list and we tried dicts also we tried Zen') ⇒ Object
# === Roebe.word_frequencies.
-
.word_wrap(i, n_characters = :default) ⇒ Object
# === Roebe.word_wrap =========================================================================== #.
-
.write_what_into(what, into = 'foobar.md', use_this_mode = 'w+') ⇒ Object
# === Roebe.write_what_into.
-
.wurzel ⇒ Object
# === Roebe.wurzel.
-
.www_directory? ⇒ Boolean
# === Roebe.www_directory? =========================================================================== #.
-
.zenity(i) ⇒ Object
# === Roebe.zenity =========================================================================== #.
-
.zip_on_windows(this_directory = Dir.pwd, name_of_the_file = :default) ⇒ Object
# === Roebe.zip_on_windows.
-
.zlib(zipped_filename, unzipped_filename) ⇒ Object
# === Roebe.zlib.
Instance Method Summary
collapse
Class Method Details
.[](i = '') ⇒ Object
#
RequireEverything[]
Easier instantiation-method.
#
140
141
142
143
144
145
146
147
148
149
|
# File 'lib/roebe/classes/require_everything.rb', line 140
def self.[](i = '')
case i
when :be_quiet, :be_silent
_ = ::Roebe::RequireEverything.new :do_not_run_yet
_.set_be_quiet
_.run
else
new
end
end
|
138
139
140
141
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 138
def self.(i = 76)
i = ('=' * i.to_i)
return i
end
|
.add_user_lighty ⇒ Object
#
Roebe.add_user_lighty
#
99
100
101
|
# File 'lib/roebe/classes/add_user_lighty.rb', line 99
def self.add_user_lighty
AddUserLighty.new
end
|
.all_unicode_nodes ⇒ Object
#
Roebe.all_unicode_nodes
This method will return an Array of all unicode-note symbols - at the least those that may be useful.
#
.almost_equal_to ⇒ Object
757
758
759
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 757
def self.almost_equal_to
EmojiParadise.send(__method__)
end
|
.append_this_onto_that_file(what, into = 'foobar.md') ⇒ Object
#
Roebe.append_this_onto_that_file
This method can be used to append content onto a file.
#
63
64
65
66
67
68
|
# File 'lib/roebe/toplevel_methods/write_what_into.rb', line 63
def self.append_this_onto_that_file(
what,
into = 'foobar.md'
)
::Roebe::SaveFile.append_this_onto_that_file(what, into)
end
|
.append_this_program_to_the_autostart_array(i) ⇒ Object
#
Roebe.append_this_program_to_the_autostart_array
This method can be used to add a program to the applications that will be autostarted.
#
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
# File 'lib/roebe/commandline/misc.rb', line 212
def self.append_this_program_to_the_autostart_array(i)
what = i.to_s.dup
unless what.start_with? '- '
what.prepend('- ')
end
unless what.start_with? "\n"
what.prepend("\n")
end
into = FILE_AUTOSTART_THESE_PROGRAMS
e 'Now appending `'+what.delete("\n")+'` into '+into+'.'
append_what_into(what, into)
if is_on_roebe?
into = HOME_DIRECTORY_OF_USER_X+'DATA/PROGRAMMING_LANGUAGES/RUBY/src/roebe/lib/roebe/yaml/autostart_these_programs.yml'
e 'Now appending `'+what.delete("\n")+'` into '+into+'.'
append_what_into(what, into)
end
end
|
.append_to_gem_install_command(i) ⇒ Object
#
Roebe.append_to_gem_install_command
#
301
302
303
|
# File 'lib/roebe/classes/update.rb', line 301
def self.append_to_gem_install_command(i)
@gem_install_command << ' '+i
end
|
.are_these_two_strings_an_anagram?(string1, string2) ⇒ Boolean
#
Roebe.are_these_two_strings_an_anagram?
#
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/roebe/math/anagram.rb', line 14
def self.are_these_two_strings_an_anagram?(string1, string2)
unless string1.size == string2.size
return false end
string1 = string1.dup
string2 = string2.dup
string1.downcase!
string2.downcase!
copy_of_string2 = string2.dup
string1.chars.each {|this_char|
if copy_of_string2.include? this_char
copy_of_string2[copy_of_string2.index(this_char)] = ''
end
}
if copy_of_string2.size == 0
return true
else
return false
end
end
|
.array_install_these_gem_projects ⇒ Object
#
Roebe.array_install_these_gem_projects
Toplevel helper-method to query all gem-projects that I may need on a new computer system; or to simply update my current gems.
#
97
98
99
|
# File 'lib/roebe/constants/array_install_these_gem_projects.rb', line 97
def self.array_install_these_gem_projects
ARRAY_INSTALL_THESE_GEM_PROJECTS
end
|
.array_short_monthnames ⇒ Object
#
Roebe.array_short_monthnames
This method will return all months via short-name, such as ‘Sep’ for ‘September’ and so forth.
#
163
164
165
166
167
|
# File 'lib/roebe/time/time.rb', line 163
def self.array_short_monthnames
Date::MONTHNAMES.compact.map {|entry|
entry[0,3]
} end
|
.at(i = nil) ⇒ Object
335
336
337
|
# File 'lib/roebe/classes/at.rb', line 335
def self.at(i = nil)
Roebe::At.new(i)
end
|
.auto_rename_file_based_on_its_creation_date(i = ARGV) ⇒ Object
#
Roebe.auto_rename_file_based_on_its_creation_date
#
.auto_rename_file_based_on_time_today(i = ARGV) ⇒ Object
#
Roebe.auto_rename_file_based_on_time_today
#
.autodater(i = ARGV) ⇒ Object
126
127
128
129
130
|
# File 'lib/roebe/classes/autodater.rb', line 126
def self.autodater(
i = ARGV
)
Roebe::Autodater.new(i)
end
|
.autogenerate_fluxbox_files ⇒ Object
#
Roebe.autogeneraet_fluxbox_files
#
.autoprune(i = ARGV) ⇒ Object
#
Roebe.autoprune
This method can be used to auto-prune some ruby gems that need to be rebuilt.
A line given to this method may look like this:
"Ignoring glib2-3.3.0 because its extensions are not built. Try: gem pristine glib2 --version 3.3.0\n" +
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/roebe/toplevel_methods/autoprune.rb', line 20
def self.autoprune(i = ARGV)
if i.is_a? Array
i = i.join(' ').strip
end
if i.is_a?(String) and i.include?("\n")
splitted = i.split("\n").map(&:strip)
splitted.each {|line|
if line.include? 'Try: '
line = line.split('Try: ').last.strip
esystem line
end
}
end
pp i
end
|
.available_classes(optional_input = nil) ⇒ Object
#
Roebe.available_classes
#
211
212
213
|
# File 'lib/roebe/classes/available_classes.rb', line 211
def self.available_classes(optional_input = nil)
Roebe::AvailableClasses.new(optional_input)
end
|
.average_of_differences(array1 = %w(
34.9 44.4 33.6 40.1 41.5 40.3 32.6 39.3 29.3 40.5 31.4
).map(&:to_f), array2 = %w(
38.2 38.5 40.0 38.2 37.4 37.8 40.3 36.7 38.3 40.4 38.7
).map(&:to_f)) ⇒ Object
#
Roebe.average_of_differences
Given two input-arrays with values, we calculate the average of differences between these two.
#
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/roebe/math/average_of_differences.rb', line 17
def self.average_of_differences(
array1 = %w(
34.9 44.4 33.6 40.1 41.5 40.3 32.6 39.3 29.3 40.5 31.4
).map(&:to_f),
array2 = %w(
38.2 38.5 40.0 38.2 37.4 37.8 40.3 36.7 38.3 40.4 38.7
).map(&:to_f)
)
array_differences = []
array1.each_with_index {|value1, index|
value2 = array2[index]
result = (value1 - value2).round(3)
array_differences << result
e result
}
average_of_differences = array_differences.sum / array_differences.size
return average_of_differences
end
|
.backup_master_boot_record(save_in_this_file = 'backup_mbr', use_this_as_input_device = '/dev/sda') ⇒ Object
#
Roebe.backup_master_boot_record
This method can be used to backup the master boot record (MBR) into a local file.
I typically keep a “backup” MBR on my home system. The code at the end of this .rb file does this for me.
#
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/roebe/toplevel_methods/master_boot_record.rb', line 50
def self.backup_master_boot_record(
save_in_this_file = 'backup_mbr',
use_this_as_input_device = '/dev/sda'
)
cmd_to_use = 'dd if='+use_this_as_input_device+
' of='+
save_in_this_file+
' bs='+MASTER_BOOD_RECORD_SIZE.to_s+' count=1'
esystem(cmd_to_use)
end
|
.base64(this_file = 'image.png') ⇒ Object
#
Roebe.base64
This method expects an existing file as input.
It will then return the output of applying Base64.encode64() to that file. This will allow us to use that String as the binary encoding for e. g. a .png file.
#
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/roebe/toplevel_methods/base64.rb', line 19
def self.base64(
this_file = 'image.png'
)
if this_file.is_a? Array
this_file = this_file.first
end
require 'base64'
result = ''.dup
File.open(this_file, 'r') { |f|
result << Base64.encode64(f.read)
}
result.delete("\n")
end
|
#
Roebe.batch (batch tag)
This is an ad-hoc method that can be adjusted whenever we have to perform a certain “batch” action.
#
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 364
def Roebe.batch
all_files = Dir['*']
all_files.select! {|this_file|
this_file.end_with?('.doc')
}
all_files.each {|this_file|
date_of_creation = Roebe.return_the_date_of_this_doc_file(this_file)
unless File.basename(this_file) =~ /^\d{2}\.\d{2}\.\d{4}\._/
new_filename = date_of_creation.to_s+'_'+File.basename(this_file)
rename_this_file(
this_file,
new_filename
)
end
}
end
|
.batch_rename_pdf_files_systematically(counter = 5) ⇒ Object
#
Roebe.batch_rename_pdf_files_systematically
This method will simply rename the .pdf files systematically, starting from “1” to “2” and so forth.
#
620
621
622
623
624
625
626
627
628
629
630
631
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 620
def self.batch_rename_pdf_files_systematically(
counter = 5
)
these_are_the_pdf_files = Dir['*'].select {|line|
line.end_with? '.pdf'
}.sort
these_are_the_pdf_files.each {|this_pdf_file| counter += 1
new_name = counter.to_s+'.pdf'
e this_pdf_file.to_s+' -> '+new_name
move_file(this_pdf_file, new_name)
}
end
|
.beamed_eighth_note ⇒ Object
#
Roebe.beamed_eighth_note
#
111
112
113
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 111
def self.beamed_eighth_note
EmojiParadise.send(__method__)
end
|
.beamed_eighth_notes ⇒ Object
#
Roebe.beamed_eighth_notes
The symbol will be: ♫
#
830
831
832
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 830
def self.beamed_eighth_notes
EmojiParadise.send(__method__)
end
|
.beamed_sixteenth_notes ⇒ Object
#
Roebe.beamed_sixteenth_notes
The symbol will be: ♬
#
839
840
841
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 839
def self.beamed_sixteenth_notes
EmojiParadise.send(__method__)
end
|
.beautify_system ⇒ Object
#
Roebe.beautify_system
This method will simply delegate towards RBT::BeautifySystem.
#
14
15
16
17
18
19
|
# File 'lib/roebe/toplevel_methods/beautify_system.rb', line 14
def self.beautify_system
unless Object.const_defined? :RBT
require 'rbt/utility_scripts/beautify_system.rb'
end
RBT::BeautifySystem.new
end
|
.binding? ⇒ Boolean
5659
5660
5661
|
# File 'lib/roebe/custom_methods/module.rb', line 5659
def self.binding?
TOPLEVEL_BINDING
end
|
.binning(i, n_bins = 3) ⇒ Object
#
Roebe.binning
The first argument to this method should be an Arary.
#
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/roebe/math/binning.rb', line 23
def self.binning(i, n_bins = 3)
array = Array.new(n_bins, [])
i.sort_by {|entry| entry.size }.each {|this_is_the_sequence|
length_of_the_sequence = this_is_the_sequence.size
add_to_the_array_at_this_position = ( length_of_the_sequence ) / n_bins
if array[add_to_the_array_at_this_position].empty?
array[add_to_the_array_at_this_position] = [this_is_the_sequence.dup]
else
array[add_to_the_array_at_this_position] << this_is_the_sequence.dup
end
}
array = expand_this_array(array)
return array
end
|
.black_chess_bishop ⇒ Object
#
Roebe.black_chess_bishop
#
78
79
80
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 78
def self.black_chess_bishop EmojiParadise.black_chess_bishop
end
|
.black_chess_king ⇒ Object
#
Roebe.black_chess_king
#
57
58
59
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 57
def self.black_chess_king EmojiParadise.black_chess_king
end
|
.black_chess_knight ⇒ Object
#
Roebe.black_chess_knight
#
99
100
101
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 99
def self.black_chess_knight EmojiParadise.black_chess_knight
end
|
.black_chess_pawn ⇒ Object
#
Roebe.black_chess_pawn
#
85
86
87
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 85
def self.black_chess_pawn EmojiParadise.black_chess_pawn
end
|
.black_chess_queen ⇒ Object
#
Roebe.black_chess_queen
#
64
65
66
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 64
def self.black_chess_queen EmojiParadise.black_chess_queen
end
|
.black_chess_rook ⇒ Object
#
Roebe.black_chess_rook
#
71
72
73
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 71
def self.black_chess_rook EmojiParadise.black_chess_rook
end
|
.black_circle ⇒ Object
#
Roebe.black_circle
The symbol will be: ●
#
746
747
748
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 746
def self.black_circle
EmojiParadise.send(__method__)
end
|
.black_lozenge ⇒ Object
157
158
159
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 157
def self.black_lozenge
EmojiParadise.send(__method__)
end
|
.black_medium_diamond ⇒ Object
#
Roebe.black_medium_diamond
#
150
151
152
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 150
def self.black_medium_diamond
EmojiParadise.send(__method__)
end
|
.black_right_pointing_triangle ⇒ Object
#
Roebe.black_right_pointing_triangle
#
104
105
106
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 104
def self.black_right_pointing_triangle
EmojiParadise.send(__method__)
end
|
.black_rightwards_arrow ⇒ Object
721
722
723
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 721
def self.black_rightwards_arrow
EmojiParadise.send(__method__)
end
|
.black_shogi_piece ⇒ Object
#
Roebe.black_shogi_piece
#
185
186
187
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 185
def self.black_shogi_piece
EmojiParadise.send(__method__)
end
|
.black_smiling_face ⇒ Object
#
Roebe.black_smiling_face
#
602
603
604
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 602
def self.black_smiling_face
EmojiParadise.send(__method__)
end
|
.black_square ⇒ Object
737
738
739
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 737
def self.black_square
EmojiParadise.send(__method__)
end
|
.blinking_cursor ⇒ Object
#
Roebe.blinking_cursor
#
80
81
82
|
# File 'lib/roebe/toplevel_methods/blinking_cursor.rb', line 80
def self.blinking_cursor
Roebe::BlinkingCursor.blink
end
|
.boku_opening_dates ⇒ Object
#
Studium.boku_opening_dates
#
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/roebe/toplevel_methods/boku_opening_times.rb', line 15
def self.boku_opening_dates
e 'Öffnungszeiten'
e
e ' Montag: von '+sandybrown('09:00')+'-'+sandybrown('12:00')+' Uhr'
e ' Dienstag: von '+sandybrown('09:00')+'-'+sandybrown('12:00')+' Uhr'
e ' Mittwoch: von '+sandybrown('14:00')+'-'+sandybrown('16:00')+' Uhr'
e ' Donnerstag: von '+sandybrown('09:00')+'-'+sandybrown('12:00')+' Uhr'
e ' Freitag: von '+sandybrown('09:00')+'-'+sandybrown('12:00')+' Uhr'
e
end
|
.box_drawings_heavy_down_and_horizontal ⇒ Object
#
Roebe.box_drawings_heavy_down_and_horizontal
#
698
699
700
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 698
def self.box_drawings_heavy_down_and_horizontal
EmojiParadise.send(__method__)
end
|
.box_drawings_heavy_down_and_left ⇒ Object
#
Roebe.box_drawings_heavy_down_and_left
#
684
685
686
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 684
def self.box_drawings_heavy_down_and_left
EmojiParadise.send(__method__)
end
|
.box_drawings_heavy_down_and_right ⇒ Object
#
Roebe.box_drawings_heavy_down_and_right
This is the thick, top-left corner of a “commandline table”.
#
670
671
672
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 670
def self.box_drawings_heavy_down_and_right
EmojiParadise.send(__method__)
end
|
.box_drawings_heavy_horizontal ⇒ Object
#
Roebe.box_drawings_heavy_horizontal
This is a very useful building block for commandline applications, in that you can display a horizontal bar through it.
#
642
643
644
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 642
def self.box_drawings_heavy_horizontal
EmojiParadise.send(__method__)
end
|
.box_drawings_heavy_up_and_horizontal ⇒ Object
#
Roebe.box_drawings_heavy_up_and_horizontal
#
705
706
707
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 705
def self.box_drawings_heavy_up_and_horizontal
EmojiParadise.send(__method__)
end
|
.box_drawings_heavy_up_and_left ⇒ Object
#
Roebe.box_drawings_heavy_up_and_left
#
691
692
693
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 691
def self.box_drawings_heavy_up_and_left
EmojiParadise.send(__method__)
end
|
.box_drawings_heavy_up_and_right ⇒ Object
#
Roebe.box_drawings_heavy_up_and_right
#
677
678
679
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 677
def self.box_drawings_heavy_up_and_right
EmojiParadise.send(__method__)
end
|
.box_drawings_heavy_vertical ⇒ Object
#
Roebe.box_drawings_heavy_vertical
#
649
650
651
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 649
def self.box_drawings_heavy_vertical
EmojiParadise.send(__method__)
end
|
.bring_up_this_wlan_device(use_this_device = 'wlan0') ⇒ Object
#
Roebe.bring_up_this_wlan_device
This method can be used to bring up a wlan-device, such as an USB stick.
wlan7: wpa_passphrase UPC1371700 >> /etc/wpa_supplicant.conf
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/roebe/toplevel_methods/wlan/bring_up_this_wlan_device.rb', line 20
def self.bring_up_this_wlan_device(
use_this_device = 'wlan0'
)
if use_this_device.is_a? Array
use_this_device = use_this_device.first
end
if use_this_device.nil?
use_this_device = 'wlan0' end
_ = 'iw dev'
esystem _
_ = 'ip link show '+use_this_device
esystem _
_ = 'ip link set '+use_this_device+' up'
esystem _
_ = 'iw '+use_this_device+' link'
esystem _
_ = 'iw '+use_this_device+' scan'
esystem _
_ = 'wpa_supplicant -B -D wext -i '+use_this_device+' -c /etc/wpa_supplicant.conf'
esystem _
_ = 'iw '+use_this_device+' link'
esystem _
_ = 'dhclient '+use_this_device+''
esystem _
end
|
.browser(use_this_url = ARGV, use_this_browser = BROWSER_TO_USE_BY_DEFAULT) ⇒ Object
#
Roebe.browser
The second argument specifies which browser is to be used, e. g. “palemoon” or another one. It is a String.
#
354
355
356
357
358
359
360
361
362
363
364
365
|
# File 'lib/roebe/browser/misc.rb', line 354
def self.browser(
use_this_url = ARGV,
use_this_browser = BROWSER_TO_USE_BY_DEFAULT
)
if use_this_url.is_a? Array
use_this_url = use_this_url.join(' ').strip
end
::Roebe::Browser.new(use_this_url)
end
|
581
582
583
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 581
def self.bug
EmojiParadise.send(__method__)
end
|
.build_all_my_local_gems ⇒ Object
#
Roebe.build_all_my_local_gems
This method will build all my local gems. They will then be moved to a target location at /Depot/MyGems.
#
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/roebe/toplevel_methods/build_all_my_local_gems.rb', line 15
def self.build_all_my_local_gems
require 'roebe/constants/array_install_these_gem_projects.rb'
require 'roebe/classes/make_gem.rb'
require 'roebe/constants/constants.rb'
target_dir = '/Depot/MyGems/'
mkdir(target_dir)
array = self.class::ARRAY_INSTALL_THESE_GEM_PROJECTS
array.reject! {|entry| entry.include? 'pipe_handler' }
array.each {|file|
working_dir = RUBY_SRC+file+'/'
cd working_dir
MakeGem.new
possible_gem_files = Dir[working_dir+'*.gem']
unless possible_gem_files.empty?
first = possible_gem_files.first
move_file(first, target_dir, :be_verbose)
end
}
return target_dir end
|
.bundle_exam_results ⇒ Object
#
Roebe.bundle_exam_results
This will bundle together all my various exam results.
Invoke it like so:
rinvoke bundle_exam_results
#
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/roebe/toplevel_methods/bundle_exam_results.rb', line 23
def self.bundle_exam_results
require 'pdf_paradise/merge_pdf_namespace'
begin
require 'pdf_paradise/merge_pdf/merge_pdf.rb'
rescue LoadError; end
store_here = '/Depot/Temp/AllExams_generated_at_'+today?+'.pdf'
merge_pdf = MergePdf.new(:dont_run_yet)
base_dir = ::Studium.studium_at_home_dir?+'EXAMS_RESULT/'
uni_wien = Dir[base_dir+'UNI_WIEN/*Sammelzeugnis*.pdf'].first
tu_wien = Dir[base_dir+'TU_WIEN/*Sammelzeugnis*.pdf'].first
meduni_wien = Dir[base_dir+'MEDUNI_WIEN/*Sammelzeugnis*.pdf'].first
vetmed_wien = base_dir+'VETMED_UNI/Sammelzeugnis_Vetmed_2014.pdf'
boku_wien = Dir[base_dir+'BOKU_WIEN/*Sammelzeugnis*.pdf'].first
e 'Now merging various .pdf files together (will store '\
'at '+sfile(store_here)+').'
merge_pdf << uni_wien
merge_pdf << tu_wien
merge_pdf << meduni_wien
merge_pdf << vetmed_wien
merge_pdf << boku_wien
merge_pdf.store_at store_here
merge_pdf.run
merge_pdf.report
end
|
.c_debug? ⇒ Boolean
14
15
16
|
# File 'lib/roebe/toplevel_methods/c_debug.rb', line 14
def self.c_debug?
e 'printf("file %s, line %d: wert: %ld\n", __FILE__, __LINE__, wert);'
end
|
.calculate_bmi(weight = 16.9, height = 105.4, round = 1) ⇒ Object
#
Roebe.calculate_bmi
This method will calculate the BMI, using the metric system.
The parameter weight should be given in kg; the height in n cm.
#
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/calculate_bmi.rb', line 16
def self.calculate_bmi(
weight = 16.9, height = 105.4, round = 1 )
if weight.is_a? Array
weight = weight.first
end
result = (weight.to_f / (height.to_f * height.to_f)) * 10_000.0
result = result.round(round) if round
result
end
|
.calculate_hypotenuse(a, b) ⇒ Object
#
Roebe.calculate_hypotenuse
Pass a and b to calculate the hypotenuse of a triangle.
Usage examples:
Roebe.calculate_hypotenuse(3,5)
#
22
23
24
|
# File 'lib/roebe/toplevel_methods/calculate_hypotenuse.rb', line 22
def self.calculate_hypotenuse(a, b)
return Math.sqrt((a.to_f ** 2) + ( b.to_f ** 2))
end
|
.calculate_the_distance_between_two_points(p1 = ARGV, p2 = nil) ⇒ Object
#
Roebe.calculate_the_distance_between_two_points
This method can calculate the distance between two points.
#
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/roebe/math/calculate_the_distance_between_two_points.rb', line 16
def self.calculate_the_distance_between_two_points(p1 = ARGV, p2 = nil)
if p1.is_a? Array and p2.nil?
p2 = [ p1[3].to_f, p1[4].to_f, p1[5].to_f ]
p1 = [ p1[0].to_f, p1[1].to_f, p1[2].to_f ]
a = (p2[0] - p1[0]) ** 2 b = (p2[1] - p1[1]) ** 2 c = (p2[2] - p1[2]) ** 2 return Math.sqrt(a+b+c) end
end
|
.calculate_the_variance(*i) ⇒ Object
#
Roebe.calculate_the_variance
This method will calculate the variance of the given input array.
#
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/roebe/math/calculate_the_variance.rb', line 14
def self.calculate_the_variance(*i)
i.flatten!
i.compact!
arithmetic_mean = i.map(&:to_f).sum / i.size.to_f
array_deviations = i.map {|entry|
entry.to_f - arithmetic_mean
}
array_squared_deviations = array_deviations.map {|entry|
entry ** 2
}
sum = array_squared_deviations.sum
variance = sum / (i.size.to_f - 1)
return variance
end
|
.calendar(i = ARGV) ⇒ Object
312
313
314
|
# File 'lib/roebe/classes/calendar.rb', line 312
def self.calendar(i = ARGV)
Roebe::Calendar.new(i).print
end
|
.capitalize_this_file(i = nil) ⇒ Object
#
Roebe.capitalize_this_file
This method can be used to capitalize files in a given directory.
To test this method from the Roebe::Shell, try:
mkdir /Depot/yooo; cd /Depot/yooo; touch ack; capitalize *
#
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
# File 'lib/roebe/toplevel_methods/files.rb', line 187
def self.capitalize_this_file(
i = nil
)
if i
i = Dir['*'].select {|entry| File.file?(entry) } if i.nil?
if i.is_a? Array
i.each {|the_file| capitalize(the_file)}
else basename = File.basename(i)
_ = basename[0,1].upcase + basename[1..-1]
e "Now capitalizing #{sfile(i)} to #{sfile(_)}."
rename_file(basename,_) end
end
end
|
.cat(i = ARGV) ⇒ Object
#
Roebe.cat (cat tag)
This method will display the content of a file.
#
543
544
545
546
547
548
549
550
551
552
553
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 543
def self.cat(i = ARGV)
require 'cat/module'
if i.is_a? Array
if i.empty?
else
i.each {|entry| cat(entry) }
end
else
Cat[i]
end
end
|
.chained(i = ARGV) ⇒ Object
10
11
12
13
|
# File 'lib/roebe/toplevel_methods/chained.rb', line 10
def self.chained(i = ARGV)
require 'rbt' unless Object.const_defined? :RBT
RBT.batch_compile(i) end
|
.chdir(i = :home_dir) ⇒ Object
#
Roebe.chdir (chdir tag, cd tag)
This method can be used to simply change directory on the local filesystem.
#
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/roebe/toplevel_methods/chdir.rb', line 17
def self.chdir(
i = :home_dir
)
case i
when :home_dir
i = File.expand_path('~')
when '~'
i = File.expand_path(i)
end
if i.include? '$'
i = convert_global_env(i)
end
if File.directory? i
Dir.chdir(i) end
end
|
.check_mark ⇒ Object
794
795
796
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 794
def self.check_mark
EmojiParadise.send(__method__)
end
|
.check_whether_an_internet_connection_is_available ⇒ Object
#
Roebe.check_whether_an_internet_connection_is_available
This method will return a Boolean value - whether an internet connection is available (true) or whether we are offline.
#
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/roebe/toplevel_methods/check_whether_an_internet_connection_is_available.rb', line 16
def self.check_whether_an_internet_connection_is_available
require 'resolv'
resolver = Resolv::DNS.new
begin
resolver.getaddress('symbolics.com')
true
rescue Resolv::ResolvError
false
end
end
|
.checkmark_completed_thin? ⇒ Boolean
#
Roebe.checkmark_completed_thin?
#
51
52
53
|
# File 'lib/roebe/toplevel_methods/unicode/completed.rb', line 51
def self.checkmark_completed_thin?
EmojiParadise.checkmark_completed_thin?
end
|
.cheering_megaphone ⇒ Object
#
Roebe.cheering_megaphone
This refers to the following symbol: „
#
911
912
913
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 911
def self.cheering_megaphone
EmojiParadise.send(__method__)
end
|
.cliner(use_this_character = :default, how_often_to_use_that_token = :default, use_this_colour = :default) ⇒ Object
#
Roebe.cliner
The idea for this method is so that we do not depend on the gem called cliner.
Keep in mind that the input may be like this:
cliner('',grey?) {
Usage example:
Roebe.cliner('*')
#
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/roebe/toplevel_methods/cliner.rb', line 29
def self.cliner(
use_this_character = :default,
how_often_to_use_that_token = :default,
use_this_colour = :default
)
case use_this_character
when :default
use_this_character = '='
end
result = use_this_character * 80
if use_this_colour
case use_this_colour
when :default
use_this_colour = :slateblue
end
result = ::Colours.send(use_this_colour, result)
end
e result
end
|
110
111
112
|
# File 'lib/roebe/classes/clock.rb', line 110
def self.clock
Roebe::Clock.new
end
|
.colourize_files_and_directories(i = ARGF) ⇒ Object
#
Roebe.colourize_files_and_directories
#
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/roebe/toplevel_methods/colourize_files_and_directories.rb', line 16
def self.colourize_files_and_directories(i = ARGF)
if i.respond_to? :read
i = i.read
end
if i.is_a? String
i = i.split("\n")
end
i = [i].flatten.compact
i.map! {|entry|
if File.exist?(entry) and
(File.file?(entry) or
File.directory?(entry) or
File.symlink?(entry))
splitted = entry.split('/')
subrange_joined = (
splitted[0 .. -2].join('/')+'/'
).squeeze('/')
ftype = File.ftype(entry)
case ftype
when 'file'
entry = ::Colours.sdir(subrange_joined)+
::Colours.sfile(splitted.last)
when 'directory'
entry = ::Colours.sdir(
(entry+'/').squeeze('/')
)
when 'link'
entry = ::Colours.sdir(subrange_joined)+
::Colours.ssymlink(splitted.last)
end
end
entry
}
i.each {|entry| puts entry }
end
|
.colourized_tokenitor1(n_times = 80) ⇒ Object
#
Roebe.colourized_tokenitor1
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/colourized_tokenitor.rb', line 16
def self.colourized_tokenitor1(n_times = 80)
e steelblue('=' * n_times)
end
|
.colourized_tokenitor2(n_times = 80) ⇒ Object
#
Roebe.colourized_tokenitor2
#
23
24
25
|
# File 'lib/roebe/toplevel_methods/colourized_tokenitor.rb', line 23
def self.colourized_tokenitor2(n_times = 80)
e olivedrab('=' * n_times)
end
|
.colourized_tokenitor3(n_times = 80) ⇒ Object
#
Roebe.colourized_tokenitor3
#
30
31
32
|
# File 'lib/roebe/toplevel_methods/colourized_tokenitor.rb', line 30
def self.colourized_tokenitor3(n_times = 80)
e mediumseagreen('=' * n_times)
end
|
.colourized_tokenitor4(n_times = 80) ⇒ Object
#
Roebe.colourized_tokenitor4
#
37
38
39
|
# File 'lib/roebe/toplevel_methods/colourized_tokenitor.rb', line 37
def self.colourized_tokenitor4(n_times = 80)
e mediumpurple('=' * n_times)
end
|
.colourized_tokenitor5(n_times = 80) ⇒ Object
#
Roebe.colourized_tokenitor5
#
44
45
46
|
# File 'lib/roebe/toplevel_methods/colourized_tokenitor.rb', line 44
def self.colourized_tokenitor5(n_times = 80)
e mediumorchid('=' * n_times)
end
|
.compile_as_appdir(i = Dir.pwd) ⇒ Object
#
Roebe.compile_as_appdir (appconf, appdir)
This method allows you to quickly compile into an Appdir-Like structure.
#
194
195
196
197
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 194
def self.compile_as_appdir(i = Dir.pwd)
require 'easycompile'
Easycompile::CompileAsAppdir.new(i, ARGV) end
|
.completed ⇒ Object
#
Roebe.completed
This returns a unicode “checkmark”. This is useful in the sense that you can use it to display that certain tasks on a todo-list have been completed.
See:
https://www.fileformat.info/info/unicode/char/2713/index.htm
#
34
35
36
|
# File 'lib/roebe/toplevel_methods/unicode/completed.rb', line 34
def self.completed
EmojiParadise.completed
end
|
.controller ⇒ Object
#
Roebe.controller
This method is really only useful for my home system.
#
59
60
61
62
|
# File 'lib/roebe/toplevel_methods/is_on_roebe.rb', line 59
def self.controller
require '/home/x/data/personal/controller/controller.rb'
Roebe::Controller.start_sinatra_interface(ARGV)
end
|
.convert_global_env(i) ⇒ Object
#
Roebe.convert_global_env (global tag, ENV tag)
This method will convert a global $variable to its ENV value and return this value.
We do this by delegating towards class ConvertGlobalEnv.
#
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/convert_global_env.rb', line 17
def self.convert_global_env(i)
unless Object.const_defined? :ConvertGlobalEnv
begin
require 'convert_global_env'
rescue LoadError; end
end
if Object.const_defined? :ConvertGlobalEnv
i = ConvertGlobalEnv.convert(i)
end
i
end
|
.copy_bluefish_configuration_files(copy_from = Dir['/home/x/programming/ruby/src/roebe/lib/roebe/www/bluefish/*'], copy_to = ENV['HOME'].to_s+'/.bluefish/') ⇒ Object
#
Roebe.copy_bluefish_configuration_files
This method will copy my custom bluefish-related configuration files, if is_on_roebe? returns true (aka if we are on my home system).
Since as of
#
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/roebe/toplevel_methods/editor.rb', line 25
def self.copy_bluefish_configuration_files(
copy_from = Dir['/home/x/programming/ruby/src/roebe/lib/roebe/www/bluefish/*'],
copy_to = ENV['HOME'].to_s+'/.bluefish/'
)
e
e 'Now trying to copy the following files:'
e
copy_from.each {|entry|
e sfile(entry)
}
e
e 'Copying onto the following directory: '+sdir(copy_to)
if is_on_roebe?
mkdir(copy_to) unless File.directory? copy_to
copy_files(copy_from, copy_to) end
end
|
.copy_file(file, where_to = return_pwd, be_verbose = true) ⇒ Object
#
Roebe.copy_file
Use this method to copy a file to another location.
The second argument specifies the target directory/path, that is, where you want to copy the file to.
The method must be somewhat complex, in that it shall be able to interprete usage cases such as the following:
copy_files(
from: '/AUTOGENERATED/',
to: chroot_target
)
#
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
# File 'lib/roebe/toplevel_methods/files.rb', line 96
def self.copy_file(
file, where_to = return_pwd, be_verbose = true
)
if block_given?
yielded = yield
case yielded
when :be_quiet
be_verbose = false
end
end
if file.is_a? Array
file.each {|this_file|
copy_file(this_file, where_to, be_verbose)
}
else
if file.is_a? Hash
if file.has_key? :to
where_to = file.delete(:to)
end
if file.has_key? :from
file = file.delete(:from)
if File.directory?(file)
file = Dir["#{file}*"]
end
end
if file.empty?
file = ''.dup
end
end
if file.is_a? Array
file.flatten.each {|entry|
copy_file(entry, where_to, be_verbose)
}
else
file = file.to_s.dup
case where_to
when '.'
where_to = return_pwd
end
if File.directory? where_to
where_to << '/' unless where_to.end_with? '/'
end
if File.exist? file
if be_verbose
e "#{rev}Now copying `#{sfile(file)}#{rev}` "\
"to `#{sfile(where_to)}#{rev}`."
end
FileUtils.cp(file, where_to)
else
e "#{rev}Can not copy, as the file at `#{file}#{rev}` does not exist."
end
end
end
end
|
.copy_setup_file_to_pwd ⇒ Object
#
Roebe.copy_setup_file_to_pwd
This method will copy the old setup.rb file to the pwd.
Note that Roebe.cpruby is an alias to this method.
#
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/roebe/toplevel_methods/setup.rb', line 22
def self.copy_setup_file_to_pwd
path_to_the_setup_rb_file = "#{PROJECT_BASE_DIRECTORY}setup/setup.rb"
if block_given?
yielded = yield
case yielded
when :be_verbose
e 'Now copying the file '+sfile(path_to_the_setup_rb_file)
e 'to the current working directory.'
end
end
FileUtils.cp(
path_to_the_setup_rb_file,'.'
)
end
|
.copy_setup_rb_file ⇒ Object
#
Roebe.copy_setup_rb_file
This method will copy the setup.rb file to the current directory.
#
16
17
18
19
20
21
|
# File 'lib/roebe/toplevel_methods/copy_setup_rb_file.rb', line 16
def self.copy_setup_rb_file
copy_file(
'/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/roebe/lib/roebe/toplevel_methods/setup.rb',
Dir.pwd
)
end
|
.copy_the_linux_kernel ⇒ Object
#
Roebe.copy_the_linux_kernel
This method will just copy relevant files onto /boot/, in particular bzImage and System.map.
#
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/roebe/toplevel_methods/copy_the_linux_kernel.rb', line 18
def self.copy_the_linux_kernel
current_directory = Dir.pwd
linux_version = File.basename(current_directory)
if linux_version.include? '-'
linux_version = linux_version.split('-').last
end
target = '/boot/vmlinuz-'+linux_version.to_s
cp('arch/x86_64/boot/bzImage', target)
target_for_the_new_system_map_file = "/boot/System.map-#{linux_version}"
e 'Coping System.map onto '+target_for_the_new_system_map_file+' next.'
cp('System.map', target_for_the_new_system_map_file)
end
|
.cp_to_here(copy_what = ARGV) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/roebe/toplevel_methods/cp_to_here.rb', line 16
def self.cp_to_here(
copy_what = ARGV
)
if copy_what.is_a? Array
copy_what.each {|entry| cp_to_here(entry) }
else
require 'rbt'
_ = RBT::Compile.new(copy_what) { :do_not_run_yet }
path = _.cookbook_dataset_program_path?
e 'Using this path: '+steelblue(path)
cp(path, '.')
end
end
|
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 173
def self.
_ = ''.dup
_ << '#include <iostream>
using namespace std;
int main()
{
return 0;
} // g++ foo*.cpp
'
e _
set_xorg_buffer(_)
end
|
.crazy_make_mode ⇒ Object
#
Roebe.crazy_make_mode
This method is possibly fairly useless to most people, but I needed it in order to chroot-compile a program, and automatically copy the correct .h files into the /usr/include/ hierarchy.
This mode depends on the gem called “rbt”.
#
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/roebe/toplevel_methods/crazy_make_mode.rb', line 21
def self.crazy_make_mode
require 'rbt'
result = `make 2>&1`.split(N)
result.select! {|line|
line.include?('fatal error:') and
line.include?('No such file or directory')
}
if Object.const_defined? :RBT
unless RBT.const_defined? :ConfigLogParser
require 'rbt/utility_scripts/config_log_parser.rb'
end
regex_to_use = RBT::ConfigLogParser::REGEX_FOR_MISSING_HEADER_FILES
first = result.first
first =~ regex_to_use
this_file_appears_to_be_missing = $1.to_s.dup
unless this_file_appears_to_be_missing.empty?
e 'This file appears to be missing:'
e
e " #{swarn(this_file_appears_to_be_missing)}"
e
backup_include_dir = '/BACKUP_INCLUDE_DIR/'
if on_roebe? and File.directory? backup_include_dir
e 'Coping this file next.'
from = backup_include_dir+this_file_appears_to_be_missing
to = "/usr/include/#{this_file_appears_to_be_missing}"
copy_file(from, to)
end
end
end
end
|
#
Roebe.crc32
This method depends on zlib.
The input argument is assumed to be a String.
Invocation example:
Roebe.crc32('Hello world!')
#
435
436
437
438
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 435
def self.crc32(i)
require 'zlib' unless Object.const_defined?(:Zlib)
return Zlib.crc32(i)
end
|
.create_desktop_file_for(this_program) ⇒ Object
#
Roebe.create_desktop_file_for
Easier top-level method to create a .desktop file.
#
228
229
230
|
# File 'lib/roebe/classes/create_desktop_file.rb', line 228
def self.create_desktop_file_for(this_program)
Roebe::CreateDesktopFile.new(this_program)
end
|
.create_directories ⇒ Object
#
Roebe.create_directories (idirs tag, generate_my_directories tag)
This method creates my default directories, for use in a HiveOS-like system (my directories).
Usage example (from bash shell):
create_dirs
#
.create_directory(i, be_verbose = false) ⇒ Object
#
Roebe.create_directory
This method will try to create a directory (or several directories), by delegating onto FileUtils.mkdir_p().
#
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/roebe/toplevel_methods/create_directory.rb', line 18
def self.create_directory(
i, be_verbose = false
)
case be_verbose
when :be_verbose
be_verbose = true
end
if i.is_a? Array
i.each {|entry| create_directory(entry, be_verbose) }
else
if be_verbose and !File.directory?(i)
e 'Creating the directory '+sdir(i)+' next.'
end
FileUtils.mkdir_p(i)
end
end
|
.create_directory_layout(use_this_as_the_directory_structure = :use_the_roebe_project_in_order_to_infer_the_directory_structure) ⇒ Object
#
Roebe.create_directory_layout
Create my default directory layout scheme.
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/roebe/toplevel_methods/create_directory_layout.rb', line 20
def self.create_directory_layout(
use_this_as_the_directory_structure =
:use_the_roebe_project_in_order_to_infer_the_directory_structure
)
case use_this_as_the_directory_structure
when :use_the_roebe_project_in_order_to_infer_the_directory_structure
begin
require 'yaml'
this_file = Roebe.file_directory_structure
use_this_as_the_directory_structure = YAML.load_file(this_file)
rescue LoadError
if is_on_roebe?
this_file = ::Roebe.file_directory_structure
if File.exist? this_file
use_this_as_the_directory_structure = YAML.load_file(this_file)
else
e "The file #{sfile(this_file)} does not exist."
end
else
e 'The roebe project is not available. Consider installing it.'
e
e ' gem install roebe'
e
end
end
end
unless use_this_as_the_directory_structure.is_a? Symbol
create_directory(use_this_as_the_directory_structure, :be_verbose)
end
end
|
.create_firefox_extension(i = ARGV) ⇒ Object
#
Roebe.create_firefox_extension
#
169
170
171
|
# File 'lib/roebe/classes/create_firefox_extension.rb', line 169
def self.create_firefox_extension(i = ARGV)
::Roebe::CreateFirefoxExtension.new(i)
end
|
.create_games_iso(i = '--default') ⇒ Object
#
Roebe.create_games_iso
#
299
300
301
|
# File 'lib/roebe/classes/create_iso_for_games.rb', line 299
def self.create_games_iso(i = '--default')
::Roebe::CreateIsoForGames.new(i)
end
|
.create_iso(i = DEFAULT_DIRECTORY, run_already = :default, &block) ⇒ Object
193
194
195
196
197
|
# File 'lib/roebe/classes/create_iso.rb', line 193
def self.create_iso(
i = DEFAULT_DIRECTORY, run_already = :default, &block
)
::Roebe::CreateISO.new(i, run_already, &block)
end
|
.create_lua_pc_file ⇒ Object
#
Roebe.create_lua_pc_file
#
.create_mad_pkgconfig_file(store_where = '/usr/lib/pkgconfig/mad.pc', use_this_prefix = '/usr') ⇒ Object
#
Roebe.create_mad_pkgconfig_file
The first argument denotes where this will be stored.
#
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 560
def self.create_mad_pkgconfig_file(
store_where = '/usr/lib/pkgconfig/mad.pc',
use_this_prefix = '/usr'
)
store_what = 'prefix='+use_this_prefix+'
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}'
write_what_into(store_what, store_where)
e 'Storing into `'+sfile(store_where)+'`.'
end
|
.create_my_gems(i = ARGV) ⇒ Object
124
125
126
|
# File 'lib/roebe/classes/batch_generate_all_my_gems.rb', line 124
def self.create_my_gems(i = ARGV)
Roebe::BatchGenerateAllMyGems.new(i)
end
|
.create_this_c_file(name_of_the_c_file = 'hello_world.c', file_content_as_string = '#include <stdio.h>
int main() {
/* This will print hello world, in C */
printf("Hello, World! \n");
return 0;
}
') ⇒ Object
#
Roebe.create_this_c_file
#
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/roebe/toplevel_methods/create_this_c_file.rb', line 14
def self.create_this_c_file(
name_of_the_c_file = 'hello_world.c',
file_content_as_string = '#include <stdio.h>
int main() {
/* This will print hello world, in C */
printf("Hello, World! \n");
return 0;
}
'
)
what = file_content_as_string
into = name_of_the_c_file
e "Generating the file `#{sfile(into)}` next."
write_what_into(what, into)
end
|
.create_wpa_supplicant_build_file(into = 'wpa_supplicant/.config') ⇒ Object
#
Roebe.create_wpa_supplicant_build_file
#
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 237
def self.create_wpa_supplicant_build_file(
into = 'wpa_supplicant/.config'
)
what = "CONFIG_BACKEND=file
CONFIG_CTRL_IFACE=y
CONFIG_DEBUG_FILE=y
CONFIG_DEBUG_SYSLOG=y
CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
CONFIG_DRIVER_NL80211=y
CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_WIRED=y
CONFIG_EAP_GTC=y
CONFIG_EAP_LEAP=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_OTP=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TLS=y
CONFIG_EAP_TTLS=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_IPV6=y
CONFIG_LIBNL32=y
CONFIG_PEERKEY=y
CONFIG_PKCS12=y
CONFIG_READLINE=y
CONFIG_SMARTCARD=y
CONFIG_WPS=y
CFLAGS += -I/usr/include/libnl3
"
unless File.directory?(File.dirname(into))
into = File.basename(into)
end
e "#{rev}Storing into `#{sfile(into)}`."
write_what_into(what, into)
end
|
.create_zip(i) ⇒ Object
109
110
111
|
# File 'lib/roebe/classes/create_zip.rb', line 109
def self.create_zip(i)
Roebe::CreateZip.new(i)
end
|
.current_stable_version_of_ruby(this_file = yaml_dir?+'current_ruby_versions.yml') ⇒ Object
#
Roebe.current_stable_version_of_ruby
#
276
277
278
279
280
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 276
def self.current_stable_version_of_ruby(
this_file = yaml_dir?+'current_ruby_versions.yml'
)
YAML.load_file(this_file)['current_stable_version_of_ruby']
end
|
.custom_shebang? ⇒ Boolean
#
Roebe.custom_shebang?
#
583
584
585
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 583
def self.custom_shebang?
'#!/user/bioinf4/bin/ruby -w'
end
|
126
127
128
129
130
131
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 126
def self.cweb1
_webpage = Cyberweb::ImagesToHtml.new(
['--use-HTML-table','--table=2']
)
Open.in_browser('*.html')
end
|
136
137
138
139
140
141
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 136
def self.cweb2
_webpage = Cyberweb::ImagesToHtml.new(
['--use-HTML-table','--table=2','--use-no-size-value']
)
Open.in_browser('*.html')
end
|
146
147
148
149
150
151
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 146
def self.cweb3
_webpage = Cyberweb::ImagesToHtml.new(
['--use-HTML-table','--table=1','--use-no-size-value']
)
Open.in_browser('*.html')
end
|
.dark_shade ⇒ Object
174
175
176
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 174
def self.dark_shade
EmojiParadise.dark_shade
end
|
.date_sort_based_on_filename(array = [
%w( 22.05.2023-foobar1.mp4 22.03.2011-foobar2.mp4 )) ⇒ Object
#
Roebe.date_sort_based_on_filename
This method will sort an array of filenames, based on the date that these files have. By default we will top-sort the most recent file, so oldest files will be shown last.
So if we have “22.05.2023-foobar1.mp4” and “22.03.2011-foobar2.mp4” then this method will return a sorted Array where foobar1.mp4 will appear as first element, and foobar2.mp4 will appear as the last element.
This method was added in May 2023. The reason was that I noticed that in different of my gems I needed this functionality, so it made sense to put the code into one toplevel method that other projects could re-use, as-is.
Invocation examples:
Roebe.date_sort_based_on_filename(%w( 11.01.2021-foobar3.mp4 22.05.2023-foobar1.mp4 22.03.2011-foobar2.mp4 ))
Roebe.date_sort_based_on_filename(%w( 11.01.2021-foobar3.mp4 22.05.2023-foobar1.mp4 22.03.2011-foobar2.mp4 2000-foobar5.mp4 ))
#
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 48
def self.date_sort_based_on_filename(
array = [
%w( 22.05.2023-foobar1.mp4 22.03.2011-foobar2.mp4 )
]
)
use_this_regex = /\d{2}\.\d{2}\.\d{4}/
sorted_array = array.flatten.sort_by {|entry|
use_this_copy_for_the_comparison = nil
if entry =~ use_this_regex
else
if entry =~ /\d{4}/ entry = entry.dup if entry.frozen?
use_this_copy_for_the_comparison = entry.sub(/(\d{4})/, '01.01.\1')
end
end
if use_this_copy_for_the_comparison
scanned_result = use_this_copy_for_the_comparison.scan(use_this_regex)
else
scanned_result = entry.scan(use_this_regex)
end
time = scanned_result.flatten.first
time_parsed = ::Time.parse(time)
time_parsed
}.reverse
return sorted_array
end
|
.decompose_this_unicode_symbol(i) ⇒ Object
#
Roebe.decompose_this_unicode_symbol
Usage example:
array = (2000 .. 3000).to_a; array.each {|entry| puts Roebe.decompose_this_unicode_symbol(entry) }
#
17
18
19
20
|
# File 'lib/roebe/toplevel_methods/unicode/decompose_this_unicode_symbol.rb', line 17
def self.decompose_this_unicode_symbol(i)
value = i.to_s.to_i(16)
[ value ].pack('U*')
end
|
308
309
310
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 308
def self.
'# '+('='*78)+' #'
end
|
.default_file_read(i) ⇒ Object
#
Roebe.default_file_read
#
350
351
352
353
354
355
|
# File 'lib/roebe/toplevel_methods/files.rb', line 350
def self.default_file_read(i)
return File.read(
i,
encoding: 'UTF-8'
)
end
|
.determine_whether_colours_will_be_used_based_on_the_file_use_colours(use_this_file = FILE_USE_COLOURS) ⇒ Object
#
Roebe.determine_whether_colours_will_be_used_based_on_the_file_use_colours
The first argument to this method should be a .yml file.
#
64
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/roebe/colours/colours.rb', line 64
def self.determine_whether_colours_will_be_used_based_on_the_file_use_colours(
use_this_file = FILE_USE_COLOURS
)
if File.exist? use_this_file
@use_colours = YAML.load_file(use_this_file)
if @use_colours == true
Roebe.try_to_require_the_colours_project
end
else
@use_colours = false
end
end
|
.dhcpcd(i = ARGV) ⇒ Object
220
221
222
|
# File 'lib/roebe/classes/dhcpcd/dhcpcd.rb', line 220
def self.dhcpcd(i = ARGV)
Dhcpcd.new(i)
end
|
.directory_roebe_yaml_pdf? ⇒ Boolean
#
Roebe.directory_roebe_yaml_pdf?
#
31
32
33
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 31
def self.directory_roebe_yaml_pdf?
DIRECTORY_ROEBE_YAML_PDF
end
|
.disable(*i) ⇒ Object
#
disable (disable tag)
#
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/roebe/toplevel_methods/disable.rb', line 14
def self.disable(*i)
if i.is_a? Array
i = i.join(' ').strip
end
case i.to_s when /^colours?$/i
disable_colours { :be_verbose }
end
end
|
.disable_colours ⇒ Object
#
Roebe.disable_colours
#
47
48
49
|
# File 'lib/roebe/colours/colours.rb', line 47
def self.disable_colours
@use_colours = false
end
|
.display_mbr ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/display_mbr.rb', line 15
def self.display_mbr
e "#{rev}Displaying the content of this computer's MBR next:"
cliner
result = File.open('/dev/sda') {|f| f.read(512) } pp result
if result.include? 'LILO'
e
e "#{rev}This MBR uses LILO (the Linux Loader) as its bootloader."
e
end
cliner
return result
end
|
.display_unicode_snowman ⇒ Object
#
Roebe.display_unicode_snowman
For commandline display, this could work:
roebe --snowman
#
23
24
25
|
# File 'lib/roebe/toplevel_methods/unicode/display_unicode_snowman.rb', line 23
def self.display_unicode_snowman
e return_unicode_snowman
end
|
.do_compile_this_java_file_statically(work_on_these_files) ⇒ Object
#
Roebe.do_compile_this_java_file_statically
This method can be used to compile a .java file or an array of .java files into native executables, if GraalVM is installed as well as native-image is available.
This presently (in the year 2022) only works on Linux; it remains to be seen if - and when - this will be supported on windows.
#
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/roebe/commandline/misc.rb', line 24
def self.do_compile_this_java_file_statically(
work_on_these_files
)
require 'roebe/classes/run/run.rb'
work_on_these_files = [work_on_these_files].flatten.compact
work_on_these_files.each {|work_on_this_file|
cd File.dirname(work_on_this_file)
e rev+'Next delegating towards class '+
steelblue('Roebe::Run')+'.'
Roebe::Run.new([
File.basename(work_on_this_file),
'--static-image'
])
raw_filename = File.basename(work_on_this_file).
downcase.delete_suffix(
File.extname(work_on_this_file)
)
e 'Next relocating the file towards `'+
sfile(log_dir?+raw_filename)+'`.'
move_file(raw_filename, log_dir?)
}
end
|
.do_use_unicode_environment ⇒ Object
#
Roebe.do_use_unicode_environment
#
36
37
38
|
# File 'lib/roebe/toplevel_methods/env.rb', line 36
def self.do_use_unicode_environment
@env['LC_ALL'] = ENV['LC_ALL'] = 'en_US.utf8'
end
|
.does_this_program_exist?(i = nil) ⇒ Boolean
#
Roebe.does_this_program_exist?
The argument to this method should be the name of the program, such as “htop” or “zlib”.
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/roebe/toplevel_methods/does_this_program_exist.rb', line 20
def self.does_this_program_exist?(
i = nil
)
i = i.first if i.is_a? Array
if i
file_location = nil
return_value = false
path = path?
if path
splitted_path = path.split(':')
splitted_path.each {|entry|
location = rds(entry.to_s+'/'+i.to_s)
if File.exist? location
return_value = true
file_location = location
return [return_value, file_location] end
} unless i.to_s.empty?
else
e 'No PATH variable seems to exist.'
end
end
return false end
|
.does_this_terminal_support_unicode? ⇒ Boolean
#
Roebe.does_this_terminal_support_unicode?
#
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/roebe/toplevel_methods/does_this_terminal_support_unicode.rb', line 12
def self.does_this_terminal_support_unicode?
entries = ENV.values_at("LC_ALL","LC_CTYPE","LANG").compact
first_entry_downcased = entries.first.downcase
if first_entry_downcased.include?(("UTF-8").downcase.delete('-'))
e "△ \\o/ Yes this terminal supports UTF-8 \\o/ △"
else
raise "Terminal can't handle UTF-8"
end
end
|
.dosbox_config(i = ARGV) ⇒ Object
#
Roebe.dosbox_config
rinvoke dosbox_config
#
.double_low_quotation_mark ⇒ Object
#
Roebe.double_low_quotation_mark
This refers to the following symbol: „
#
902
903
904
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 902
def self.double_low_quotation_mark
EmojiParadise.send(__method__)
end
|
.downcase_all_entries_in_the_current_directory(entries = ARGV) ⇒ Object
#
Roebe.downcase_all_entries_in_the_current_directory
This method will simply downcase every entry in the current directory.
A shorter alias exists to this method, called ‘Roebe.downcase_all_entries`.
#
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/roebe/toplevel_methods/downcase_all_entries_in_the_current_directory.rb', line 21
def self.downcase_all_entries_in_the_current_directory(
entries = ARGV
)
entries = [entries].flatten.compact
entries = Dir['*'] if entries.empty?
entries.flatten!
entries.each {|entry|
to = File.basename(entry.downcase)
unless File.exist? to
e "#{rev}Downcasing from `#{sfile(entry)}` to `#{sfile(to)}`."
FileUtils.mv(entry, to)
end
}
end
|
.downcase_extension(i = ARGV) ⇒ Object
#
Roebe.downcase_extension
#
123
124
125
|
# File 'lib/roebe/classes/downcase_extension.rb', line 123
def self.downcase_extension(i = ARGV)
DowncaseExtension.new(i)
end
|
.download_autogenerated_rcfiles ⇒ Object
#
Roebe.download_autogenerated_rcfiles
To invoke this method, try:
roebe --download-autogenerated
#
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
# File 'lib/roebe/commandline/misc.rb', line 241
def self.download_autogenerated_rcfiles
remote_base_dir = 'http://shevy.bplaced.net/AUTOGENERATED/'
%w(
aliases_rc
cd_aliases_rc
programs_aliases_rc
ps1_rc
roeberia_settings_rc
ls_colours_rc
).each {|remote_url| remote_url = remote_base_dir+remote_url
e "Now downloading #{sfancy(remote_url)}"
esystem "wget #{remote_url}"
}
end
|
.download_certdata ⇒ Object
#
Roebe.download_certdata
This method can be used to download the certdata.txt file from the BLFS project.
#
17
18
19
20
21
|
# File 'lib/roebe/toplevel_methods/download_certdata.rb', line 17
def self.download_certdata
remote_url = 'http://anduin.linuxfromscratch.org/BLFS/other/certdata.txt'
_ = "wget #{remote_url}"
esystem _
end
|
.download_emojis(i = :default) ⇒ Object
#
Roebe.download_emojis
This method will download emojis, defaulting to the URL www.unicode.org/Public/emoji/4.0/.
Do note that the dataset obtained from there, via open-uri, will be filtered for only .txt files - everything else will be ignored.
#
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/roebe/toplevel_methods/download_emojis.rb', line 21
def self.download_emojis(i = :default)
if i.is_a? Array
i = i.first
end
case i
when :default, nil
i = 'http://www.unicode.org/Public/emoji/4.0/'
end
require 'open-uri'
raw_dataset = open(i).read
use_this_regex = /<a href=".+">(.+)<\/a>/ scanned = raw_dataset.scan(use_this_regex).flatten
scanned.map! {|entry| "#{i}#{entry}" }
scanned.select! {|entry| entry.end_with? '.txt' }
e 'Proceeding to download '+scanned.size.to_s+' files next:'
scanned.each {|entry|
esystem 'wget '+entry
}
end
|
.download_unicode_dataset(use_this_url = 'https://www.unicode.org/Public/UNIDATA/') ⇒ Object
#
Roebe.download_unicode_dataset
This method will download the Unicode dataset from www.unicode.org.
#
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/unicode/download_unicode_dataset.rb', line 17
def self.download_unicode_dataset(
use_this_url = 'https://www.unicode.org/Public/UNIDATA/'
)
x = Roebe.return_all_remote_entries_from_this_url(use_this_url)
e x
x.each {|remote_url|
unless remote_url.end_with?('/') or remote_url.include?('index.html')
system 'wget '+remote_url
end
}
end
|
.downwards_arrow ⇒ Object
1063
1064
1065
1066
1067
1068
1069
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1063
def self.downwards_arrow
result = "\u{2193}"
if is_on_roebe?
set_xorg_buffer(result.strip)
end
result
end
|
.draw_line(i = 5) ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/roebe/math/draw_line.rb', line 10
def self.draw_line(i = 5)
_ = ''.dup
i.times {|entry|
_ << (' '*entry)+"*\n"
}
puts _
end
|
.draw_triangle(i = 5) ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'lib/roebe/math/draw_triangle.rb', line 10
def self.draw_triangle(i = 5)
_ = ''.dup
i.times {|n_iteration| n_iteration += 1
_ << (' '* (i - n_iteration)).to_s+
('*' * n_iteration).to_s+"\n"
}
puts _
end
|
.e(i = '', make_newline = true) ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/e.rb', line 12
def self.e(
i = '',
make_newline = true
)
case make_newline
when :do_not_make_a_newline
make_newline = false
end
if i.is_a? Array
i = i.join(' ')
end
if make_newline
i = "#{i}\n"
end
print i
end
|
#
This method can be used to colourize strings that include a ‘#’ character.
To test this, try:
Roebe. 'hello # world!'
#
121
122
123
124
125
126
127
128
|
# File 'lib/roebe/colours/colours.rb', line 121
def self.(i)
if i.include? '#'
splitted = i.split '#'
e sfancy(splitted.first)+
Colours::GREY+'#'+
splitted.last+rev
end
end
|
.edir(i = '') ⇒ Object
217
218
219
|
# File 'lib/roebe/colours/colours.rb', line 217
def self.edir(i = '')
e sdir(i)
end
|
.editor? ⇒ Boolean
28
29
30
|
# File 'lib/roebe/constants/misc.rb', line 28
def self.editor?
MAIN_EDITOR_TO_USE
end
|
.efancy(i = '') ⇒ Object
192
193
194
|
# File 'lib/roebe/colours/colours.rb', line 192
def self.efancy(i = '')
e ::Roebe.sfancy(i)
end
|
.eighth_note ⇒ Object
#
Roebe.eighth_note
The symbol for this musical note will be: ♪
#
875
876
877
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 875
def self.eighth_note
EmojiParadise.send(__method__)
end
|
.email(i = ARGV) ⇒ Object
878
879
880
|
# File 'lib/roebe/classes/email.rb', line 878
def self.email(i = ARGV)
::Roebe::Email.new(i)
end
|
.email? ⇒ Boolean
15
16
17
|
# File 'lib/roebe/toplevel_methods/email.rb', line 15
def self.email?
'[email protected]'
end
|
.embeddable_interface ⇒ Object
#
Roebe.embeddable_interface
#
48
49
50
51
52
|
# File 'lib/roebe/www/embeddable_interface.rb', line 48
def self.embeddable_interface
object = Object.new
object.extend(::Roebe::EmbeddableInterface)
return object
end
|
.empty?(i = ARGF) ⇒ Boolean
73
74
75
|
# File 'lib/roebe/classes/empty.rb', line 73
def self.empty?(i = ARGF)
Roebe::Empty.new(i)
end
|
.enable(*i) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/roebe/toplevel_methods/enable.rb', line 14
def self.enable(*i)
if i.is_a? Array
i = i.join(' ').strip
end
case i.to_s when /^colours?$/i
enable_colours { :be_verbose }
end
end
|
.encoding_iso ⇒ Object
#
Roebe.encoding_iso
Query-method towards the ISO encoding, specifically the ISO-8859-1 encoding.
#
71
72
73
|
# File 'lib/roebe/encoding/encoding.rb', line 71
def self.encoding_iso
Encoding::ENCODING_ISO
end
|
.encoding_utf8 ⇒ Object
#
Roebe.encoding_utf8
Query-method towards the UTF-8 encoding.
#
80
81
82
|
# File 'lib/roebe/encoding/encoding.rb', line 80
def self.encoding_utf8
Encoding::ENCODING_UTF
end
|
.ensure_main_encoding(i, use_this_encoding = encoding?
) ⇒ Object
#
Roebe.ensure_main_encoding
This method will ensure that the given input has the proper encoding.
It is usually used on Strings, but as can be seen in the code below, it can also be applied on Arrays and Hashes.
#
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# File 'lib/roebe/encoding/encoding.rb', line 92
def self.ensure_main_encoding(
i,
use_this_encoding = encoding?
)
if i.is_a? String
i = i.force_encoding(use_this_encoding)
elsif i.is_a? Array
i.map! {|entry| entry.force_encoding(use_this_encoding) }
elsif i.is_a? Hash
new_hash = {}
i.each_pair {|key, value|
if key.is_a? String
key = key.dup if key.frozen?
key = key.force_encoding(use_this_encoding)
end
new_hash[key] = value
}
i = new_hash end
end
|
.enter_chroot(which_variant = :depot_chroot, chroot_target = '/Depot/Chroot/', use_this_path_for_env = '/usr/bin/env') ⇒ Object
#
Roebe.enter_chroot
This method can be used to enter a chroot environment.
I am not sure whether this is possible from ruby - but at the least the shell-syntax can be shown on the commandline, which is one use case for this method here.
#
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
# File 'lib/roebe/toplevel_methods/chroot.rb', line 43
def self.enter_chroot(
which_variant = :depot_chroot, chroot_target = '/Depot/Chroot/', use_this_path_for_env = '/usr/bin/env' )
if which_variant.is_a? Array
which_variant = which_variant.first
end
if which_variant.nil?
which_variant = :default end
if File.directory?(chroot_target) and
Dir.empty?(chroot_target) and
is_on_roebe?
chroot_target = '/Depot/Chroot/'
elsif which_variant and
which_variant.is_a?(String) and
File.directory?(which_variant)
chroot_target = which_variant
which_variant = :local_chroot
end
path_to_bash = '/usr/bin/bash'
case which_variant when :local_chroot,
:local,'local',':local',
:depot_chroot,':depot_chroot','depot_chroot',
:default
if is_on_roebe?
make_nodes_and_mount_dev_entries(chroot_target)
end
_ = <<-EOF
chroot "#{chroot_target}" #{use_this_path_for_env} -i HOME=/root TERM="$TERM" PS1='$(pwd)' PATH=/usr/bin:/bin:/sbin:/usr/sbin:/tools/bin #{path_to_bash} --login +h
EOF
when :toolchain,'toolchain',':toolchain'
chroot_target = '/home/Programs/Toolchain/'
use_this_path_for_env = '/bin/env'
path_to_bash = '/bin/bash'
_ = <<-EOF
chroot "#{chroot_target}" #{use_this_path_for_env} -i HOME=/root TERM="$TERM" PS1='$(pwd)' PATH=/usr/bin:/bin:/sbin:/usr/sbin:/tools/bin #{path_to_bash} --login +h
EOF
when /^-?-?usb1$/i
_ = <<-EOF
chroot "#{ENV['MOUNT_USB1']}" #{use_this_path_for_env} -i HOME=/root TERM="$TERM" PS1='$(pwd)' PATH=/usr/bin:/bin:/sbin:/usr/sbin:/tools/bin #{path_to_bash} --login +h
EOF
when :lfs_first_stage
_ = <<-EOF
chroot "$LFS" /tools/bin/env -i HOME=/root TERM="$TERM" PS1='$(pwd)' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h
EOF
end
if _
_ = _.dup if _.frozen?
_.strip!
cmd = _.strip.delete("\n").strip
target_for_autogenerated = "#{chroot_target}AUTOGENERATED/"
if is_on_roebe? and
File.directory?('/AUTOGENERATED/') and
!File.directory?(target_for_autogenerated)
e
e "#{rev}No directory exists at #{sdir(target_for_autogenerated)}."
e "Generating it, then copying the content from #{sdir('/AUTOGENERATED/')}"
e 'as this is useful for my home system(s).'
e
mkdir(target_for_autogenerated)
copy_files(
from: '/AUTOGENERATED/',
to: "#{chroot_target}AUTOGENERATED/"
)
end
e
e "#{rev}Next entering the chroot target at #{steelblue(chroot_target)}."
e
esystem cmd
e
else
e 'Something went wrong. The command would have been:'
e
e sfancy(" #{_}")
e
end
end
|
.env? ⇒ Boolean
20
21
22
|
# File 'lib/roebe/toplevel_methods/env.rb', line 20
def self.env?
@env
end
|
.eparse(i) ⇒ Object
117
118
119
|
# File 'lib/roebe/commandline/help.rb', line 117
def self.eparse(i)
::Colours.eparse(i)
end
|
.error_line? ⇒ Boolean
130
131
132
|
# File 'lib/roebe/constants/misc.rb', line 130
def self.error_line?
'2>&1'
end
|
.esystem(i) ⇒ Object
#
Roebe.esystem
This method will simply combine e (aka puts) with a call to system().
That way we can run a verbose system command on the target computer.
#
17
18
19
20
|
# File 'lib/roebe/toplevel_methods/esystem.rb', line 17
def self.esystem(i)
e i
system i
end
|
.expand_this_array(array) ⇒ Object
#
Roebe.expand_this_array
#
10
11
12
13
14
15
16
|
# File 'lib/roebe/math/binning.rb', line 10
def self.expand_this_array(array)
array.map {|inner_entry| inner_entry.map {|most_inner_entry|
[most_inner_entry.size, most_inner_entry]
}
}
end
|
#
The first path should be the location to a ruby .gem file. This is a mandatory argument, so it must always be supplied.
#
175
176
177
|
# File 'lib/roebe/classes/extract_gem_file.rb', line 175
def self.(this_gem_file)
Roebe::ExtractGemFile.new(this_gem_file)
end
|
44
45
46
47
48
49
50
51
|
# File 'lib/roebe/toplevel_methods/extract.rb', line 44
def self.(i, to = Dir.pwd)
begin
require 'extracter'
rescue LoadError; end
Extracter.(
File.basename(i), to
)
end
|
#
This method will perform the actual extract-action on an archive. Since as of June 2012 we will use class Extracter for this task.
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/roebe/toplevel_methods/extract.rb', line 20
def self.(
what,
to = return_pwd,
optional_use_this_colour = nil )
begin
require 'extracter'
rescue LoadError; end
begin
require 'extracter/extracter.rb'
rescue LoadError; end
e "Now extracting #{sfile(what.to_s)}."
_ = ::Extracter.new(what, to, :dont_run_yet) if optional_use_this_colour
_.set_colour_for_directories(optional_use_this_colour)
end
_.run
return _.
end
|
.face_with_tears_of_joy ⇒ Object
#
Roebe.face_with_tears_of_joy
puts Colours.crimson(Roebe.face_with_tears_of_joy)
#
143
144
145
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 143
def self.face_with_tears_of_joy
EmojiParadise.send(__method__)
end
|
.face_without_mouth ⇒ Object
#
Roebe.face_without_mouth
An emoji.
Usage example:
puts Colours.gold(Roebe.face_without_mouth*40)
#
595
596
597
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 595
def self.face_without_mouth
EmojiParadise.send(__method__)
end
|
.fast_fibonacci(i) ⇒ Object
#
Roebe.fast_fibonacci
This implementation is significantly faster than the traditional fibonacci. It is also aliased via Roebe.fibonacci().
You can visit the following homepage for an explanation of how this aogirthm works:
https://www.nayuki.io/page/fast-fibonacci-algorithms
#
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# File 'lib/roebe/toplevel_methods/fibonacci.rb', line 77
def self.fast_fibonacci(i)
if i.is_a? Array
i = i.first
end
i = i.to_i if i.is_a? String
if i <= 0
e 'Please provide a number larger than 0.'
else
fast_fibonacci_implementation(i)[0]
end
end
|
.fast_fibonacci_implementation(i) ⇒ Object
#
Roebe.fast_fibonacci_implementation
This is the “internal” implementation.
An Array will be returned.
#
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/roebe/toplevel_methods/fibonacci.rb', line 16
def self.fast_fibonacci_implementation(i)
i = i.to_i if i == 0
[0, 1]
else
a, b = fast_fibonacci_implementation(i / 2)
c = a * (b * 2 - a)
d = a * a + b * b
if i % 2 == 0
[c, d]
else
[d, c + d]
end
end
end
|
.feedback_base_dir ⇒ Object
#
Roebe.feedback_base_dir
This method will feedback some generic-template that can be used to create some ruby file.
#
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 93
def self.feedback_base_dir
unless Object.const_defined? :XorgBuffer
require 'xorg_buffer/module'
end
project_name = File.basename(Dir.pwd)
if project_name.include? '-'
project_name = project_name.split('-').first
end
result = ''
result << " BASE_DIR = File.absolute_path(File.dirname(__FILE__)+'/..')+'/'"+N
result << " YAML_DIRECTORY = YAML_DIR = BASE_DIR+'yaml/'"+N
result << ' or'+N
result << ' PROJECT_BASE_DIRECTORY = Pathname(__FILE__).dirname.realpath.to_s'+N
result << ' or'+N
result << " File.expand_path('..', __FILE__) # In the project base directory."+N
result << ' or'+N
result << " PROJECT_BASE_DIRECTORY = RbConfig::CONFIG['sitelibdir']+'/name_of_project/'"+N
result << ' or'+N
result << ''+N
module_string = ''
module_string << 'module '+project_name.to_camelcase+
" # require '"+project_name.downcase+"/project.rb'"+N
module_string << ''+N
module_string << ' # '+(73)+' #'+N
module_string << ' # === PROJECT_BASE_DIRECTORY'+N
module_string << ' # '+(73)+' #'+N
module_string << " PROJECT_BASE_DIRECTORY = RbConfig::CONFIG['sitelibdir']+'/"+project_name+"/'"+N
module_string << ''+N
module_string << ' # '+(73)+' #'+N
module_string << ' # === '+project_name.to_camelcase+'.project_base_dir?'+N
module_string << ' # '+(73)+' #'+N
module_string << ' def self.project_base_dir?'+N
module_string << ' PROJECT_BASE_DIRECTORY'+N
module_string << ' end'+N
module_string << ''+N
module_string << 'end'+N
module_string << ' # Store the above into a file called '+sfancy('project_base_directory.rb')+N
XorgBuffer.set_buffer(module_string)
result << module_string
e result
end
|
.file_binary_to_hexadecimal ⇒ Object
#
Roebe.file_binary_to_hexadecimal
#
148
149
150
|
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 148
def self.file_binary_to_hexadecimal
"#{project_yaml_directory?}binary_to_hexadecimal/binary_to_hexadecimal.csv"
end
|
.file_binäre_einheiten ⇒ Object
#
Roebe.file_binäre_einheiten
#
155
156
157
|
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 155
def self.file_binäre_einheiten
"#{project_yaml_directory?}binäre_einheiten/binäre_einheiten.yml"
end
|
63
64
65
|
# File 'lib/roebe/constants/roebe.rb', line 63
def self.file_contacts
FILE_CONTACTS_YAML
end
|
.file_directory_structure ⇒ Object
#
Roebe.file_directory_structure
#
122
123
124
|
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 122
def self.file_directory_structure
"#{Roebe.project_base_dir?}yaml/directory_structure.yml"
end
|
.file_does_not_exist(i) ⇒ Object
#
Roebe.file_does_not_exist
Consistently use this method here, or one of the aliases to it, when a file does not exist.
That way, we gain a simple and unified way to report missing files.
#
211
212
213
|
# File 'lib/roebe/toplevel_methods/files.rb', line 211
def self.file_does_not_exist(i)
e "#{swarn('No file called')} #{sfile(i)} #{swarn('could be found.')}"
end
|
.file_holidays ⇒ Object
129
130
131
|
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 129
def self.file_holidays
"#{Roebe.project_base_dir?}yaml/holidays/holidays.yml"
end
|
.file_kernel ⇒ Object
#
Roebe.file_kernel
This method will yield a string (a path) such as:
/usr/lib/ruby/site_ruby/3.0.0/roebe/yaml/kernel/kernel.yml
#
141
142
143
|
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 141
def self.file_kernel
"#{project_yaml_directory?}kernel/kernel.yml"
end
|
.file_network ⇒ Object
100
101
102
|
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 100
def self.file_network
"/home/x/data/personal/yaml/network/network.yml"
end
|
.file_pdf1? ⇒ Boolean
60
61
62
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 60
def self.file_pdf1?
"#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf1.yml"
end
|
.file_pdf2? ⇒ Boolean
67
68
69
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 67
def self.file_pdf2?
"#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf2.yml"
end
|
.file_pdf3? ⇒ Boolean
74
75
76
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 74
def self.file_pdf3?
"#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf3.yml"
end
|
.file_pdf4? ⇒ Boolean
81
82
83
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 81
def self.file_pdf4?
"#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf4.yml"
end
|
.file_pdf5? ⇒ Boolean
88
89
90
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 88
def self.file_pdf5?
"#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf5.yml"
end
|
.file_pdf6? ⇒ Boolean
95
96
97
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 95
def self.file_pdf6?
"#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf6.yml"
end
|
.file_pdf7? ⇒ Boolean
102
103
104
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 102
def self.file_pdf7?
"#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf7.yml"
end
|
.file_pdf8? ⇒ Boolean
109
110
111
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 109
def self.file_pdf8?
"#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf8.yml"
end
|
.file_pdf9? ⇒ Boolean
116
117
118
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 116
def self.file_pdf9?
"#{RUBY_SRC}roebe/lib/roebe/yaml/pdf/pdf9.yml"
end
|
.file_roeberia_settings ⇒ Object
#
Roebe.file_roeberia_settings
#
70
71
72
|
# File 'lib/roebe/constants/roebe.rb', line 70
def self.file_roeberia_settings
"#{ROEBE_PERSONAL_DIRECTORY}yaml/roeberia_settings.yml"
end
|
.file_these_pdf_files_were_opened ⇒ Object
#
Roebe.file_these_pdf_files_were_opened
#
107
108
109
|
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 107
def self.file_these_pdf_files_were_opened
"#{log_directory?}these_pdf_files_were_opened.yml"
end
|
.find_duplicate_entries_in_alias_file(i) ⇒ Object
#
Roebe.find_duplicate_entries_in_alias_file
#
.find_expanded_alias(i = ARGV) ⇒ Object
#
Roebe.find_expanded_alias
The first argument should be the alias that we are searching for.
#
.firefox(this_remote_url = ARGV) ⇒ Object
39
40
41
|
# File 'lib/roebe/browser/firefox.rb', line 39
def self.firefox(this_remote_url = ARGV)
Roebe::Firefox.new(this_remote_url)
end
|
.fix_iptables6 ⇒ Object
336
337
338
339
340
341
342
343
344
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 336
def self.fix_iptables6
esystem 'ip6tables --policy INPUT ACCEPT;'
esystem 'ip6tables --policy OUTPUT ACCEPT;'
esystem 'ip6tables --policy FORWARD ACCEPT;'
esystem 'ip6tables -Z; # zero counters'
esystem 'ip6tables -F; # flush (delete) rules'
esystem 'ip6tables -X; # delete all extra chains'
end
|
.foto_searcher(i = ARGV) ⇒ Object
343
344
345
|
# File 'lib/roebe/classes/foto_searcher.rb', line 343
def self.foto_searcher(i = ARGV)
Roebe::FotoSearcher.new(i)
end
|
.fragments(i = nil) ⇒ Object
133
134
135
|
# File 'lib/roebe/classes/fragment_maker.rb', line 133
def self.fragments(i = nil)
Roebe::FragmentMaker.new(i)
end
|
.full_block ⇒ Object
97
98
99
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 97
def self.full_block
EmojiParadise.full_block
end
|
347
348
349
350
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 347
def self.geas_it
require 'lpc'
Lpc::Geas::Forum.run_in_loop
end
|
315
316
317
318
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 315
def self.geas_it2
require '/home/x/data/rpg/MUDS/GEAS/geas_forum.rb'
Lpc::GeasForum.run_in_loop :background
end
|
.gem_install(use_this_command_to_install_the_gem = ::Roebe.gem_install_command, also_output_the_cmd = true) ⇒ Object
#
Roebe.gem_install
Use this method if you wish to install a ruby .gem archive.
#
327
328
329
330
331
332
333
334
335
336
337
|
# File 'lib/roebe/classes/update.rb', line 327
def self.gem_install(
use_this_command_to_install_the_gem = ::Roebe.gem_install_command,
also_output_the_cmd = true
)
if Dir['*.gem'].size > 0
cmd = use_this_command_to_install_the_gem+' *.gem'
cmd.squeeze!(' ')
puts cmd if also_output_the_cmd
system cmd
end
end
|
.gem_install_command ⇒ Object
#
Roebe.gem_install_command
#
294
295
296
|
# File 'lib/roebe/classes/update.rb', line 294
def self.gem_install_command
@gem_install_command
end
|
.generate_aliases(i = :for_windows) ⇒ Object
#
Roebe.generate_aliases
Usage example:
Roebe.generate_aliases(:linux)
#
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 184
def self.generate_aliases(
i = :for_windows
)
case i
when :for_windows,
:windows,
:default
require 'roebe/classes/doskey_generator.rb'
Roebe::DoskeyGenerator.new
when :for_linux,
:linux
require 'rcfiles'
Rcfiles.run
end
end
|
.generate_aliases_for_windows ⇒ Object
#
Roebe.generate_aliases_for_windows
#
215
216
217
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 215
def self.generate_aliases_for_windows
::Roebe.generate_aliases(:for_windows)
end
|
.generate_alsa_conf(i = ARGV) ⇒ Object
#
Roebe.generate_alsa_conf
#
125
126
127
|
# File 'lib/roebe/classes/generate_alsa_conf.rb', line 125
def self.generate_alsa_conf(i = ARGV)
Roebe::GenerateAlsaConf.new(i)
end
|
.generate_fluxbox_apps_file(&block) ⇒ Object
#
Roebe.generate_fluxbox_apps_file
#
147
148
149
|
# File 'lib/roebe/classes/fluxbox/generate_fluxbox_apps_file.rb', line 147
def self.generate_fluxbox_apps_file(&block)
Roebe::GenerateFluxboxAppsFile.new(&block)
end
|
.generate_fluxbox_keys_and_apps_file ⇒ Object
#
Roebe.generate_fluxbox_keys_and_apps_file
#
.generate_fluxbox_keys_file ⇒ Object
#
Roebe.generate_fluxbox_keys_file
#
102
103
104
|
# File 'lib/roebe/classes/fluxbox/generate_fluxbox_keys_file.rb', line 102
def self.generate_fluxbox_keys_file
Roebe::GenerateFluxboxKeysFile.new
end
|
.generate_ginger_the_cat_html_page(from_this_page = 'http://localhost/programming/ruby/src/roebe/lib/roebe/www/ginger_der_bandit/ginger_der_bandit.cgi') ⇒ Object
#
Roebe.generate_ginger_the_cat_html_page
This method will create a local webpage for “Ginger the cat”.
Usage example:
Roebe.generate_ginger_the_cat_html_page
#
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 747
def self.generate_ginger_the_cat_html_page(
from_this_page =
'http://localhost/programming/ruby/src/roebe/lib/roebe/www/ginger_der_bandit/ginger_der_bandit.cgi'
)
require 'open-uri'
what = URI.open(from_this_page).read
into = 'ginger_the_cat.html'
e ::Colours.rev+'Storing into the file `'+sfile(into)+'`.'
write_what_into(what, into)
if is_on_roebe? and File.exist?(into)
begin
require 'open'
Open.in_browser(into)
rescue LoadError; end
end
end
|
.generate_html_table_for_individuelles_curriculum ⇒ Object
#
Roebe.generate_html_table_for_individuelles_curriculum
“Generate” the HTML Table for the “individuelles Curriculum”.
#
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 212
def self.generate_html_table_for_individuelles_curriculum
_file_with_thelectures = '/DATEI_MIT_DEN_EINZELNEN_LEHRVERANSTALTUNGEN.md'
dataset = File.read(_file_with_thelectures)
splitted = dataset.split("---\n")
_ = ''
splitted.each_with_index {|inner_dataset, index|
index += 8
_inner_split = inner_dataset.split("\n")
_lv_name = inner_split[0]
_lva_typ = inner_split[1]
_n_ects = inner_split[2]
_n_semesterwochenstunden = inner_split[3]
_university = inner_split[4]
_ << '<tr>'+N
_ << '<td class="bold">'+index.to_s+'</td>'+N
_ << '<td>'+lv_nummer.to_s+'</td>'+N
_ << '<td>'+N
_ << '<a href="https://online.boku.ac.at/BOKUonline/wblv.wbShowLvDetail?pStpSpNr=274548">'+N
}
end
|
.generate_konsole_css_file(save_into_this_file = 'konsole.css', use_this_colour = :skyblue) ⇒ Object
#
Roebe.generate_konsole_css_file
The second argument specifies which colour is to be used for the active tab.
To invoke this method from the commandline, do:
roebe --generate-konsole-css-file
Then you can load this into KDE konsole. Go to:
Settings -> Configure Konsole -> TabBar
Specify the path to this css file, then activate the checkbox
and click on "Apply".
Most html-colours appear to work - at the least skyblue and others.
#
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# File 'lib/roebe/toplevel_methods/generate_konsole_css_file.rb', line 32
def self.generate_konsole_css_file(
save_into_this_file = 'konsole.css',
use_this_colour = :skyblue
)
into = save_into_this_file
what = "
QTabBar::tab {
font-size: 12px;
/* Minimum width for every tab */
min-width: 62px;
}
QTabBar::tab:selected {
background: #{use_this_colour.to_s};
color: black;
/* If bold font is useful, then uncomment the next line */
/* font: bold; */
/* Show a cute little bottom-border onto the selected tab */
/* border-top: 1px solid orchid; */
/* border-bottom: 1px solid orchid; */
}"
e "#{rev}Now storing into the file `#{sfile(into)}`."
write_what_into(what, into)
if is_on_roebe? and Dir.pwd.include?('root') and
false
write_what_into(what, 'konsole2.css')
e "#{rev}Now storing into the file `#{sfile('konsole2.css')}#{rev}`."
end
end
|
.generate_lighttpd_configuration ⇒ Object
#
Roebe.generate_lighttpd_configuration
This method can be used to generate the lighttpd-specific configuration file.
#
.generate_liloconfig ⇒ Object
#
Roebe.generate_liloconfig
#
181
182
183
184
|
# File 'lib/roebe/commandline/misc.rb', line 181
def self.generate_liloconfig
require 'roebe/classes/lilo_config_generator.rb'
Roebe::LiloConfigGenerator.new
end
|
.generate_locales ⇒ Object
84
85
86
|
# File 'lib/roebe/classes/generate_locales.rb', line 84
def self.generate_locales
Roebe::GenerateLocales.new
end
|
.generate_ls_colors ⇒ Object
#
Roebe.generate_ls_colors
#
79
80
81
|
# File 'lib/roebe/classes/generate_ls_colors.rb', line 79
def self.generate_ls_colors
Roebe::GenerateLsColors.new
end
|
.generate_nano_config ⇒ Object
#
Roebe.generate_nano_config
#
163
164
165
|
# File 'lib/roebe/classes/nano_config.rb', line 163
def self.generate_nano_config
GenerateNanoConfig.new
end
|
.generate_protocols ⇒ Object
#
Roebe.generate_protocols
#
245
246
247
|
# File 'lib/roebe/classes/generate_protocols.rb', line 245
def self.generate_protocols
Roebe::GenerateProtocols.new
end
|
.generate_the_cfdg_files ⇒ Object
#
Roebe.generate_the_cfdg_files
This method will ultimately delegate towards ImageParadise, for the batch-generation of the various .cfdg files.
This also means that the ImageParadise gem has to have been installed onto the target computer system at hand.
#
136
137
138
139
140
141
|
# File 'lib/roebe/commandline/misc.rb', line 136
def self.generate_the_cfdg_files
require 'image_paradise'
Dir['/home/x/DATA/images/cfdg/*.cfdg'].each {|this_cfdg_file|
ImageParadise::ConfreeGenerator.new(this_cfdg_file) { :do_not_open_via_the_browser }
}
end
|
.generate_the_file_alsa_conf ⇒ Object
#
Roebe.generate_the_file_alsa_conf
This method will ultimately yield the file “alsa.conf”, which can usually be found at /etc/alsa.conf.
#
225
226
227
228
229
230
231
232
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 225
def self.generate_the_file_alsa_conf
require 'roebe/classes/generate_alsa_conf.rb'
result = Roebe.generate_alsa_conf.into?
if is_on_roebe?
e 'Moving this file to '+sdir('/etc/')+' next.'
move_file(result, '/etc/'+File.basename(result))
end
end
|
.generate_xauthority_file(i = ARGV) ⇒ Object
#
Roebe.generate_xauthority_file
#
111
112
113
|
# File 'lib/roebe/classes/generate_xauthority_file.rb', line 111
def self.generate_xauthority_file(i = ARGV)
Roebe::GenerateXauthorityFile.new(i)
end
|
.generate_xorg_conf(i = ARGV) ⇒ Object
#
Roebe.generate_xorg_conf
#
748
749
750
|
# File 'lib/roebe/classes/generate_xorg_conf/generate_xorg_conf.rb', line 748
def self.generate_xorg_conf(i = ARGV)
Roebe::GenerateXorgConf.new(i)
end
|
.get_file_content(i) ⇒ Object
#
Roebe.get_file_content
This method gets the content of a file.
#
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/roebe/toplevel_methods/files.rb', line 24
def self.get_file_content(i)
if i.is_a? Array
i.each {|entry| get_file_content(entry) }
else
if i.is_a? Symbol i = sanitize_url(i).to_s
end
if i.to_s.include? '$'
i = convert_global_env(i)
end
if env?['MY_DATA'] && i.is_a?(String)
i = replace_localhost_with_data(i)
end
case i when 'FSTAB'
i = '/etc/fstab' end unless File.exist? i
if File.directory? i
e 'Can not read a directory.'
e "#{swarn('Sorry, ')}#{col(i)}"\
"#{swarn(' is a directory. Can not read its content.')}"
return nil
else
if File.exist? i
file_content = readlines(i)
file_content.map! {|content|
"#{padding?}#{content}"
} if file_content return file_content
else
no_file_could_be_found_at(i)
return nil
end
end
end
end
|
.get_instance_variables(from_this_object = self) ⇒ Object
#
Roebe.get_instance_variables
Obtain all instance variables via this method. Consistently use this method when wishing to request all instance variables.
This method will return an Array.
#
20
21
22
23
24
|
# File 'lib/roebe/toplevel_methods/variables.rb', line 20
def self.get_instance_variables(
from_this_object = self
)
return from_this_object.instance_variables
end
|
.git_colours ⇒ Object
307
308
309
310
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 307
def self.git_colours
_ = "git config --global alias.lg \"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\""
esystem _
end
|
.gold(i = '', use_colours = @use_colours) ⇒ Object
272
273
274
275
276
277
278
|
# File 'lib/roebe/colours/colours.rb', line 272
def self.gold(
i = '',
use_colours = @use_colours
)
return COLOURS.gold(i) if use_colours
return i
end
|
.google_for(i = ARGV) ⇒ Object
59
60
61
|
# File 'lib/roebe/classes/do_a_google_search.rb', line 59
def self.google_for(i = ARGV)
Roebe::DoAGoogleSearch.new(i)
end
|
.google_url_cleaner(this_url) ⇒ Object
#
Roebe.google_url_cleaner
Usage example:
puts Roebe.google_url_cleaner("https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CDIQFjAA&url=http%3A%2F%2Fwww.fda.gov%2Fohrms%2Fdockets%2Fac%2F05%2Fslides%2F2005-4144s1_05_Mendelson-HF-NHD%2520Pane.ppt&ei=NOFBUYKHBM-64APKnYGQAw&usg=AFQjCNGka328-0Jym7wOYtJ8pdgGJjLv6Q&sig2=Iq2vS_O3AfCioprk-j_q2w")
#
139
140
141
|
# File 'lib/roebe/classes/google_url_cleaner.rb', line 139
def self.google_url_cleaner(this_url)
Roebe::GoogleUrlCleaner.new(this_url) { :be_silent }.result?
end
|
.grab_colour ⇒ Object
#
Roebe.grab_colour
Grab a colour by using grabc.
You can invoke this method via ‘grabc’.
#
21
22
23
24
25
26
27
28
29
|
# File 'lib/roebe/toplevel_methods/grab_colour.rb', line 21
def self.grab_colour
sleep 1.5 _ = "#{@env['MY_CPP']}/src/grabc/grabc"
if File.exist? _
esystem _
else
ewarn "#{_} does not exist."
end
end
|
.gzip_this_file(i = ARGV) ⇒ Object
78
79
80
|
# File 'lib/roebe/classes/gzip_this_file.rb', line 78
def self.gzip_this_file(i = ARGV)
Roebe::GzipThisFile.new(i)
end
|
.halloween(available_where = ENV['CARTOONS']) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# File 'lib/roebe/toplevel_methods/halloween.rb', line 15
def self.halloween(
available_where = ENV['CARTOONS']
)
require 'multimedia_paradise'
if available_where.frozen?
available_where = available_where.dup
end
unless available_where.end_with? '/'
available_where << '/'
end
require 'mountpoints'
mplayer_command = 'mplayer'
mplayer_command = 'mplayer -vo x11 -zoom'
if available_where
else mountpoints = Mountpoints[] usb_entry = mountpoints.first available_where = usb_entry.to_s+'Videos/Cartoons/'
end
e "Checking through the directory `#{sdir(available_where)}`."
_ARRAY_HORROR_SIMPSONS = [
'Simpsons-16/Simpsons_16x01_Treehouse_of_Horror_XV.mp4',
'Simpsons-03/S03x07.mp4',
'Simpsons-04/Treehouse_of_Horror_III.mp4',
'Simpsons-05/Treehouse_of_Horror_IV.mp4',
'Simpsons-06/Treehouse_of_Horror_V.mp4',
'Simpsons-07/S07x06.mp4',
'Simpsons-08/Treehouse_of_Horror_VII.m4v',
'Simpsons-09/Treehouse_Of_Horror_VIII.m4v',
'Simpsons-11/VTS_01_1.VOB',
'Simpsons-12/Simpsons_12x01_Tree_House_of_Horror_XI.avi',
'Simpsons-13/Simpsons_13x01_Treehouse_of_Horror_XII.mp4',
'Simpsons-14/The_Simpsons_[14x01]_Treehouse_of_Horror_XIII.avi',
'Simpsons-19/simpsons_19x05treehouseofhorrorxviii.avi',
'Simpsons-20/S20E04_Treehouse_of_Horror_XIX.avi'
] n_files_do_not_exist = 0
shuffled = _ARRAY_HORROR_SIMPSONS.map {|entry| entry.gsub(/ /,"\ ") }
shuffled.each { |f|
_ = available_where+f
if File.exist? _
puts '='*80
puts Colours.sfile(_)
puts '='*80
system mplayer_command+' "'+_+'"'
else
n_files_do_not_exist += 1
e 'Can not play file '+sfile(_)+' as it does not exist.'
end
}
if n_files_do_not_exist == shuffled.size
_ = '/home/x/video/'
if Dir.exist? _
e 'We will try to play from '+sdir(_)+' then.'
play_simpsons(_+'Cartoons/')
end
exit
end
end
|
.has_german_umlaut?(i) ⇒ Boolean
#
Roebe.has_german_umlaut?
Whether the input-String has a german umlaut or not.
Invocation example:
Roebe.has_german_umlaut? 'abcödef' Roebe.has_german_umlaut? 'abcdef'
#
659
660
661
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 659
def self.has_german_umlaut?(i)
!!(i =~ /[öäüÖÄÜß]/)
end
|
.has_openssl_support? ⇒ Boolean
#
Roebe.has_openssl_support?
#
186
187
188
189
190
191
192
193
194
|
# File 'lib/roebe/classes/test_openssl.rb', line 186
def self.has_openssl_support?
begin
require 'openssl'
e 'We just required openssl - it works! \o/'
rescue LoadError
e "Nope, sorry - openssl is not available in this ruby "\
"version (#{RUBY_VERSION})."
end
end
|
.hash_birthday_notifications(i = ARGV) ⇒ Object
#
Roebe.hash_birthday_notifications
#
276
277
278
279
280
281
282
283
284
|
# File 'lib/roebe/classes/birthday_notifications.rb', line 276
def self.hash_birthday_notifications(i = ARGV)
_ = Roebe::BirthdayNotifications.new(i) {{
n_days_in_advance: 300,
be_quiet: true
}}
_.run
_.append_the_current_year_to_the_main_hash
_.hash_birthday_candidates?
end
|
.heart_spacer(n_times = 40) ⇒ Object
#
Roebe.heart_spacer
This makes a “heart spacer” line, that is, a line with the unicode heart symbol, separated by ‘ ’.
The method supports colours. Example:
Roebe.heart_spacer { :lightgreen }
#
246
247
248
249
250
251
252
253
254
255
256
257
258
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 246
def self.heart_spacer(
n_times = 40
)
result = ("#{return_unicode_heart} " * n_times).strip
if block_given?
yielded = yield
if use_colours? and yielded.is_a?(Symbol) and
Colours.is_a_html_colour?(yielded)
result = Colours.send(yielded, result)
end
end
result
end
|
.hello_world(pad_the_string = true) ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/roebe/toplevel_methods/hello_world.rb', line 16
def self.hello_world(pad_the_string = true)
i = 'Hello world!'
if pad_the_string
i = "\n #{i} \n"
end
e steelblue(i)
end
|
.heredocs? ⇒ Boolean
#
Roebe.heredocs? (eof tag)
This makes an EOF, which may be convenient for you to then copy-paste.
#
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/roebe/toplevel_methods/heredocs.rb', line 16
def self.heredocs?
e 'result = <<-EOF'
e
e ' This is a heredoc.'
e
e ' It provides a nice syntax'
e ' for multiline strings'
e
e 'EOF'
e 'return result'
end
|
.hexdigest(i) ⇒ Object
#
Roebe.hexdigest
This method requires an input-argument.
#
317
318
319
320
321
322
323
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 317
def self.hexdigest(i)
result = ''.dup
i.each_byte {|entry|
result << sprintf('%02x', entry)
}
return result
end
|
.hh_mm_ss(i = ::Time.now) ⇒ Object
#
Roebe.hh_mm_ss
This will display the current time in hours:minutes:seconds.
There is also an alias for this, called ss_mm_hh, but that variant is wrong as name. Still, since my brain isn’t the best, I will retain that “wrong” alias as well.
#
79
80
81
82
83
84
85
86
87
88
89
|
# File 'lib/roebe/toplevel_methods/time.rb', line 79
def self.hh_mm_ss(
i = ::Time.now
)
if i.is_a? ::Time
return "#{i.hour.to_s.rjust(2,'0')}:"\
"#{i.min.to_s.rjust(2,'0')}:"\
"#{i.sec.to_s.rjust(2, '0')}"
else
e 'Debugging: '+i.class.to_s
end
end
|
91
92
93
|
# File 'lib/roebe/classes/holiday.rb', line 91
def self.holiday
Roebe::Holiday.new
end
|
.horizontal_double_bar ⇒ Object
#
Roebe.horizontal_double_bar
#
36
37
38
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 36
def self.horizontal_double_bar
EmojiParadise.horizontal_double_bar
end
|
.host_os? ⇒ Boolean
#
Roebe.host_os?
Return the host-operating system via this method.
#
733
734
735
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 733
def self.host_os?
::RbConfig::CONFIG['host_os']
end
|
.hot_beverage ⇒ Object
171
172
173
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 171
def self.hot_beverage
EmojiParadise.send(__method__)
end
|
.hypotenuse(a = 3, b = 5) ⇒ Object
#
Roebe.hypotenuse
Note that this method will return a Float, so you may have to convert this to an Integer (or just round it), if this is needed.
Usage example:
Roebe.hypotenuse(945, 891)
#
690
691
692
693
694
695
696
697
698
699
700
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 690
def self.hypotenuse(
a = 3, b = 5
)
if a and a.is_a?(String) and File.file?(a)
_ = File.read(a).strip
splitted = _.split(' ')
a = splitted.first
b = splitted.last
end
(a.to_f ** 2) + (b.to_f ** 2)
end
|
.identical(string1, string2) ⇒ Object
164
165
166
|
# File 'lib/roebe/classes/identical.rb', line 164
def self.identical(string1, string2)
Roebe::Identical.new(string1, string2)
end
|
.important_pdf_files? ⇒ Boolean
#
Roebe.important_pdf_files?
#
24
25
26
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 24
def self.important_pdf_files?
@important_pdf_files
end
|
.increase_volume(of_this_file = ARGV) ⇒ Object
#
Roebe.increase_volume
#
12
13
14
15
16
17
|
# File 'lib/roebe/toplevel_methods/increase_volume.rb', line 12
def self.increase_volume(
of_this_file = ARGV
)
require 'multimedia_paradise'
MultimediaParadise.increase_volume(of_this_file)
end
|
574
575
576
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 574
def self.infinity EmojiParadise.send(__method__)
end
|
.install_all_registered_fonts ⇒ Object
#
Roebe.install_all_registered_fonts
Available fonts are:
- hack, cascadia, jet-brains-mono.
#
529
530
531
532
533
534
535
536
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 529
def self.install_all_registered_fonts
require 'roebe/toplevel_methods/install_the_cascadia_font.rb'
install_the_cascadia_font
require 'roebe/toplevel_methods/install_the_hack_font.rb'
install_the_hack_font
require 'roebe/toplevel_methods/install_the_jet_brains_mono_font.rb'
install_the_jet_brains_mono_font
end
|
.install_and_update_rcfiles ⇒ Object
19
20
21
22
23
24
|
# File 'lib/roebe/toplevel_methods/install_and_update_rcfiles.rb', line 19
def self.install_and_update_rcfiles
cd '$RSRC/rcfiles/'
r2
require 'rcfiles' unless Object.const_defined? :Rcfiles
Rcfiles[]
end
|
.install_go(url = 'https://dl.google.com/go/go1.12.linux-amd64.tar.gz') ⇒ Object
#
Roebe.install_go
This method can be used to “install” go - at the least download it.
#
639
640
641
642
643
644
645
646
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 639
def self.install_go(
url = 'https://dl.google.com/go/go1.12.linux-amd64.tar.gz'
)
e 'Next downloading Go from '+url
wget(url)
e 'Next trying to extract it:'
(url)
end
|
.install_in_ruby_gem_manner(optional_copy_the_gem_to_this_location = nil) ⇒ Object
#
Roebe.install_in_ruby_gem_manner
This is similar to the r2 alias.
#
344
345
346
347
348
349
350
351
352
353
354
355
|
# File 'lib/roebe/classes/update.rb', line 344
def self.install_in_ruby_gem_manner(
optional_copy_the_gem_to_this_location = nil
)
make_gem
gem_install
if optional_copy_the_gem_to_this_location and
!optional_copy_the_gem_to_this_location.is_a?(Symbol)
this_gem = Dir['*.gem'].first
copy(this_gem, optional_copy_the_gem_to_this_location)
end
remove_old_gem
end
|
.install_in_ruby_setup_manner(use_this_binary = 'ruby') ⇒ Object
#
Roebe.install_in_ruby_setup_manner
This is similar to the r2 alias.
#
362
363
364
365
366
367
368
369
370
|
# File 'lib/roebe/classes/update.rb', line 362
def self.install_in_ruby_setup_manner(use_this_binary = 'ruby')
cpruby
system use_this_binary+' setup.rb config'
system use_this_binary+' setup.rb setup'
system use_this_binary+' setup.rb install'
remove_file 'setup.rb'
remove_file 'InstalledFiles'
remove_file '.config'
end
|
#
This method can be used to install the linux kernel API headers.
It presently uses a hardcoded path by default. Otherwise, pass in the path to the linux tarball release (local path).
#
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/roebe/toplevel_methods/install_linux_kernel_api_headers.rb', line 21
def self.(
target = '/home/x/SRC/linux/linux-5.1.7.tar.xz'
)
e
e 'Now installing the Linux Kernel API Headers:'
e
to = '/Depot/Temp/'
require 'extracter'
Extracter.what_to(target, to)
cd to+File.basename(target).sub(/\.tar\.xz$/,'')
esystem 'make mrproper'
esystem 'make INSTALL_HDR_PATH=dest headers_install'
if false
esystem 'find dest/include \( -name .install -o -name ..install.cmd \) -delete'
esystem 'cp -rv dest/include/* /usr/include'
end
end
|
.install_my_gems ⇒ Object
#
Roebe.install_my_gems
Easier convenience method to batch-install all my gems.
#
.install_nss(use_this_version = '3.44') ⇒ Object
#
Roebe.install_nss
This install-script can be used to install NSS. It may be moved into RBT at some later point - not sure yet.
Direct path on my home system:
/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/roebe/lib/roebe/toplevel_methods/install_nss.rb
#
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/roebe/toplevel_methods/install_nss.rb', line 23
def self.install_nss(
use_this_version = '3.44'
)
cd 'nss'
esystem '
make -j1 BUILD_OPT=1
NSPR_INCLUDE_DIR=/usr/include/nspr
USE_SYSTEM_ZLIB=1
ZLIB_LIBS=-lz
NSS_ENABLE_WERROR=0
$([ $(uname -m) = x86_64 ] && echo USE_64=1) \
$([ -f /usr/include/sqlite3.h ] && echo NSS_USE_SYSTEM_SQLITE=1)
'.delete("\n").squeeze(' ')
cd '../dist'
esystem 'install -v -m755 Linux*/lib/*.so /Programs/Nss/'+use_this_version+'/lib'
esystem 'install -v -m644 Linux*/lib/{*.chk,libcrmf.a} /Programs/Nss/'+use_this_version+'/lib'
esystem 'install -v -m755 -d /Programs/Nss/'+use_this_version+'/include/nss'
esystem 'cp -v -RL {public,private}/nss/* /Programs/Nss/'+use_this_version+'/include/nss'
esystem 'chmod -v 644 /Programs/Nss/'+use_this_version+'/include/nss/*'
esystem 'install -v -m755 Linux*/bin/{certutil,nss-config,pk12util} /Programs/Nss/'+use_this_version+'/bin'
esystem 'install -v -m644 Linux*/lib/pkgconfig/nss.pc /Programs/Nss/'+use_this_version+'/pkgconfig'
end
|
.install_openssl_certifications(i = ARGV) ⇒ Object
#
Roebe.install_openssl_certifications
#
230
231
232
|
# File 'lib/roebe/classes/install_openssl_certificates.rb', line 230
def self.install_openssl_certifications(i = ARGV)
Roebe::InstallOpensslCertificates.new(i)
end
|
.install_roebe_addons ⇒ Object
#
Roebe.install_roebe_addons
This method here will install some of my addons, from a remote website.
This helps me setup a “workstation” on a linux environment that happens to have ruby. It MUST also work when openssl is not available - using “gem install name” is not an option because this depends on openssl itself.
We will use a very naive approach here - we will simply install from shevegen.square7.ch, where the respective gems are assumed to reside. For this to work, the remote URLs obviously must have the specific gem.
We could just use the main array right? Hmm. Anything against this?
#
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/roebe/toplevel_methods/install_roebe_addons.rb', line 30
def self.install_roebe_addons
begin
require 'ftp_paradise' unless Object.const_defined? :FtpParadise
rescue LoadError; end
remote_base_url = 'http://shevegen.square7.ch/rubygems/' self::ARRAY_INSTALL_THESE_GEM_PROJECTS.each {|program|
remote_url_of_the_program = remote_base_url+program+'/'
remote_url_of_the_program_time_sorted = remote_url_of_the_program+'?C=M;O=D'
remote_url = remote_url_of_the_program+program+'-0.0.0.gem'
dataset = open(remote_url_of_the_program_time_sorted).read
use_this_regex = /<a href="(.+).gem">/
scanned_results = dataset.scan(use_this_regex).flatten
first_result = scanned_results.first
remote_url = remote_url_of_the_program+first_result+'.gem'
e 'Now installing `'+simp(program)+'` from this remote '\
'url: `'+simp(remote_url)+'`.'
wget(remote_url) this_cmd = 'gem install ./'+first_result+'.gem'
e this_cmd
system this_cmd
}
end
|
.install_ruby_project(i) ⇒ Object
#
Roebe.install_ruby_project
#
172
173
174
|
# File 'lib/roebe/classes/install_ruby_project.rb', line 172
def self.install_ruby_project(i)
::Roebe::InstallRubyProject.new(i)
end
|
.install_rust ⇒ Object
13
14
15
16
17
18
19
20
|
# File 'lib/roebe/toplevel_methods/install_rust.rb', line 13
def self.install_rust
_ = 'curl https://sh.rustup.rs --insecure -sSf | sh'
e 'Installing rust next:'
e
e " #{_}"
e
system _
end
|
.install_the_cascadia_font(target = LINUX_DIRECTORY_FOR_TTF_FONTS, url = url_to_the_cascadia_font?
) ⇒ Object
#
Roebe.install_the_cascadia_font
#
.install_the_hack_font(target = :home_directory, url = url_to_the_hack_font?(:zip_file)) ⇒ Object
#
Roebe.install_the_hack_font
#
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/roebe/toplevel_methods/install_the_hack_font.rb', line 38
def self.install_the_hack_font(
target = :home_directory,
url = url_to_the_hack_font?(:zip_file)
)
case target
when :linux, :default
target = LINUX_DIRECTORY_FOR_TTF_FONTS
when :home, :home_directory
target = rds("#{ENV['HOME']}/.fonts")
end
e "Downloading from #{sfile(url)} next:"
wget(url)
(url)
Dir['ttf/*'].each {|this_file|
e "Now copying `#{sfile(this_file)}` to #{target}."
mkdir(target) unless File.directory? target
copy_file(this_file, target)
}
esystem 'fc-cache -f -v'
if is_on_roebe? and File.directory? 'ttf'
remove_directory 'ttf'
end
end
|
.install_the_jet_brains_mono_font(target = LINUX_DIRECTORY_FOR_TTF_FONTS, url = url_to_the_jet_brains_font?(:zip_file)) ⇒ Object
#
Roebe.install_the_jet_brains_mono_font
#
.install_this_font(i = :default, font_directory = LINUX_DIRECTORY_FOR_TTF_FONTS) ⇒ Object
#
Roebe.install_this_font
This method can be used to install a font on Linux.
#
.install_this_locale(i) ⇒ Object
#
Roebe.install_this_locale
#
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/roebe/toplevel_methods/install_this_locale.rb', line 14
def self.install_this_locale(i)
if i.is_a? Array
i.each {|entry|
install_this_locale(entry)
}
else
esystem 'locale-gen '+i
esystem 'dpkg-reconfigure locales'
esystem 'update-locale'
end
end
|
.install_usb_ids(use_this_remote_url = 'http://www.linux-usb.org/usb.ids') ⇒ Object
#
Roebe.install_usb_ids
This method will download the usb.ids file, and optionally move it to the proper location if we are on a Roebe-system.
See here for more documentation:
http://www.linuxfromscratch.org/blfs/view/cvs/general/usbutils.html
To invoke this from the commandline:
roebe --install-usb-ids
#
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
# File 'lib/roebe/commandline/misc.rb', line 158
def self.install_usb_ids(
use_this_remote_url = 'http://www.linux-usb.org/usb.ids'
)
target_dir = '/usr/share/hwdata/'
e
esystem "wget #{use_this_remote_url}"
e
if File.exist? File.basename(use_this_remote_url)
e 'This could be moved into the directory `'+target_dir+'`.'
if is_on_roebe?
e 'In fact, we will do so anyway next.'
mv(File.basename(use_this_remote_url), target_dir)
if File.exist?(target_dir+File.basename(use_this_remote_url)) and
!File.exist?(File.basename(use_this_remote_url))
e 'Success!'
end
end
end
end
|
.install_vivaldi ⇒ Object
#
Roebe.install_vivaldi
This method shall attempt to install vivaldi on my home system.
The method is currently (January 2020) incomplete, though.
#
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/install_vivaldi.rb', line 16
def self.install_vivaldi
target_dir = '/home/x/src/vivaldi/'
first = Dir[target_dir+'*'].first
if File.exist? first
require 'rbt'
require 'program_information'
e 'Installing '+sfancy(first)+' next.'
RBT.rcp(File.basename(first))
program_version = ProgramInformation.return_version(first)
RBT.copy_file(first, RBT.programs_dir?+'Vivaldi/'+program_version)
end
end
|
.instance_variable_get(i) ⇒ Object
#
Roebe.instance_variable_get
This just simplifies getting an instance variable.
#
14
15
16
|
# File 'lib/roebe/toplevel_methods/instance_variable_get.rb', line 14
def self.instance_variable_get(i)
::Roebe.instance_variable_get(i.delete('@'))
end
|
.interactive_file_creator ⇒ Object
#
Roebe.interactive_file_creator
#
223
224
225
|
# File 'lib/roebe/classes/interactive_file_creator.rb', line 223
def self.interactive_file_creator
::Roebe::InteractiveFileCreator.new
end
|
.invoke_xorg_buffer ⇒ Object
#
self.invoke_xorg_buffer
This method will invoke whatever we have in the xorg-buffer at that time.
#
80
81
82
|
# File 'lib/roebe/classes/ipaste.rb', line 80
def self.invoke_xorg_buffer
Roebe::IPaste.new
end
|
.is_a_html_colour?(i) ⇒ Boolean
#
Roebe.is_a_html_colour?
#
244
245
246
|
# File 'lib/roebe/colours/colours.rb', line 244
def self.is_a_html_colour?(i)
COLOURS.is_a_html_colour?(i.delete('-'))
end
|
.is_audio_file?(i) ⇒ Boolean
#
Roebe.is_audio_file?
Simplified assumption as to whether the given input-file (first argument to this method) is an audio file or whether it is not.
Usage examples:
Roebe.is_audio_file?("/home/x/video/Realvids/223_Conan_the_Barbarian.avi")
Roebe.is_audio_file?("/home/x/songs/YoungMC_BustAMove.mp3")
#
23
24
25
26
27
28
29
|
# File 'lib/roebe/toplevel_methods/multimedia.rb', line 23
def self.is_audio_file?(i)
if i.is_a? Array
i = i.join(' ' ).strip
end
file_type = File.extname(i).delete('.')
%w( ogg mp3 flac ).include?(file_type) ? true : false
end
|
.is_image_file?(i) ⇒ Boolean
#
Roebe.is_image_file?
Returns true if this is a valid image, otherwise false.
The constant VALID_IMAGES is defined in the file constants/constants.rb.
#
19
20
21
22
23
24
25
26
|
# File 'lib/roebe/toplevel_methods/images.rb', line 19
def self.is_image_file?(i)
_ = false
extension_name = File.extname(i).delete('.').downcase
_ = true if ::Roebe::VALID_IMAGES.map {|entry|
entry.delete('.').downcase
}.include? extension_name
_
end
|
.is_not_on_roebe ⇒ Object
#
Roebe.is_not_on_roebe
#
37
38
39
|
# File 'lib/roebe/toplevel_methods/is_on_roebe.rb', line 37
def self.is_not_on_roebe
@is_on_roebe = false
end
|
.is_on_roebe ⇒ Object
#
Roebe.is_on_roebe
Setter method to enable @is_on_roebe.
#
30
31
32
|
# File 'lib/roebe/toplevel_methods/is_on_roebe.rb', line 30
def self.is_on_roebe
@is_on_roebe = true
end
|
.is_on_roebe? ⇒ Boolean
#
Roebe.is_on_roebe?
Query method over the @is_on_roebe variable.
This method can be used to determine whether I am on my own system or whether I am not.
#
49
50
51
|
# File 'lib/roebe/toplevel_methods/is_on_roebe.rb', line 49
def self.is_on_roebe?
@is_on_roebe
end
|
.is_on_windows? ⇒ Boolean
12
13
14
15
16
17
18
19
20
|
# File 'lib/roebe/toplevel_methods/windows.rb', line 12
def self.is_on_windows?
case RUBY_PLATFORM
when /win/,
/mingw/
true
else
false
end
end
|
.is_prime?(i) ⇒ Boolean
12
13
14
15
16
|
# File 'lib/roebe/toplevel_methods/prime_numbers.rb', line 12
def self.is_prime?(i)
i = i.join(' ').strip.to_i if i.is_a? Array
return false if i < 2
(2 .. i/2).none? {|entry| i % entry == 0}
end
|
.is_this_port_open?(port = 4568, outfile = '/dev/null') ⇒ Boolean
#
Roebe.is_this_port_open?
This method makes use of “lsof”.
Note that this only works on Linux, not on Windows.
#
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/roebe/toplevel_methods/open_ports.rb', line 17
def self.is_this_port_open?(
port = 4568,
outfile = '/dev/null'
)
result = false
if File.exist? outfile
result = !system("lsof -i:#{port}", out: outfile)
end
return result
end
|
.is_video_file?(i) ⇒ Boolean
#
Roebe.is_video_file?
Simplified assumption as to whether the given input-file (first argument to this method) is a video file or whether it is not.
Usage example:
Roebe.is_video_file?("Realvids/276_DragonsForever.avi")
#
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/roebe/toplevel_methods/multimedia.rb', line 42
def self.is_video_file?(i)
if i.is_a? Array
i = i.join(' ' ).strip
end
return %w(
ogm
avi
mpg
wmv
mp4
vob
flv
mov
mkv
).any? {|f| i.downcase.include? f }
end
|
#
This method will display a common shebang-header for Java.
This can also be invoked via:
Roebe.
result = Roebe.(false)
#
104
105
106
|
# File 'lib/roebe/classes/java_header.rb', line 104
def self.(output_result = true)
Roebe::JavaHeader.new
end
|
.jp2a(use_this_image = random_image) ⇒ Object
#
Roebe.jp2a
shows a jp2a image using jp2a. (ASCII TAG, ry jp2a
How to use this method:
Roebe.jp2a
Roebe.jp2a image_location
Roebe.jp2a ENV['IMG'].to_s+'/PC/LINUX/RAPTENIX/APTENIX_HANDWRITING_LOGO.png'
Roebe.jp2a '/ACK.png'
#
Or easier:
rdraw ascii
#
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/roebe/toplevel_methods/jp2a.rb', line 28
def self.jp2a(
use_this_image = random_image
)
if use_this_image.is_a? Array
use_this_image.each {|entry| jp2a(entry) }
else
my_image = use_this_image
the_cmd = "convert #{my_image} jpg:- | jp2a -"
e the_cmd
system the_cmd
e 'The image above was: '
e
e " #{my_image}"
e
end
end
|
.kde_konsole_command(i = 'ls') ⇒ Object
#
Roebe.kde_konsole_command
This method will send a command to a KDE konsole tab.
#
86
87
88
|
# File 'lib/roebe/classes/kde/kde_konsole_send_command.rb', line 86
def self.kde_konsole_command(i = 'ls')
KdeKonsoleSendCommand.new(i)
end
|
.keywords? ⇒ Boolean
#
Roebe.keywords?
Method to return all keyword that ruby has.
#
.kill_dhcpcd(i = ARGV) ⇒ Object
66
67
68
|
# File 'lib/roebe/classes/dhcpcd/kill_dhcpcd.rb', line 66
def self.kill_dhcpcd(i = ARGV)
KillDhcpcd.new(i)
end
|
.kill_firefox ⇒ Object
#
Roebe.kill_firefox
Module-method to kill firefox.
#
118
119
120
|
# File 'lib/roebe/classes/kill_firefox.rb', line 118
def self.kill_firefox
::Roebe::KillFirefox.new
end
|
.kill_palemoon ⇒ Object
#
Roebe.kill_palemoon
Toplevel-method to kill palemoon.
#
124
125
126
|
# File 'lib/roebe/classes/kill_palemoon.rb', line 124
def self.kill_palemoon
::Roebe::KillPalemoon.new
end
|
.left_five_eights_block ⇒ Object
#
Roebe.left_five_eights_block
#
118
119
120
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 118
def self.left_five_eights_block
EmojiParadise.left_five_eights_block
end
|
.left_half_block ⇒ Object
#
Roebe.left_half_block
#
125
126
127
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 125
def self.left_half_block
EmojiParadise.left_half_block
end
|
.left_one_eight_block ⇒ Object
#
Roebe.left_one_eight_block
#
146
147
148
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 146
def self.left_one_eight_block
EmojiParadise.left_one_eight_block
end
|
.left_one_quarter_block ⇒ Object
#
Roebe.left_one_quarter_block
#
139
140
141
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 139
def self.left_one_quarter_block
EmojiParadise.left_one_quarter_block
end
|
.left_pointing_index ⇒ Object
#
Roebe.left_pointing_index
This refers to the following symbol: ☚
#
893
894
895
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 893
def self.left_pointing_index
EmojiParadise.send(__method__)
end
|
.left_seven_eights_block ⇒ Object
#
Roebe.left_seven_eights_block
#
104
105
106
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 104
def self.left_seven_eights_block
EmojiParadise.left_seven_eights_block
end
|
.left_three_eights_block ⇒ Object
#
Roebe.left_three_eights_block
#
132
133
134
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 132
def self.left_three_eights_block
EmojiParadise.left_three_eights_block
end
|
.left_three_quarters_block ⇒ Object
#
Roebe.left_three_quarters_block
#
111
112
113
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 111
def self.left_three_quarters_block
EmojiParadise.left_three_quarters_block
end
|
.leftwards_arrow ⇒ Object
963
964
965
966
967
968
969
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 963
def self.leftwards_arrow
result = "\u{2190}"
if is_on_roebe?
set_xorg_buffer(result.strip)
end
result
end
|
5635
5636
5637
5638
|
# File 'lib/roebe/custom_methods/module.rb', line 5635
def self.libui1
require 'roebe/gui/libui/shell/shell.rb'
Roebe::GUI::LibUI::Shell.new
end
|
5643
5644
5645
5646
|
# File 'lib/roebe/custom_methods/module.rb', line 5643
def self.libui2
require 'roebe/gui/libui/show_aliases/show_aliases.rb'
Roebe::GUI::LibUI::ShowAliases.new
end
|
5651
5652
5653
5654
|
# File 'lib/roebe/custom_methods/module.rb', line 5651
def self.libui3
require 'roebe/gui/libui/interactive_caesar_cipher/interactive_caesar_cipher.rb'
Roebe::GUI::LibUI::InteractiveCaesarCipher.new
end
|
.light_shade ⇒ Object
160
161
162
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 160
def self.light_shade
EmojiParadise.light_shade
end
|
.link?(optional_id = ARGV) ⇒ Boolean
#
Roebe.link?
Open the link to the Universität Wien Vorlesung/Übung. This is currently going to the old online.univie.ac.at URL.
There also exists a newer entry via ufind.univie.ac.at
An example for the latter can be seen here:
https://ufind.univie.ac.at/de/course.html?lv=813013&semester=2003W
More examples:
http://online.univie.ac.at/vlvz?&lvnr=300332&semester=S2016
https://ufind.univie.ac.at/de/course.html?lv=300332&semester=2016S
#
377
378
379
380
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 377
def self.link?(optional_id = ARGV)
require 'studium/utility_scripts/link.rb'
Studium::Link.new(optional_id)
end
|
.load_custom_ruby_files(array = ARRAY_INSTALL_THESE_GEM_PROJECTS) ⇒ Object
#
Roebe.load_custom_ruby_files
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/roebe/toplevel_methods/load_custom_ruby_files.rb', line 20
def self.load_custom_ruby_files(
array = ARRAY_INSTALL_THESE_GEM_PROJECTS
)
array.each {|this_project|
e 'Now trying to require `'+sfancy(this_project)+'` in a failsafe manner.'
begin
require this_project
rescue Exception => error
pp error
end
}
end
|
.load_wirble ⇒ Object
#
Roebe.load_wirble
Enable wirble colour support for IRB next.
#
168
169
170
171
172
173
174
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 168
def self.load_wirble
begin
require 'wirble'
Wirble.init
Wirble.colorize
rescue LoadError; end
end
|
.load_yaml(input_file) ⇒ Object
#
Roebe.load_yaml
Symbols will delegate to sanitize_url.rb
#
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/roebe/toplevel_methods/load_yaml.rb', line 14
def self.load_yaml(input_file)
if input_file.is_a? Symbol require 'roebe/requires/failsafe_require_of_beautiful_url.rb'
_ = BeautifulUrl::BeautifulUrl.new(input_file)
_.replace_localhost
input_file = _.url?
end
unless File.exist? input_file
raise "But no file at `#{input_file}` exists."
end
return YAML.load_file(input_file.strip)
end
|
46
47
48
|
# File 'lib/roebe/math/log10.rb', line 46
def self.log10(i)
Roebe::Log10.new(i)
end
|
.log_directory? ⇒ Boolean
#
Roebe.log_directory?
This method will return the path to a directory where module Roebe may put log files and similar files into.
#
48
49
50
|
# File 'lib/roebe/constants/file_and_directory_constants.rb', line 48
def self.log_directory?
LOG_DIRECTORY
end
|
21
22
23
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 21
def self.low_line
EmojiParadise.low_line
end
|
.lower_alpha ⇒ Object
#
Roebe.lower_alpha
This is α.
#
1076
1077
1078
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1076
def self.lower_alpha
EmojiParadise.send(__method__)
end
|
.lower_five ⇒ Object
#
Roebe.lower_five
This is ₅, also known as subscript 5.
#
1085
1086
1087
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1085
def self.lower_five
EmojiParadise.send(__method__)
end
|
.lower_five_eighths_block ⇒ Object
#
Roebe.lower_five_eighths_block
#
76
77
78
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 76
def self.lower_five_eighths_block
EmojiParadise.lower_five_eighths_block
end
|
.lower_half_block ⇒ Object
#
Roebe.lower_half_block
#
69
70
71
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 69
def self.lower_half_block
EmojiParadise.lower_half_block
end
|
.lower_one ⇒ Object
1101
1102
1103
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1101
def self.lower_one
EmojiParadise.send(__method__)
end
|
.lower_one_eighth_block ⇒ Object
#
Roebe.lower_one_eighth_block
#
28
29
30
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 28
def self.lower_one_eighth_block
EmojiParadise.lower_one_eighth_block
end
|
.lower_one_quarter_block ⇒ Object
#
Roebe.lower_one_quarter_block
#
55
56
57
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 55
def self.lower_one_quarter_block
EmojiParadise.lower_one_quarter_block
end
|
.lower_seven_eighths_block ⇒ Object
#
Roebe.lower_seven_eighths_block
#
90
91
92
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 90
def self.lower_seven_eighths_block
EmojiParadise.lower_seven_eighths_block
end
|
.lower_six ⇒ Object
#
Roebe.lower_six
This is ₆, also known as subscript 6.
#
1094
1095
1096
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1094
def self.lower_six
EmojiParadise.send(__method__)
end
|
.lower_three_eighths_block ⇒ Object
#
Roebe.lower_three_eighths_block
#
62
63
64
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 62
def self.lower_three_eighths_block
EmojiParadise.lower_three_eighths_block
end
|
.lower_three_quarters_block ⇒ Object
#
Roebe.lower_three_quarters_block
#
83
84
85
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 83
def self.lower_three_quarters_block
EmojiParadise.lower_three_quarters_block
end
|
316
317
318
319
320
|
# File 'lib/roebe/classes/update.rb', line 316
def self.make_gem
if Dir['*.gemspec'].size > 0
system 'gem build *.gemspec'
end
end
|
.make_nodes_and_mount_dev_entries(mount_at_this_target) ⇒ Object
#
Roebe.make_nodes_and_mount_dev_entries
This method is to make the chroot more linux-like, as-is.
#
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/roebe/toplevel_methods/chroot.rb', line 22
def self.make_nodes_and_mount_dev_entries(
mount_at_this_target
)
esystem "mknod -m 600 #{mount_at_this_target}/dev/console c 5 1"
esystem "mknod -m 666 #{mount_at_this_target}/dev/null c 1 3"
esystem "mount -v --bind /dev #{mount_at_this_target}/dev"
esystem "mount -vt devpts devpts #{mount_at_this_target}/dev/pts -o gid=5,mode=620"
esystem "mount -vt proc proc #{mount_at_this_target}/proc"
esystem "mount -vt sysfs sysfs #{mount_at_this_target}/sys"
esystem "mount -vt tmpfs tmpfs #{mount_at_this_target}/run"
end
|
.mama? ⇒ Boolean
15
16
17
18
19
20
21
22
23
|
# File 'lib/roebe/toplevel_methods/mama.rb', line 15
def self.mama?
target_file = '/home/x/data/personal/yaml/roeberia_settings.yml'
if File.exist? target_file
return YAML.load_file(target_file)['INGRID_EMAIL']
else
e 'No file exists at '+target_file
end
return nil
end
|
#
Usage examples:
Roebe.map_input_to_unicode_symbol(:checkmark_thin)
Roebe.to_unicode_symbol(:checkmark_thin)
Roebe.to_unicode_symbol(:email)
#
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
# File 'lib/roebe/toplevel_methods/unicode/map_input_to_unicode_symbol.rb', line 32
def self.map_input_to_unicode_symbol(
i = :snowman
)
i = i.first if i.is_a? Array
i = ":#{i}" if i.is_a? Symbol
i = i.to_s.dup
case i when ':email'
i = '✉'
when ':white_knight'
i = Roebe.white_knight
when ':black_knight'
i = Roebe.black_knight
when ':checkmark_completed_thick',
':checkmark_thick',
':completed_thick',
':thick',
':checkmark'
i = Roebe.thick_checkmark
when ':checkmark_completed_thin',
':checkmark_thin',
':completed_thin',
':thin'
i = Roebe.checkmark_completed_thin?
when ':snowman',':unicode_snowman'
i = Roebe.return_unicode_snowman
when ':black_sun_with_rays'
i = Roebe.return_unicode_black_sun_with_rays
when ':sun'
i = Roebe.return_unicode_sun
when ':white_telephone'
i = Roebe.return_unicode_white_telephone
when ':black_telephone'
i = Roebe.return_unicode_black_telephone
when ':opposition'
i = Roebe.return_unicode_opposition
when ':conjunction'
i = Roebe.return_unicode_conjunction
when ':descending_node'
i = Roebe.return_unicode_descending_node
when ':ascending_node'
i = Roebe.return_unicode_ascending_node
when ':thunderstorm'
i = Roebe.return_unicode_thunderstorm
when ':lightning'
i = Roebe.return_unicode_lightning
when ':high_voltage_sign'
i = Roebe.return_unicode_high_voltage_sign
when ':tv',':television'
i = Roebe.return_unicode_television
when ':yin_yang',':yang_yin',':ying_yan'
i = Roebe.return_unicode_yin_yang
when ':white_star'
i = Roebe.return_unicode_white_star
when ':black_star'
i = Roebe.return_unicode_black_star
when ':comet'
i = Roebe.return_unicode_comet
when ':umbrella'
i = Roebe.return_unicode_umbrella
when ':cloud'
i = Roebe.return_unicode_cloud
when ':keyboard'
i = Roebe.return_unicode_keyboard
when ':king'
i = Roebe.return_unicode_king
when ':phone'
i = Roebe.return_unicode_phone
when ':dog_face'
i = Roebe.return_unicode_dog_face
when ':dog'
i = Roebe.return_unicode_dog
when ':cat_face_with_wry_smile',':cat_smiling',':smiling_cat'
i = Roebe.return_cat_face_with_wry_smile
when ':poo',':pile_of_poo'
i = Roebe.return_pile_of_poo
when ':cat_face'
i = Roebe.return_unicode_cat_face
when ':cat'
i = Roebe.return_unicode_cat
else
if (i =~ /^\d+$/) or (i =~ /^\d+[A-Za-z]{1}$/)
else
e "Not found the input `#{i}`."
end
end
return i
end
|
#
This calculates the median of some numbers.
#
721
722
723
724
725
726
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 721
def self.median(i)
if i.is_a? Array
i = i.sort
end
return i[(i.size/2)]
end
|
.medium_black_circle ⇒ Object
#
Roebe.medium_black_circle
#
555
556
557
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 555
def self.medium_black_circle
EmojiParadise.send(__method__)
end
|
.medium_shade ⇒ Object
167
168
169
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 167
def self.medium_shade
EmojiParadise.medium_shade
end
|
.medium_small_white_circle ⇒ Object
#
Roebe.medium_small_white_circle
Usage example:
puts Colours.violet(Roebe.medium_small_white_circle)
#
567
568
569
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 567
def self.medium_small_white_circle
EmojiParadise.send(__method__)
end
|
.medium_white_circle ⇒ Object
#
Roebe.medium_white_circle
#
548
549
550
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 548
def self.medium_white_circle
EmojiParadise.send(__method__)
end
|
.mediumorchid(i = '') ⇒ Object
349
350
351
352
|
# File 'lib/roebe/colours/colours.rb', line 349
def self.mediumorchid(i = '')
return COLOURS.mediumorchid(i) if @use_colours
return i
end
|
.mediumpurple(i = '') ⇒ Object
341
342
343
344
|
# File 'lib/roebe/colours/colours.rb', line 341
def self.mediumpurple(i = '')
return COLOURS.mediumpurple(i) if @use_colours
return i
end
|
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
|
# File 'lib/roebe/commandline/menu.rb', line 53
def self.(i)
if i.is_a? Array
i.each {|entry| (entry) }
else
case i when /^-?-?alsa\.?conf$/i,
/^-?-?alsa$/i,
/^-?-?audio$/i,
/^-?-?auconf$/i,
/^-?-?asound$/i
generate_the_file_alsa_conf
when /^-?-?use-?this-?pdf-?viewer=(.+)$/,
/^-?-?pdfviewer=(.+)$/,
/^-?-?set-?pdf-?viewer=(.+)$/
update_the_main_pdf_viewer_file_with_this_program($1)
when /^-?-?use(-|_)?firefox$/i
require 'open'
::Open.permanently_use_this_browser(:firfox)
when /^-?-?graalvm(\d+)$/i
cd log_dir? index = ($1.to_i - 1)
target_dir = "#{project_base_dir?}java_roebe/"
array_all_java_files = Dir[target_dir+'*.java'].sort
if array_all_java_files.empty?
e "#{rev}No java files could be found at `#{sdir(target_dir)}`."
else
if index > array_all_java_files.size
index = array_all_java_files.size - 1
end
work_on_this_file = array_all_java_files[index]
do_compile_this_java_file_statically(work_on_this_file)
end
when /^-?-?caesar(-|_)?gtk4$/i,
/^-?-?cipher(-|_)?gtk4$/i,
/^-?-?gtk4(-|_)?cipher$/i require 'roebe/gui/gtk4/interactive_caesar_cipher/interactive_caesar_cipher.rb'
Roebe::GUI::Gtk::InteractiveCaesarCipher.run
when /^-?-?caesar(-|_)?gtk3?$/i,
/^-?-?cipher(-|_)?gtk3?$/i
require 'roebe/gui/gtk3/interactive_caesar_cipher/interactive_caesar_cipher.rb'
Roebe::GUI::Gtk::InteractiveCaesarCipher.run
when /^-?-?autostart\??$/i
e "#{rev}The default auto-start directory for this user is at:"
e
e sfancy(" #{Dir.home}/.config/autostart/")
e
when /^-?-?libui(_|-| )?shell$/i,
/^-?-?shell(_|-| )?libui$/i,
/^-?-?libui1$/i Roebe.start_the_libui_shell
when /^-?-?caesar(-|_)?libui$/i,
/^-?-?caesar$/i,
/^-?-?cipher$/i, /^-?-?cypher$/i, /^-?-?libui2$/i
require 'roebe/gui/libui/interactive_caesar_cipher/interactive_caesar_cipher.rb'
Roebe::GUI::LibUI::InteractiveCaesarCipher.new
when /^-?-?ms(_|-| )?controller$/i,
/^-?-?controller$/i,
/^-?-?ingrid$/i,
/^-?-?libui$/i,
/^-?-?libui3$/i
require 'roebe/gui/libui/microsoft_controller/microsoft_controller.rb'
Roebe::GUI::LibUI::MicrosoftController.new
when /^-?-?jcipher$/,
/^-?-?jruby1$/
require 'roebe/gui/jruby/interactive_caesar_cipher/interactive_caesar_cipher.rb'
Roebe::GUI::Jruby::InteractiveCaesarCipher.new
when /^-?-?set(-|_| )?firefox(-|_| )?location=(.+)/,
/^-?-?set(-|_| )?browser(-|_| )?location=(.+)/,
/^-?-?firefox(_|-| )?location=(.+)/,
/^-?-?use(-|_| )?browser=(.+)/i,
/^-?-?set(-|_| )?browser=(.+)/i
require 'roebe/browser/firefox.rb'
store_here = $2.to_s.dup
store_here = $3.to_s.dup if $3
Roebe.store_new_location_to_the_browser_binary(store_here)
when /^-?-?njoy$/i
require 'cyberweb/utility_scripts/images_to_html/images_to_html.rb'
Cyberweb::ImagesToHtml.new(:njoy)
when /^-?-?all(_|-| )?graal$/i
array_all_java_files = Dir[project_base_dir?+'java/*.java'].sort
e
e 'Next batch-compiling all .java files in the java/ subdirectory'
e 'of this gem.'
e
e 'This will take a while, though ... please be patient.'
do_compile_this_java_file_statically(array_all_java_files)
e 'All done batch-compiling all .java files in this gem! \o/'
e
when /^-?-?purge=(.+)$/i, /^-?-?pristine=(.+)$/i require 'roebe/classes/pristine_gems.rb'
::Roebe::PristineGems.new($1.to_s.dup)
when /-?-?install(_|-| )?addons/
require 'roebe/toplevel_methods/install_roebe_addons.rb'
install_roebe_addons
when /^-?-?bootstrap(-|_| )?bluefish$/,
/^-?-?copy(-|_| )?bluefish$/, /^-?-?copy(-|_| )?bluefish(-|_| )?configuration(-|_| )?files$/,
/^-?-?bluefish$/
e 'Now copying the bluefish / greenfish configuration files.'
Roebe.copy_bluefish_configuration_files
when /^-?-?generate(-|_)?konsole(-|_)?css$/i,
/^-?-?generate(-|_)?konsole(-|_)?css(-|_)?file$/i,
/^-?-?konsole(-|_|.)?css$/i,
/^-?-?konsole$/i,
/^-?-?generate(-|_|.)?css$/i,
/^-?-?css$/i
require 'roebe/toplevel_methods/generate_konsole_css_file.rb'
Roebe.generate_konsole_css_file
when /^-?-?sinatra$/i,
/^-?-?sinatra(-|_)?documentation$/i,
/^-?-?serve(-|_)?documentation$/i,
/^-?-?documentation$/i
if is_on_roebe?
rename_kde_konsole('sinatra-documentation')
end
require 'roebe/documentation/app.rb'
Roebe.start_sinatra
when /^-?-?check(-|_)?for(-|_)?duplicates$/i,
/^-?-?duplicates$/i
require 'roebe/classes/find_duplicate_entries_in_alias_file.rb'
Roebe::FindDuplicateEntriesInAliasFile.new(ARGV)
when /^-?-?gtk(-|_| )?shell$/i,
/^-?-?shell$/i require 'roebe/gui/gtk3/shell/shell.rb'
::Roebe::GUI::Gtk::Shell.run
when /^--wlan(-|_| )?interface(-|_| )?gtk3$/i
require 'roebe/gui/gtk3/wlan_interface/wlan_interface.rb'
::Roebe::GUI::Gtk::WlanInterface.run
when /^-?-?compare(-|_| )?strings=(.+),(.+)/i
require 'roebe/classes/identical.rb'
e Roebe::Identical.new($2.to_s.dup, $3.to_s.dup) { :be_quiet }.result?.to_s
when /^-?-?ssl$/
require 'roebe/classes/install_openssl_certificates.rb'
install_openssl_certifications
when /^-?-?webrick$/,
/^-?-?start(-|_)?webrick$/,
/^-?-?www$/
require 'roebe/toplevel_methods/webrick.rb'
start_webrick
when /^-?-?random(-|_)?songs$/,
/^-?-?random$/,
/^-?-?songs$/,
/^-?-?audio$/
play_random_songs
when /^-?-?zip=(.+)$/ require 'roebe/toplevel_methods/rubyzip.rb'
::Roebe.zip_on_windows($1.to_s.dup)
when /^-?-?capitals$/i
require 'roebe/gui/gtk/world_capitals/run.rb'
::Roebe::WorldCapitals.run
when /^-?-?user(-|_)?install$/
user_install_all_registered_gems
when /^-?-?cfdg$/
generate_the_cfdg_files
when /^-?-?fluxbox$/
generate_fluxbox_keys_and_apps_file
when /-?-?chello\??$/i
show_information_related_to_chello
when /-?-?extract(-|_)?gem=(.+)/
target = $2.to_s.dup
(target)
when /^-?-?make(-|_)?gems$/i
require 'roebe/classes/batch_generate_all_my_gems.rb'
create_my_gems
when /^-?-?install(-|_)?libreoffice$/i,
/^-?-?libreoffice$/i
Roebe::InstallLibreoffice.new
when /^-?-?fonts$/i, /^-?-?install(-|_)?fonts$/i install_all_registered_fonts
when /^-?-?pdf(-|_)?viewer\??$/i require 'pdf_paradise'
PdfParadise.report_which_pdf_viewer_is_in_use
when /^-?-?install(-|_)?the(-|_)?cascadia(-|_)?font$/i, /^-?-?install(-|_)?cascadia(-|_)?font$/i, /^-?-?install(-|_)?cascadia$/i, /^-?-?cascadia$/i require 'roebe/toplevel_methods/install_the_cascadia_font.rb'
install_the_cascadia_font
when /^-?-?install(-|_)?the(-|_)?hack(-|_)?font$/i, /^-?-?install(-|_)?hack(-|_)?font$/i, /^-?-?install(-|_)?hack$/i, /^-?-?install(-|_)?font$/i, /^-?-?hack$/i require 'roebe/toplevel_methods/install_the_hack_font.rb'
install_the_hack_font
when /^-?-?usb\.?ids$/i, /^-?-?install(-|_)?usb(-|_)?ids$/i
require 'roebe/commandline/misc.rb'
install_usb_ids
when /^-?-?generate(-|_)?liloconfig$/i,
/^-?-?lilo$/i
generate_liloconfig
when /^-?-?create(-|_)?mad(-|_)?pkgconfig(-|_)?file$/i
create_mad_pkgconfig_file
when /^-?-?chroot$/i,
/^-?-?enter(-|_)?chroot$/i
require 'roebe/toplevel_methods/chroot.rb'
Roebe.enter_chroot
when /^-?-?use(-|_| )?atril$/,
/^-?-?atril$/
update_the_main_pdf_viewer_file_with_this_program(:atril)
when /^-?-?use(-|_| )?evince$/,
/^-?-?evince$/
update_the_main_pdf_viewer_file_with_this_program(:evince)
when /^-?-?browser\.?yml$/
e sfile(FILE_TO_BROWSER)
when /^-?-?download(-|_)?emoji$/i
Roebe.download_emojis
when /^-?-?log(-|_)?dir$/i
e Roebe.log_dir?
when /^-?-?word(-|_)?frequencies=(.+)$/ hash = Roebe.word_frequencies(
$2.to_s.dup
)
hash.each_pair {|a,b|
e a+' '+b.to_s
}
when /^-?-?return(-|_)?even(-|_)?numbered(-|_)?lines(-|_)?from(-|_)?this(-|_)?file=(.+)$/ e Roebe.return_even_numbered_lines_from_this_file(
$7.to_s.dup
).join
when /^-?-?nanoconfig$/i,
/^-?-?nano$/i,
/^-?-?enable(-|_)?nano$/i,
/^-?-?generate(-|_)?nanorc$/i, /^-?-?nanorc$/i Roebe.generate_nano_config
when /^-?-?show(-|_)?nano(-|_)?config$/
Roebe.show_nano_config
when /^-?-?snowman$/
Roebe.show_unicode_snowman
when /^-?-?cpruby$/,
/^-?-?copy(-|_)?setup(-|_)?rb(-|_)?file$/,
/^-?-?copy(-|_)?setup(-|_)?file(-|_)?to(-|_)?pwd$/,
/^-?-?copy(-|_)?setup$/, /^-?-?cp(-|_)?setup$/
Roebe.copy_setup_file_to_pwd { :be_verbose }
when /^-?-?populate(-|_)?this(-|_)?directory(-|_)?with(-|_)?rcfiles=(.+)$/i _ = $5.to_s.dup
Roebe.populate_this_directory_with_rcfiles(_)
exit
when /^-?-?wlan(-|_)?gui$/i
require 'roebe/classes/wlan/gui/wlan_interface.rb'
Roebe::GUI::Gtk::WlanInterface.start_gui_application
when /^-?-?base64=(.+)$/i
require 'roebe/toplevel_methods/base64.rb'
input = $1.to_s.dup
result = Roebe.base64(input)
e result
when /^-?-?download(-|_| )?autogenerated$/
Roebe.download_autogenerated_rcfiles
when /^-?-?create(-|_)?dos(-|_)?iso$/i
Roebe.create_dos_iso
when /^-?-?show(-|_)?games$/i
Roebe.show_games
when /^-?-?simpsons$/i
require 'multimedia_paradise/video/mplayer_wrapper.rb'
MultimediaParadise.play_simpsons
when /^-?-?save(-|_)?pdf$/i
require 'pdf_paradise'
PdfParadise.save_open_pdf_files
when /^-?-?last(-|_)?pdf$/i,
/^-?-?pdfs?\??$/i
show_the_last_opened_pdf_files
when /^-?-?use(-|_| )?okular$/,
/^-?-?okular$/
update_the_main_pdf_viewer_file_with_this_program(:okular)
when /^-?-?version$/
e sfancy(VERSION)
when /^-?-?update(-|_)?roebe$/
Roebe.update_roebe
when /^-?-?browser(-|_)?location\??$/i, /^-?-?firefox(-|_)?location\??$/i, /^-?-?browser\??$/i Roebe.report_the_location_of_the_default_browser
when /^-?-?radio(-|_| )?stations\??$/i
MultimediaParadise.show_internet_radio_URLs
when /^-?-?radio\??$/i,
/^-?-?display(-|_| )?radio(-|_| )?stations$/i
MultimediaParadise.display_radio_stations
when /^-?-?download(-|_| )?certdata$/i,
/^-?-?certdata$/i,
/^-?-?certdata\.?txt$/i
Roebe.download_certdata
when /^-?-?downcase(-|_| )?all(-|_| )?entries$/i
require 'roebe/toplevel_methods/downcase_all_entries_in_the_current_directory.rb'
Roebe.downcase_all_entries
when /^-?-?show(-|_| )?directories$/
pp Dir['*'].select {|entry| File.directory? entry }
when /^-?-?update(-|_| )?pciids$/i
Roebe.update_pciids
when /^-?-?download(-|_| )?certificates$/i,
/^-?-?download(-|_| )?certificate$/i,
/^-?-?download(-|_| )?certification$/i
Roebe.download_certificates
when /^-?-?generate(-|_| )?fluxbox(-|_| )?keys(-|_| )?file$/i,
/^-?-?fluxbox(-|_| )?keys$/i, /^-?-?fluxbox(-|_| )?config$/i
Roebe.generate_fluxbox_keys_file
when /^-?-?generate(-|_| )?fluxbox(-|_| )?apps(-|_| )?file$/,
/^-?-?fluxbox(-|_| )?apps$/
Roebe.generate_fluxbox_apps_file
when /^-?-?wlan(-|_)?scanning$/i,
/^-?-?wlan(-|_)?scan/i,
/^-?-?wlan$/i
Roebe.scan_for_wlan_spots
when /^-?-?append(-|_)?to(-|_)?autostart=(.+)$/i
append_this_program_to_the_autostart_array($3)
when /^-?-?interactive$/i,
/^-?-?interactive(-|_)?file(-|_)?creator$/i
require 'roebe/classes/interactive_file_creator.rb'
Roebe.interactive_file_creator
when /^-?-?tales(-|_)?from(-|_)?the(-|_)?crypt$/i
require 'roebe/classes/tales_from_the_crypt.rb'
Roebe.tales_from_the_crypt
when /^-?-?install(-|_)?my(-|_)?gems$/
Roebe.install_my_gems
when /^-?-?permanently(-|_)?disable(-|_)?colou?rs$/,
/^-?-?disable(-|_)?colou?rs$/,
/^-?-?no(-|_)?colou?rs$/
opn; e 'Permanently disabling the colours in the Roebe namespace next.'
Roebe.permanently_disable_colours
when /^-?-?upcase(_|-| )?all(_|-| )?files$/,
/^-?-?upcase$/
unless Roebe.respond_to? :upcase_all_files
require 'roebe/classes/upcaser.rb'
end
Roebe.upcase_all_files
when /^-?-?beautify(_|-| )?system$/
Roebe.beautify_system
when /^-?-?show-?classes/,
/^-?-?available-?classes/
Roebe.report_classes when /-?-?set-?project-?base-?directory=(.+)/
Roebe.permanently_set_project_base_directory_to($1.to_s.dup)
else e rev+
'Not found: '+orange(i)
end
end
end
|
.middle_dot ⇒ Object
#
Roebe.middle_dot
This is ·.
#
1047
1048
1049
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1047
def self.middle_dot
EmojiParadise.send(__method__)
end
|
.misc(start_position = 11, end_position = 45, this_word = 'plasma') ⇒ Object
#
Roebe.misc
This method can be used for ad-hoc generation of any ruby code. I use it as a placeholder that is doing mostly just “throwaway” stuff.
#
594
595
596
597
598
599
600
601
602
603
604
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 594
def self.misc(
start_position = 11,
end_position = 45,
this_word = 'plasma'
)
(start_position .. end_position).to_a.each {|number|
line = ('c'+this_word+number.to_s+':').ljust(16)+
' ry '+this_word+number.to_s
e line
}
end
|
.mittelwert(i) ⇒ Object
288
289
290
|
# File 'lib/roebe/math/math.rb', line 288
def self.mittelwert(i)
::Roebe::Math.mittelwert(i)
end
|
.mixed_case(i) ⇒ Object
#
Roebe.mixed_case
Usage examples:
Roebe.mixed_case("ADAM SMITH") Roebe.mixed_case("adam smith") Roebe.mixed_case("aDAM sMiTh")
#
517
518
519
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 517
def self.mixed_case(i)
i.downcase.gsub(/\b\w/) {|entry| entry.upcase }
end
|
.money_bag ⇒ Object
#
Roebe.money_bag
puts Colours.crimson(Roebe.money_bag)
#
520
521
522
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 520
def self.money_bag
EmojiParadise.send(__method__)
end
|
.month_to_number(i = 'Sep') ⇒ Object
#
Roebe.month_to_number
This method will convert a month, as String, such as ‘Sep’, into the appropriate number, aka 9.
Usage examples:
Roebe.month_to_number('Jan') Roebe.month_to_number('Sep')
#
181
182
183
184
185
186
187
188
|
# File 'lib/roebe/time/time.rb', line 181
def self.month_to_number(i = 'Sep')
array = Roebe.array_short_monthnames
if i and !i.empty?
array.find_index(i) + 1
else
nil
end
end
|
.mount_procs(use_this_directory_for_the_chroot = '/Depot/Chroot/') ⇒ Object
#
Roebe.mount_procs
This method can be used to mount procs, such as typically necessary for a “Linux from scratch” system.
#
15
16
17
18
19
|
# File 'lib/roebe/toplevel_methods/mount_procs.rb', line 15
def self.mount_procs(
use_this_directory_for_the_chroot = '/Depot/Chroot/'
)
esystem "mount -vt proc proc #{use_this_directory_for_the_chroot}proc"
end
|
.move_content_of_this_directory_to_that_directory_unless_target_already_exists(a, b) ⇒ Object
#
Roebe.move_content_of_this_directory_to_that_directory_unless_target_already_exists
#
.move_to_torrent_directory(i = :all_torrent_files_in_the_current_directory, target_directory = '/Depot/Torrents/', be_verbose = :be_verbose) ⇒ Object
#
Roebe.move_to_torrent_directory
This method will move all .torrent files into the target directory. The target_directory is the second argument to this method. Obviously this directory should exist.
The first directory to this method will, by default, attempt to obtain all .torrent files in this directory.
#
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/roebe/toplevel_methods/move_to_torrent_directory.rb', line 23
def self.move_to_torrent_directory(
i = :all_torrent_files_in_the_current_directory,
target_directory = '/Depot/Torrents/',
be_verbose = :be_verbose
)
if File.directory? target_directory
case i
when :all_torrent_files_in_the_current_directory
i = Dir['*.torrent']
end
if i.empty?
e 'No '+Colours.crimson('.torrent')+' file has been given to the method '+
Colours.crimson('Roebe.move_to_torrent_directory()')+'.'
else
Roebe.move_files(i, target_directory, be_verbose)
end
else
e "The target directory at `#{target_directory}` does not exist."
end
end
|
.music_flat_sign ⇒ Object
#
Roebe.music_flat_sign
The symbol will be: ♭
#
848
849
850
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 848
def self.music_flat_sign
EmojiParadise.send(__method__)
end
|
.music_natural_sign ⇒ Object
#
Roebe.music_natural_sign
The symbol will be: ♮
#
857
858
859
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 857
def self.music_natural_sign
EmojiParadise.send(__method__)
end
|
.music_sharp_sign ⇒ Object
#
Roebe.music_sharp_sign
The symbol will be: ♯
#
866
867
868
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 866
def self.music_sharp_sign
EmojiParadise.send(__method__)
end
|
.mv(old, new, be_verbose = false) ⇒ Object
#
Roebe.mv
Toplevel method to move files.
#
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/roebe/toplevel_methods/move_file.rb', line 18
def self.mv(
old, new, be_verbose = false
)
if old.is_a? Array
old.each {|entry|
mv(entry, new, be_verbose)
}
else
case be_verbose
when :be_verbose
be_verbose = true
end
if be_verbose
e "#{rev}Moving `#{sfancy(old)}` to `#{sdir(new)}`."
end
FileUtils.mv(old, new)
end
end
|
.n_characters_in_this_file(this_file, ignore_newlines = true) ⇒ Object
#
Roebe.n_characters_in_this_file
This method will return a number, which tells us how many characters are in the given input-file.
The input-file is the first argument to this method.
The second parameter of this method determines whether we will ignore newlines or whether we will not. By default we will ignore (and thus remove) newlines.
#
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/roebe/toplevel_methods/n_characters_in_this_file.rb', line 23
def self.n_characters_in_this_file(
this_file,
ignore_newlines = true
)
result = 0
if this_file.is_a? Array
this_file = this_file.join(' ').strip
end
if File.exist? this_file
result = File.read(this_file)
if ignore_newlines
result.delete!("\n")
end
result = result.size
end
return result
end
|
.n_files(i = ARGV) ⇒ Object
95
96
97
|
# File 'lib/roebe/classes/n_files.rb', line 95
def self.n_files(i = ARGV)
::Roebe::NFiles.new(i)
end
|
.n_files_are_available_in_total ⇒ Object
#
Roebe.n_files_are_available_in_total
This method returns how many files are available on the local computer system (a Linux system that is).
#
118
119
120
121
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 118
def self.n_files_are_available_in_total
result = `find / . -type f -print 2> /dev/null | wc -l`
return result.strip.to_i
end
|
.nano_addons ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/roebe/toplevel_methods/nano_addons.rb', line 15
def self.nano_addons
base_dir = DIRECTORY_CONTAINING_THE_NANO_RC_FILES
nanorc_file = ENV['HOME'].to_s+'/.nanorc'
if File.exist? nanorc_file
File.delete(nanorc_file)
end
all_files = Dir[base_dir+'*.md'].reject {|entry|
entry.include? 'README.md'
}
e 'We will append these files next:'
pp all_files
all_files.each {|file|
dataset = File.read(file)+"\n"
SaveFile.append_what_into(dataset, nanorc_file)
}
e "Storing into `#{nanorc_file}`."
end
|
.new_konsole_tab ⇒ Object
#
Roebe.new_konsole_tab
Use this method to open a new konsole tab.
#
16
17
18
19
|
# File 'lib/roebe/toplevel_methods/new_konsole_tab.rb', line 16
def self.new_konsole_tab
_ = 'konsole --new-tab &'
esystem _
end
|
#
Roebe.newstud1
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud1.rb', line 16
def self.newstud1
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud10 ⇒ Object
#
Roebe.newstud10
This makes the tenth newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud10.rb', line 16
def self.newstud10
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud11 ⇒ Object
#
Roebe.newstud11
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud11.rb', line 16
def self.newstud11
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud12 ⇒ Object
#
Roebe.newstud12
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud12.rb', line 16
def self.newstud12
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud13 ⇒ Object
#
Roebe.newstud13
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud13.rb', line 16
def self.newstud13
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud14 ⇒ Object
#
Roebe.newstud14
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud14.rb', line 16
def self.newstud14
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud15 ⇒ Object
#
Roebe.newstud15
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud15.rb', line 16
def self.newstud15
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud16 ⇒ Object
#
Roebe.newstud16
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud16.rb', line 16
def self.newstud16
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud17 ⇒ Object
#
Roebe.newstud17
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud17.rb', line 16
def self.newstud17
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud18 ⇒ Object
#
Roebe.newstud18
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud18.rb', line 16
def self.newstud18
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud19 ⇒ Object
#
Roebe.newstud19
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud19.rb', line 16
def self.newstud19
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
#
Roebe.newstud2
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud2.rb', line 16
def self.newstud2
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud20 ⇒ Object
#
Roebe.newstud20
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud20.rb', line 16
def self.newstud20
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud21 ⇒ Object
#
Roebe.newstud21
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud21.rb', line 16
def self.newstud21
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud22 ⇒ Object
#
Roebe.newstud22
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud22.rb', line 16
def self.newstud22
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud23 ⇒ Object
#
Roebe.newstud23
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud23.rb', line 16
def self.newstud23
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud24 ⇒ Object
#
Roebe.newstud24
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud24.rb', line 16
def self.newstud24
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
.newstud25 ⇒ Object
#
Roebe.newstud25
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud25.rb', line 16
def self.newstud25
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
#
Roebe.newstud3
This makes the third newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud3.rb', line 16
def self.newstud3
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
#
Roebe.newstud4
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud4.rb', line 16
def self.newstud4
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
#
Roebe.newstud5
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud5.rb', line 16
def self.newstud5
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
#
Roebe.newstud6
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud6.rb', line 16
def self.newstud6
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
#
Roebe.newstud7
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud7.rb', line 16
def self.newstud7
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
#
Roebe.newstud8
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud8.rb', line 16
def self.newstud8
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
#
Roebe.newstud9
This makes the secondary newstud setting.
#
16
17
18
|
# File 'lib/roebe/toplevel_methods/newstud/newstud9.rb', line 16
def self.newstud9
Studium::NewStud[__method__.to_s[/(\d+)/]]
end
|
#
Roebe.no_caps
This method can be used to disable the caps-lock key.
It may be that only the setxkbmap entry (see below) is necessary, but for the time being we will also retain the two xmodmap commands.
On 29.02.2020 the first two lines were disabled, though.
#
19
20
21
22
23
|
# File 'lib/roebe/toplevel_methods/no_caps.rb', line 19
def self.no_caps
esystem "setxkbmap -option ctrl:nocaps"
end
|
.non_ascii ⇒ Object
#
Roebe.non_ascii
Get rid of trailing .ascii names.
#
238
239
240
241
242
243
244
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 238
def self.non_ascii
Dir['*.ascii'].each {|file|
new_filename = file.sub(/\.ascii$/,'')
e 'Now modifying '+file+' to '+new_filename+'.'
mv(file, new_filename)
}
end
|
.not_equal_to ⇒ Object
#
Roebe.not_equal_to
This is ≠.
#
766
767
768
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 766
def self.not_equal_to
EmojiParadise.send(__method__)
end
|
.ntrad(i = ARGV) ⇒ Object
#
Roebe.ntrad (ntrad tag)
This method can be used to compile a program from source in a “non-traditional way” - meaning to compile it into an AppDir prefix, such as “/Programs/Gnumeric/4.3.2/”.
#
18
19
20
21
22
23
|
# File 'lib/roebe/toplevel_methods/ntrad.rb', line 18
def self.ntrad(
i = ARGV
)
require 'rbt/utility_scripts/ntrad.rb'
RBT.ntrad(i)
end
|
.number_to_english(i = 1) ⇒ Object
#
Roebe.number_to_english
#
152
153
154
|
# File 'lib/roebe/classes/number_to_english.rb', line 152
def self.number_to_english(i = 1)
Roebe::NumberToEnglish[i]
end
|
.ocra_build(a = ARGV, b = :default) ⇒ Object
.open(i = ARGV) ⇒ Object
328
329
330
331
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 328
def self.open(i = ARGV)
require 'open'
::Open[i]
end
|
.open_in_browser(i = ARGV) ⇒ Object
#
Roebe.open_in_browser
Use this method if you wish to open an URL in the browser.
#
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/roebe/toplevel_methods/open_in_browser.rb', line 14
def self.open_in_browser(
i = ARGV
)
require 'roebe/toplevel_methods/e.rb'
begin
require 'open/in_browser/in_browser.rb' unless Object.const_defined? :Open
rescue LoadError
e 'The gem open is not installed.'
end
::Open.in_browser(i) { :try_to_use_localhost_URLs }
end
|
.open_in_editor(i = ARGV) ⇒ Object
#
Roebe.open_in_editor (open tag)
Open a file in the editor with this method.
#
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/open_in_editor.rb', line 16
def self.open_in_editor(
i = ARGV
)
begin
require 'open'
Open.in_editor(i) rescue LoadError
e 'module Roebe: the project called open is not '\
'available. Consider installing it via: '\
'gem install open'
end
end
|
.open_in_editor_and_browser(this = ARGV) ⇒ Object
#
Roebe.open_in_editor_and_browser
Invocation example:
open_in_editor_and_browser admin
#
20
21
22
23
24
25
|
# File 'lib/roebe/toplevel_methods/open_in_editor_and_browser.rb', line 20
def self.open_in_editor_and_browser(this = ARGV)
require 'roebe/browser/browser.rb'
this = this.first if this.is_a? Array
open_in_editor(this)
self.firefox(this)
end
|
.open_ports? ⇒ Boolean
#
Roebe.open_ports?
This method will return, as an Array, which ports are open on the given computer system.
Usage example:
array = Roebe.open_ports?
#
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/roebe/toplevel_methods/open_ports.rb', line 39
def self.open_ports?
require 'socket'
array_open_ports = []
check_up_to_these_ports = 16_096
1.upto(check_up_to_these_ports) {|this_port|
begin
t = TCPSocket.new('localhost', this_port)
rescue Errno::ECONNREFUSED
else
array_open_ports << this_port
t.close
end
}
return array_open_ports
end
|
.opnn(use_this_namespace = { namespace: NAMESPACE }) ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/roebe/toplevel_methods/opnn.rb', line 20
def self.opnn(
use_this_namespace = { namespace: NAMESPACE }
) if use_this_namespace.is_a? Hash
namespace = use_this_namespace
elsif use_this_namespace.is_a? String
namespace = { namespace: use_this_namespace }
end
Opn.opn(namespace) if Object.const_defined? :Opn
end
|
.orange(i = '') ⇒ Object
301
302
303
304
|
# File 'lib/roebe/colours/colours.rb', line 301
def self.orange(i = '')
return COLOURS.orange(i) if @use_colours
return i
end
|
.orchid(i = '', use_colours = @use_colours) ⇒ Object
365
366
367
368
369
370
371
|
# File 'lib/roebe/colours/colours.rb', line 365
def self.orchid(
i = '',
use_colours = @use_colours
)
return COLOURS.orchid(i) if use_colours
return i
end
|
.padding? ⇒ Boolean
#
Roebe.padding?
This method will return my preferred padding - which is two spaces.
#
173
174
175
|
# File 'lib/roebe/toplevel_methods/files.rb', line 173
def self.padding?
' '
end
|
.palemoon(this_remote_url = ARGV) ⇒ Object
37
38
39
|
# File 'lib/roebe/browser/palemoon.rb', line 37
def self.palemoon(this_remote_url = ARGV)
Roebe::Palemoon.new(this_remote_url)
end
|
.parse_commandline(i = ARGV) ⇒ Object
#
Roebe.parse_commandline
#
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/roebe/commandline/parse_commandline.rb', line 12
def self.parse_commandline(
i = ARGV
)
if i.is_a? Array
case i.first
when /^--pristine$/i
require 'roebe/classes/pristine_gems.rb'
::Roebe::PristineGems.new(i.last)
when /^--extract$/i
require 'roebe/classes/simple_extractor.rb'
Roebe::SimpleExtractor.new(i)
else
i.each {|entry| parse_commandline(entry)}
end
else
case i
when /help/
Roebe.show_help else require 'roebe/commandline/menu.rb' unless Roebe.respond_to? :menu
Roebe.(i)
end
end
end
|
.password(i = ARGV) ⇒ Object
#
Roebe.password
Usage example for my home system:
Roebe.password(:etec)
#
751
752
753
|
# File 'lib/roebe/classes/passwords.rb', line 751
def self.password(i = ARGV)
Roebe::Passwords.new(i)
end
|
.path? ⇒ Boolean
#
Roebe.path?
Return the PATH variable in use.
#
29
30
31
|
# File 'lib/roebe/toplevel_methods/env.rb', line 29
def self.path?
@env['PATH']
end
|
.permanently_disable_colours ⇒ Object
#
Roebe.permanently_disable_colours
#
.permanently_set_project_base_directory_to(i) ⇒ Object
#
Roebe.permanently_set_project_base_directory_to
To invoke this from the commandline, do:
roebe --set-project-base-directory=/opt
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/roebe/toplevel_methods/permanently_set_project_base_directory_to.rb', line 20
def self.permanently_set_project_base_directory_to(i)
i = i.dup if i.frozen?
i << '/' unless i.end_with? '/'
_ = FILE_PROJECT_BASE_DIRECTORY
e 'Now permanently setting the project base directory '\
'to '+sdir(i)+'. (Storing in '+sfile(_)+')'
into = _
what = YAML.dump(i)
write_what_into(what, into)
if is_on_roebe?
into = RUBY_SRC+'roebe/lib/roebe/yaml/'+File.basename(into)
if File.directory?(File.dirname(into))
write_what_into(what, into)
end
end
end
|
.permanently_use_palemoon(where = DEFAULT_ASSUMED_PATH_TO_THE_PALEMOON_BINARY) ⇒ Object
#
Roebe.permanently_use_palemoon
This method can be used to permanently enable palemoon as the primary browser on the given computer system. By default the target will be /usr/bin/palemoon, for the main palemoon binary. Supply another path if palemoon is in another directory.
#
49
50
51
52
53
|
# File 'lib/roebe/browser/palemoon.rb', line 49
def self.permanently_use_palemoon(
where = DEFAULT_ASSUMED_PATH_TO_THE_PALEMOON_BINARY
)
Roebe::Browser.permanently_use_this_browser(where, :default)
end
|
550
551
552
|
# File 'lib/roebe/gui/universal_widgets/ping_widget/ping_widget.rb', line 550
def self.ping_widget
Roebe::GUI::PingWidget.run
end
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/roebe/toplevel_methods/platform.rb', line 14
def self.platform
case RUBY_PLATFORM
when /linux/i,
/freebsd/i,
/bsd/i,
/solaris/i,
/hpux/i,
/powerpc-darwin/i
:linux when /mswin32/i,
/mingw32/i, /cygwin/i, /bccwin32/i
:windows
when /java/i
:java
else
:other
end
end
|
.play_columbo_files(use_this_base_directory = '/home/x/video/', play_n_files = nil) ⇒ Object
#
Roebe.play_columbo_files
Play all columbo files.
#
148
149
150
151
152
153
154
155
156
157
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 148
def self.play_columbo_files(
use_this_base_directory = '/home/x/video/',
play_n_files = nil
)
require 'multimedia_paradise/video/columbo/columbo.rb'
MultimediaParadise::Columbo.new {{
use_this_base_directory: use_this_base_directory,
play_n_files: play_n_files
}}
end
|
.play_random_married_with_children_video ⇒ Object
#
Roebe.play_random_married_with_children_video
#
296
297
298
299
300
301
302
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 296
def self.play_random_married_with_children_video
target = '/Depot/Video/Comedy/Married_With_Children-Season'
all_files = Dir[target+'*/**/**']
random_file = all_files.sample
e 'Playing this file now: '+sfile(random_file)
esystem 'mplayer '+random_file
end
|
.play_random_simpsons_movie(i = ARGV) ⇒ Object
#
Roebe.play_random_simpsons_movie
#
202
203
204
205
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 202
def self.play_random_simpsons_movie(i = ARGV)
require 'multimedia_paradise/video/simpsons.rb'
MulimediaParadise::Simpsons.new(i) end
|
.play_random_songs(from_this_directory = '/home/x/songs/') ⇒ Object
#
Roebe.play_random_songs
This method is mostly just useful on my home setup. It will fetch audio-songs from the given directory, and then simply use mpv to randomly play a song from that list.
#
264
265
266
267
268
269
270
271
272
273
274
275
276
|
# File 'lib/roebe/commandline/misc.rb', line 264
def self.play_random_songs(
from_this_directory = '/home/x/songs/'
)
available_songs = Dir["#{from_this_directory}*"].select {|entry|
is_audio_file?(entry)
}
loop {
sample = available_songs.sample
e
esystem "mpv #{sample}"
e
}
end
|
.populate_important_pdf_files(use_this_directory = DIRECTORY_ROEBE_YAML_PDF) ⇒ Object
#
Roebe.populate_important_pdf_files
The first argument to this method specifies the path to a directory containing the .yml files which will be read.
#
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/roebe/toplevel_methods/important_pdf_files.rb', line 41
def self.populate_important_pdf_files(
use_this_directory = DIRECTORY_ROEBE_YAML_PDF
)
@important_pdf_files = []
Dir["#{use_this_directory}*.yml"].sort.each {|this_file|
if File.exist?(this_file)
dataset = YAML.load_file(this_file)
dataset = iso_encoding(dataset)
if dataset.include? '$' dataset = convert_global_env(dataset)
end
@important_pdf_files << dataset
end
}
end
|
.populate_this_directory_with_rcfiles(i) ⇒ Object
#
Roebe.populate_this_directory_with_rcfiles
#
666
667
668
669
670
671
672
673
674
675
676
677
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 666
def self.populate_this_directory_with_rcfiles(i)
i = i.to_s.squeeze(' ').squeeze('/')
unless i.end_with? '/'
i = i.dup if i.frozen?
i << '/'
end
unless i == '/'
mkdir(i) unless File.directory? i
require 'rcfiles'
Rcfiles.populate_this_directory(i)
end
end
|
.pp_output(i) ⇒ Object
#
Roebe.pp_output
To test this method, try something like this:
pp_output @_
#
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/roebe/toplevel_methods/pp_output.rb', line 19
def self.pp_output(i)
if i.is_a? Array
i.each {|entry| pp_output(entry) }
else
if i and i.include?('@')
pp get_ivar(i)
else
pp i
end
end
end
|
.prepare_geas ⇒ Object
#
Roebe.prepare_geas
Prepare some code for GEAS.
#
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 325
def self.prepare_geas
base_dir = '/Depot/jj'
Dir.chdir(base_dir)
date = Time.now.strftime('%d.%m.%Y')
dir_name = 'taniel_and_lilith-'+date
Dir.mkdir(dir_name) if Dir.pwd == base_dir && ! File.exist?(dir_name)
Dir.chdir(dir_name)
_ = 'cp -r '+ENV['GEAS']+'/WIZARD/usr/linette/taniel .'
puts _
system(_)
_ = 'cp -r '+ENV['GEAS']+'/WIZARD/usr/linette/lilith .'
system(_)
Dir.chdir(base_dir)
puts 'Within '+Dir.pwd
require 'x/tools/ruby_totarbz2.rb'
ToTarBz2.new(dir_name)
puts 'Done!'
end
|
.prettify_url(i = :installation, shall_we_replace_the_localhost = :default) ⇒ Object
#
Roebe.prettify_url
This will delegate towards class BeautifulUrl, since as of July 2011.
This method is to be used consistently whenever we seek a “correct” URL that has been pre-registered in the BeautifulUrl namespace.
We purposely do not make use of Arrays, because we want to return something.
Usage example:
Roebe.prettify_url(:installation)
It will return a String.
@return [String]
#
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/roebe/toplevel_methods/sanitize_url.rb', line 33
def self.prettify_url(
i = :installation,
shall_we_replace_the_localhost = :default )
case shall_we_replace_the_localhost
when :default
shall_we_replace_the_localhost = true
end
if i.is_a? Array
i = i.first end
_ = i.to_s.dup
if Object.const_defined? :BeautifulUrl
_ = BeautifulUrl::BeautifulUrl.new(_, :do_not_run_yet)
_.shall_we_replace_localhost = shall_we_replace_the_localhost
_.run
end
unless _.is_a? String
_ = _.string?
end
return _
end
|
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
# File 'lib/roebe/toplevel_methods/unicode/map_input_to_unicode_symbol.rb', line 232
def self.print_this_unicode_input(i = ARGV)
_ = i.partition {|entry|
entry.start_with?('--')
}
commandline_options = _.first
i = _.last
properly_joined = i.join.strip.prepend(':')
if properly_joined.include? '*'
splitted = properly_joined.split('*')
_ = Roebe.map_input_to_unicode_symbol(splitted.first)
_ = _ * splitted[1].to_i
else
_ = Roebe.map_input_to_unicode_symbol(properly_joined)
end
if commandline_options and !commandline_options.empty?
first = commandline_options.first.delete('-')
if is_a_html_colour? first
_ = COLOURS.send(first, _)
end
end
puts _
end
|
.pristine_gems(i = ARGV) ⇒ Object
61
62
63
64
65
|
# File 'lib/roebe/classes/pristine_gems.rb', line 61
def self.pristine_gems(
i = ARGV
)
Roebe::PristineGems.new(i)
end
|
.programs_directory? ⇒ Boolean
#
Roebe.programs_directory?
Obtain a handle towards /Programs/, while also honouring $MY_PROGRAMS.
#
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/programs_directory.rb', line 18
def self.programs_directory?
this_key = 'MY_PROGRAMS'
if ENV and ENV.has_key?(this_key)
rds( "#{ENV[this_key]}/"
)
else
'/home/Programs/'
end
end
|
.project_base_dir? ⇒ Boolean
#
Roebe.project_base_dir?
#
33
34
35
|
# File 'lib/roebe/project/project.rb', line 33
def self.project_base_dir?
@project_base_directory
end
|
.project_yaml_dir?(i = @project_base_directory) ⇒ Boolean
#
Roebe.project_yaml_dir?
This has to dynamically determine the yaml/ directory of the Roebe project. In the past we also used a constant, but this is discouraged - use the method here; it is more convenient in the long run.
#
70
71
72
73
74
|
# File 'lib/roebe/project/project.rb', line 70
def self.project_yaml_dir?(
i = @project_base_directory
)
"#{i}yaml/"
end
|
.publish_gem(i = ARGV) ⇒ Object
241
242
243
|
# File 'lib/roebe/classes/publish_gem.rb', line 241
def self.publish_gem(i = ARGV)
Roebe::PublishGem.new(i)
end
|
.purge_both(i = ARGV) ⇒ Object
#
Roebe.purge_both
This simply combines purgebin() with purgelib().
These two methods can remove binaries and libraries, respectively.
#
42
43
44
45
|
# File 'lib/roebe/toplevel_methods/purgeboth.rb', line 42
def self.purge_both(i = ARGV)
purgebin(i)
purgelib(i)
end
|
.purgebin(i) ⇒ Object
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/roebe/toplevel_methods/purgeboth.rb', line 24
def self.purgebin(i)
begin
require 'rbt/utility_scripts/purge_binaries_of_this_program.rb'
rescue LoadError; end
if i.is_a? Array
i.each {|entry| purgebin(entry) }
else
RBT::PurgeBinariesOfThisProgram.new(i)
end
end
|
.purgelib(i) ⇒ Object
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/roebe/toplevel_methods/purgeboth.rb', line 10
def self.purgelib(i)
begin
require 'rbt/utility_scripts/purge_libraries_of_this_program.rb'
rescue LoadError; end
if i.is_a? Array
i.each {|entry| purgelib(entry) }
else
RBT::PurgeLibrariesOfThisProgram.new(i)
end
end
|
.purple(i = '', use_colours = @use_colours) ⇒ Object
376
377
378
379
380
381
382
|
# File 'lib/roebe/colours/colours.rb', line 376
def self.purple(
i = '',
use_colours = @use_colours
)
return COLOURS.purple(i) if use_colours
return i
end
|
.puts_this(i) ⇒ Object
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/roebe/toplevel_methods/puts_this.rb', line 12
def self.puts_this(i)
if i.respond_to? :read
i = i.read
end
begin
$stdout.puts i
rescue Errno::EPIPE
exit(74)
end
end
|
.pythagoras(a, b) ⇒ Object
#
Roebe.pythagoras
pyth 2,3
#
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/math.rb', line 15
def self.pythagoras(a, b)
if a.is_a? Array
if a.size > 1
_ = a
a = _[0]
b = _[1]
end
end
a = a.to_f
b = b.to_f
c = Math.sqrt(a ** 2 + b ** 2) return c
end
|
.python_multiline ⇒ Object
#
Roebe.python_multiline
#
349
350
351
352
353
354
355
356
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 349
def self.python_multiline
e
e '"""'
e ' Hello'
e ' World'
e '"""'
e
end
|
.quadrant_lower_left ⇒ Object
#
Roebe.quadrant_lower_left
#
195
196
197
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 195
def self.quadrant_lower_left
EmojiParadise.quadrant_lower_left
end
|
.quadrant_lower_right ⇒ Object
#
Roebe.quadrant_lower_right
#
202
203
204
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 202
def self.quadrant_lower_right
EmojiParadise.quadrant_lower_right
end
|
.quadrant_upper_left ⇒ Object
#
Roebe.quadrant_upper_left
#
209
210
211
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 209
def self.quadrant_upper_left
EmojiParadise.quadrant_upper_left
end
|
.quadrant_upper_left_and_lower_left_and_lower_right ⇒ Object
#
Roebe.quadrant_upper_left_and_lower_left_and_lower_right
#
216
217
218
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 216
def self.quadrant_upper_left_and_lower_left_and_lower_right
EmojiParadise.quadrant_upper_left_and_lower_left_and_lower_right
end
|
.quadrant_upper_left_and_lower_right ⇒ Object
#
Roebe.quadrant_upper_left_and_lower_right
#
223
224
225
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 223
def self.quadrant_upper_left_and_lower_right
EmojiParadise.quadrant_upper_left_and_lower_right
end
|
.quadrant_upper_left_and_upper_right_and_lower_left ⇒ Object
#
Roebe.quadrant_upper_left_and_upper_right_and_lower_left
#
230
231
232
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 230
def self.quadrant_upper_left_and_upper_right_and_lower_left
EmojiParadise.quadrant_upper_left_and_upper_right_and_lower_left
end
|
.quadrant_upper_left_and_upper_right_and_lower_right ⇒ Object
#
Roebe.quadrant_upper_left_and_upper_right_and_lower_right
#
237
238
239
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 237
def self.quadrant_upper_left_and_upper_right_and_lower_right
EmojiParadise.quadrant_upper_left_and_upper_right_and_lower_right
end
|
.quadrant_upper_right ⇒ Object
#
Roebe.quadrant_upper_right
#
244
245
246
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 244
def self.quadrant_upper_right
EmojiParadise.quadrant_upper_right
end
|
.quadrant_upper_right_and_lower_left ⇒ Object
#
Roebe.quadrant_upper_right_and_lower_left
#
251
252
253
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 251
def self.quadrant_upper_right_and_lower_left
EmojiParadise.quadrant_upper_right_and_lower_left
end
|
.quadrant_upper_right_and_lower_left_and_lower_right ⇒ Object
#
Roebe.quadrant_upper_right_and_lower_left_and_lower_right
#
258
259
260
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 258
def self.quadrant_upper_right_and_lower_left_and_lower_right
EmojiParadise.quadrant_upper_right_and_lower_left_and_lower_right
end
|
.quarter_note ⇒ Object
#
Roebe.quarter_note
The symbol will be: ♩
#
821
822
823
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 821
def self.quarter_note
EmojiParadise.send(__method__)
end
|
.query_length_of(i = main_file?
) ⇒ Object
#
Roebe.query_length_of
#
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 460
def self.query_length_of(
i = main_file?
)
begin
unless Object.const_defined? :MultimediaParadise
require 'multimedia_paradise/requires/require_file_duration.rb'
end
rescue LoadError; end
i = main_file? if i.nil?
if i.is_a? Array
i.each {|entry| query_length_of(entry) }
else
i = i.to_s
if File.exist? i
if Object.const_defined? :MultimediaParadise
_ = MultimediaParadise::FileDuration.new(i, :do_not_exit).duration.to_s e "The file #{sfancy(i)} has a duration of #{simp(_)} seconds."
else
e 'Please install the project called '\
'multimedia_paradise ( gem install multimedia_paradise )'
end
else
e 'No file exists at '+sfile(i)+'.'
end
end
end
|
.random_background(i = ARGV) ⇒ Object
#
Roebe.random_background
#
181
182
183
|
# File 'lib/roebe/classes/random_background.rb', line 181
def self.random_background(i = ARGV)
RandomBackground.new(i)
end
|
.random_background_via_n_delay(i = ARGV, delay = 1) ⇒ Object
#
Roebe.random_background_via_n_delay
#
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
# File 'lib/roebe/classes/random_background.rb', line 188
def self.random_background_via_n_delay(
i = ARGV, delay = 1
)
if i.empty?
i = Dir[Roebe::RandomBackground::IMG_DIRECTORY+'NJOY/**/*'].flatten
end
loop {
i.each {|this_file|
Roebe.random_background(this_file)
sleep delay
}
break
}
end
|
.random_gtk ⇒ Object
452
453
454
455
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 452
def self.random_gtk
require 'gtk_paradise'
Gtk.run_a_random_gtk_class
end
|
.random_open(i = ARGV) ⇒ Object
102
103
104
|
# File 'lib/roebe/classes/random_open.rb', line 102
def self.random_open(i = ARGV)
RandomOpen.new(i)
end
|
.rds(i = '') ⇒ Object
#
RBT.rds
rds is short for “remove double slashes”. This method will always remove double slashes from a String.
#
15
16
17
18
19
20
21
22
23
|
# File 'lib/roebe/toplevel_methods/rds.rb', line 15
def self.rds(i = '')
begin
i = i.to_s.dup return i.squeeze('/')
rescue Exception => error
p error
end
return i
end
|
.readlines(i) ⇒ Object
#
Roebe.readlines
This is a simple “wrapper” over File.readlines().
#
223
224
225
|
# File 'lib/roebe/toplevel_methods/files.rb', line 223
def self.readlines(i)
File.readlines(i)
end
|
.register_sigint(optional_show_this_message = '', &block) ⇒ Object
#
Roebe.register_sigint
#
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/roebe/toplevel_methods/register_sigint.rb', line 54
def self.register_sigint(
optional_show_this_message = '',
&block
)
Signal.trap('SIGINT') {
if optional_show_this_message and
!optional_show_this_message.empty?
e optional_show_this_message
end
}
Roebe::Sigint.register(&block)
end
|
.registered_unicode_symbols ⇒ Object
#
Roebe.registered_unicode_symbols
This method will return an Array listing which unicode-symbols have been registered in the Roebe project so far. This may have to be extended manually, so remain consistent about it.
#
64
65
66
67
68
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 64
def self.registered_unicode_symbols
(
(2600 .. 2619).to_a + ('260A' .. '260F').to_a
).flatten.map(&:to_s)
end
|
.remove_directory(i = ARGV, delete_only_empty_directories = false) ⇒ Object
#
Roebe.remove_directory
This method can be used to delete directories.
#
195
196
197
198
199
200
201
202
203
204
205
206
|
# File 'lib/roebe/classes/remove_directory.rb', line 195
def self.remove_directory(
i = ARGV,
delete_only_empty_directories = false
)
case delete_only_empty_directories
when :only_delete_if_it_is_empty
delete_only_empty_directories = true
end
Roebe::RemoveDirectory.new(i) {{
delete_only_empty_directories: delete_only_empty_directories
}}
end
|
.remove_escape_code(from_this_string) ⇒ Object
#
Roebe.remove_escape_code
This method removes ANSI escape codes.
To test this try:
puts Roebe.remove_escape_code("out of maximum \e[31;1m20\e[34;1m players online.\n")
#
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/roebe/toplevel_methods/regex.rb', line 17
def self.remove_escape_code(from_this_string)
use_this_regex = /\e\[\d{0,2};?\d{0,1}m?/
from_this_string.gsub(use_this_regex, '')
end
|
.remove_extension(i) ⇒ Object
#
Roebe.remove_extension
#
85
86
87
88
89
|
# File 'lib/roebe/classes/remove_extension.rb', line 85
def self.remove_extension(i)
[i].flatten.compact.each {|entry|
Roebe::RemoveExtension.new(entry)
}
end
|
.remove_file(this_file, be_verbose = true) ⇒ Object
#
Roebe.remove_file (delete tag, rm tag)
Use this convenience method if you wish to remove/delete a file.
#
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
# File 'lib/roebe/toplevel_methods/files.rb', line 232
def self.remove_file(
this_file, be_verbose = true
)
case be_verbose
when :be_quiet
be_verbose = false
end
these_files = [this_file].flatten.compact
these_files.each {|inner_this_file|
if File.exist?(inner_this_file) and
File.file?(inner_this_file)
unless inner_this_file.include? '/'
this_file = (return_pwd+inner_this_file).squeeze '/'
end
if be_verbose
opn(namespace: 'Roebe') if respond_to?(:opn)
e "#{rev}Removing this file next: #{sfile(inner_this_file)}"
end
File.delete(inner_this_file) if File.exist?(inner_this_file)
end
}
end
|
.remove_html(i = ARGV) ⇒ Object
#
Roebe.remove_html
Usage example:
Roebe.remove_html('string with <span>some</span> html here')
Roebe.remove_html('string with <ud>some</ud> html here')
#
53
54
55
|
# File 'lib/roebe/modules/remove_html.rb', line 53
def self.remove_html(i = ARGV)
::Roebe::RemoveHtml[i]
end
|
.remove_line(i = ARGV) ⇒ Object
161
162
163
164
165
|
# File 'lib/roebe/classes/remove_line.rb', line 161
def self.remove_line(
i = ARGV
)
Roebe::RemoveLine.new(i)
end
|
.remove_old_gem ⇒ Object
308
309
310
311
|
# File 'lib/roebe/classes/update.rb', line 308
def self.remove_old_gem
this_gem = Dir['*.gem'].first
remove_file(this_gem) if this_gem
end
|
.remove_user(i) ⇒ Object
#
Roebe.remove_user
This method will remove a user.
#
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/remove_user.rb', line 17
def self.remove_user(i)
if i.is_a? Array
i.each {|entry| remove_user(entry) }
else
e 'Removing a new user:'
e
cmd = "userdel -r #{i}"
esystem cmd
e
end
end
|
.rename_ascii_files(do_rename_the_files = true, start_position = 24, end_position = 56) ⇒ Object
#
Roebe.rename_ascii_files
This method is primarily used for the ascii_paradise project.
It can be used to rename a bunch of files.
Invoke like so:
rename_ascii_files
#
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 256
def self.rename_ascii_files(
do_rename_the_files = true, start_position = 24,
end_position = 56
)
base_name = 'tears_of_ice_' file_suffix = '.ascii'
range_to_use = (start_position..end_position) array = range_to_use.to_a.reverse
array.each {|number|
_ = 'mv '+base_name+number.to_s+file_suffix+' '+base_name+(number+1).to_s+file_suffix
e _
system _ if do_rename_the_files }
end
|
.rename_file(old_filename, new_filename, be_verbose = true) ⇒ Object
#
Roebe.rename_file (rename tag)
Rename a file that way. We will return true on success, and false on failure.
If the file can not be renamed, ruby raises a SystemCallError by default.
#
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
|
# File 'lib/roebe/toplevel_methods/files.rb', line 285
def self.rename_file(
old_filename,
new_filename,
be_verbose = true )
new_filename = new_filename.dup if new_filename.frozen?
be_verbose = false if be_verbose == :be_silent
if File.exist? old_filename
if old_filename == new_filename
if be_verbose
ewarn "Not renaming the file as "\
"#{sfile(old_filename)} equals #{sfile(new_filename)}."
end
else
case File.ftype(old_filename)
when 'file'
_ = sfile(new_filename)
when 'directory'
new_filename << '/' unless new_filename.end_with? '/'
_ = sdir(new_filename)
end
if old_filename == return_real_filename(new_filename)
if be_verbose
e 'Can not rename these entries as they are '+
'the same. ('+new_filename.to_s+')'
end
return false
else
if be_verbose
e "Renaming #{sfile(old_filename)} to #{sfile(_)}."
end
begin
FileUtils.mv(old_filename, new_filename)
rescue Exception => exception
pp exception.class
pp exception
e 'Exiting for now. old_filename was '+simp(old_filename)+
' and new_filename was '+simp(new_filename)
exit
end
return true
end
end
else if be_verbose
ewarn "But the file #{col(old_filename)} does not "\
"exist, thus we can not rename it."
end
end
return false
end
|
.rename_konsole(i = 'Testing (1) (2) (3)', be_verbose = false) ⇒ Object
#
Roebe.rename_konsole
The first argument is the (new) title of the kde konsole tab.
#
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 309
def self.rename_konsole(
i = 'Testing (1) (2) (3)',
be_verbose = false )
_ = ::Roebe::KdeKonsole.new(i, :do_not_run_yet)
if i.is_a?(Symbol) or (i.is_a?(String) and i.start_with?(':'))
_.do_use_unicode end
_.set_be_verbose(be_verbose)
_.run
end
|
.repetition_pattern(n_times = 3, this_character = '#') ⇒ Object
#
Roebe.repetition_pattern
#
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/toplevel_methods/repetition_pattern.rb', line 12
def self.repetition_pattern(
n_times = 3, this_character = '#'
)
padding = ''.dup
n_times.times {
print padding
n_times.times {
print this_character
}
padding += ' '
padding.size.times {
print this_character
}
print "\n"
}
end
|
.replace_leading_file_name(i) ⇒ Object
#
Roebe.replace_leading_file_name
This method will get rid of a leading “file://” part, so that “file:///Depot/Images/output.png” would become “/Depot/Images/output.png”.
Specific Usage example:
Roebe.replace_leading_file_name('file://foo')
stat file:///FOO.doc
#
23
24
25
26
27
28
29
|
# File 'lib/roebe/toplevel_methods/replace_leading_file_name.rb', line 23
def self.replace_leading_file_name(i)
if i
i.sub(/^file:\/\//, '')
else
i
end
end
|
.replace_localhost_with_data(i) ⇒ Object
#
Roebe.replace_localhost_with_data
This method will replace the leading “localhost” string with “/home/x/data/”.
In short:
"localhost" -> "/home/x/data"
#
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/roebe/toplevel_methods/replace_localhost_with_data.rb', line 23
def self.replace_localhost_with_data(i)
i = rds(i.to_s)
i = i.sub(/^file:\/\//, '').
sub(/^file::\//, '')
_ = env?['MY_DATA']+'/' _ = i.gsub(/localhost/, _)
_ = rds(_)
_[0, 'http:'.size] = '' if _[0, 'http:'.size] == 'http:'
return _
end
|
.replace_space_with_underscore(i = ARGV, &block) ⇒ Object
#
Roebe.replace_space_with_underscore
#
849
850
851
852
853
854
|
# File 'lib/roebe/classes/replace_space_with_underscore/replace_space_with_underscore.rb', line 849
def self.replace_space_with_underscore(
i = ARGV,
&block
)
Roebe::ReplaceSpaceWithUnderscore.new(i, &block)
end
|
.report_classes ⇒ Object
#
Roebe.report_classes
This method will report which classes are available, as part of the Roebe namespace.
#
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/roebe/toplevel_methods/report_classes.rb', line 19
def self.report_classes
_ = "#{Roebe.project_base_dir?}classes/*.rb"
these_classes = Dir[_].map {|line|
line = File.basename(line)
line.sub!(/\.rb$/,'')
line = to_camelcase(line)
'Roebe::'+line
}
e 'These '+these_classes.size.to_s+' classes are available for '\
'the namespace Roebe:'
e
sorted_these_classes = these_classes.sort_by {|entry|
splitted = entry.split('::')
last = splitted.last
last
}
sorted_these_classes.each_with_index {|name, index| index += 1
adjusted = (index.to_s+') ').rjust(7)
e adjusted+name
}; e
end
|
.report_pwd ⇒ Object
21
22
23
|
# File 'lib/roebe/toplevel_methods/return_pwd.rb', line 21
def Roebe.report_pwd
e ::Colours.steelblue(return_pwd)
end
|
.report_ruby_version ⇒ Object
#
Roebe.report_ruby_version
#
43
44
45
|
# File 'lib/roebe/version/version.rb', line 43
def self.report_ruby_version
e RUBY_VERSION
end
|
.report_the_gtk_versions_available ⇒ Object
#
Roebe.report_the_gtk_versions_available
#
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/roebe/toplevel_methods/report_the_gtk_versions_available.rb', line 14
def self.report_the_gtk_versions_available
e
e "#{rev}The various GTK versions available on this computer are:"
e
e seagreen(' gtk2: ')+
steelblue(`pkg-config --modversion gtk+-2.0`.strip)
e seagreen(' gtk3: ')+
steelblue(`pkg-config --modversion gtk+-3.0`.strip)
e seagreen(' gtk4: ')+
steelblue(`pkg-config --modversion gtk4`.strip)
e
end
|
.report_the_location_of_the_default_browser ⇒ Object
#
Roebe.report_the_location_of_the_default_browser
This method can be used to report the full target location to the default browser at hand, based on the availability of a file called ‘browser.yml’
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/roebe/toplevel_methods/report_the_location_of_the_default_browser.rb', line 20
def self.report_the_location_of_the_default_browser
_ = FILE_TO_BROWSER
if File.exist? _
e 'The full location to the default browser in use, is '\
'specified to be at:'
e
e " #{sfile(YAML.load_file(_).strip)}"
e
e '(The file that was used for determining this was '+_+')'
e
else
e "No file exists at `#{_}`."
end
end
|
.report_version ⇒ Object
19
20
21
|
# File 'lib/roebe/version/version.rb', line 19
def self.report_version
puts VERSION
end
|
.require_all_new_stud_ruby_files ⇒ Object
#
Roebe.require_all_new_stud_ruby_files
#
15
16
17
18
19
|
# File 'lib/roebe/toplevel_methods/newstud.rb', line 15
def self.require_all_new_stud_ruby_files
(1..20).each {|number|
require_relative 'newstud/newstud'+number.to_s+'.rb'
}
end
|
.require_all_standalone_classes ⇒ Object
#
Roebe.require_all_standalone_classes
#
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/roebe/requires/require_all_standalone_classes.rb', line 17
def self.require_all_standalone_classes
site_lib_dir = RbConfig::CONFIG['sitelibdir']+'/'
_ = "#{::Roebe::PROJECT_BASE_DIRECTORY}classes/"
Dir["#{_}**/**.rb"].each {|file|
file.sub!(/#{site_lib_dir}/,'')
begin
require file
rescue LoadError => error
puts 'Some problem with '+file+' - we will continue '\
'regardless but the error'
puts 'will be shown in more detail next (LoadError)'
pp error
rescue SyntaxError => error
puts 'A syntax error has occurred for the file '+file+'.'
puts 'Considering fixing this issue, if possible.'
puts 'The specific error is:'
pp error
end
}
begin
require 'open'
rescue LoadError; end
require 'roebe/classes/kde/kde_konsole/kde_konsole.rb'
require 'roebe/classes/generate_gemspec/generate_gemspec.rb'
require 'roebe/classes/modify_shebang_header/modify_shebang_header.rb'
require 'roebe/classes/readme_generator/readme_generator.rb'
require 'roebe/classes/generate_fstab_file/generate_fstab_file.rb'
end
|
.require_all_standalone_module_methods ⇒ Object
#
Roebe.require_all_standalone_module_methods
#
39
40
41
|
# File 'lib/roebe/requires/require_all_standalone_modules.rb', line 39
def self.require_all_standalone_module_methods
Roebe.require_unicode
end
|
.require_all_standalone_modules ⇒ Object
#
Roebe.require_all_standalone_modules
Load up all the individual modules of this project.
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/roebe/requires/require_all_standalone_modules.rb', line 20
def self.require_all_standalone_modules
site_lib_dir = "#{RbConfig::CONFIG['sitelibdir']}/"
_ = ::Roebe.project_base_directory?+'modules/'
target_files = Dir["#{_}**/**.rb"]
target_files.each {|file|
file.sub!(/#{site_lib_dir}/,'')
begin
require file
rescue LoadError; end
}
require 'roebe/modules/http_status_codes/http_status_codes.rb'
end
|
.require_then_include_this_gem(i = :cyberweb) ⇒ Object
#
Roebe.require_then_include_this_gem
#
156
157
158
159
160
161
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 156
def self.require_then_include_this_gem(
i = :cyberweb
)
require i.to_s
include i.to_s.capitalize.to_sym
end
|
.require_this_roebe_class(i) ⇒ Object
#
Roebe.require_this_roebe_class
#
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/roebe/toplevel_methods/require_this_roebe_class.rb', line 12
def self.require_this_roebe_class(
i
)
i = i.dup if i.frozen?
i << '.rb' unless i.end_with? '.rb'
require "roebe/classes/#{i}"
end
|
.require_unicode ⇒ Object
#
Roebe.require_unicode
#
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/roebe/requires/require_unicode.rb', line 14
def self.require_unicode
site_lib_dir = RbConfig::CONFIG['sitelibdir']+'/'
_ = ::Roebe.project_base_directory?+'toplevel_methods/unicode/'
target_files = Dir[_+'*.rb']
target_files.each {|file|
file.sub!(/#{site_lib_dir}/,'')
begin
require file
rescue LoadError; end
}
end
|
.restore_master_boot_record(save_in_this_file = 'backup_mbr', use_this_as_input_device = '/dev/sda') ⇒ Object
#
Roebe.restore_master_boot_record
#
64
65
66
67
68
69
70
71
72
|
# File 'lib/roebe/toplevel_methods/master_boot_record.rb', line 64
def self.restore_master_boot_record(
save_in_this_file = 'backup_mbr',
use_this_as_input_device = '/dev/sda'
)
esystem 'dd if='+save_in_this_file+
' of='+
use_this_as_input_device+
' bs='+MASTER_BOOD_RECORD_SIZE.to_s+' count=1'
end
|
.return_all_remote_entries_from_this_url(i = ARGV) ⇒ Object
#
Roebe.return_all_remote_entries_from_this_url
This method will return an Array of all remote entries found under a particular URL.
#
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/roebe/toplevel_methods/return_all_remote_entries_from_this_url.rb', line 15
def self.return_all_remote_entries_from_this_url(
i = ARGV
)
require 'open-uri'
if i.is_a? Array
i = i.first
end
if i.nil? or i.empty?
i = 'https://www.unicode.org/Public/UNIDATA/'
end
dataset = open(i).read
regex_to_use = /<a href="(.+?)">/
matches = dataset.scan(regex_to_use).flatten
matches.map {|line| line.prepend(i) }
end
|
.return_all_unicode_symbols(max_number = 20_000) ⇒ Object
#
Roebe.return_all_unicode_symbols
This method will simply return all unicode symbols.
#
12
13
14
15
16
17
18
|
# File 'lib/roebe/toplevel_methods/unicode/return_all_unicode_symbols.rb', line 12
def self.return_all_unicode_symbols(
max_number = 20_000
)
(1 .. max_number).to_a.map {|entry|
[entry].pack('U*')
}
end
|
.return_audio_logo(new_title = ARGV) ⇒ Object
#
Roebe.return_audio_logo
The first argument to this method shall be the new title that you wish to use for the given KDE konsole tab.
#
300
301
302
|
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 300
def self.return_audio_logo(new_title = ARGV)
Roebe.return_important_notification(new_title, 'audio-headphones')
end
|
.return_cat_face_with_wry_smile ⇒ Object
#
Roebe.return_cat_face_with_wry_smile
#
436
437
438
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 436
def self.return_cat_face_with_wry_smile
EmojiParadise.send(__method__)
end
|
.return_coloured_unicode_snowman ⇒ Object
#
Roebe.return_coloured_unicode_snowman
#
443
444
445
446
447
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 443
def self.return_coloured_unicode_snowman
require 'roebe/requires/require_unicode.rb'
_ = Roebe.snowman
::Colours.royalblue(_)
end
|
.return_date ⇒ Object
12
13
14
|
# File 'lib/roebe/toplevel_methods/return_date.rb', line 12
def self.return_date
Time.now.strftime '%d.%m.%Y'
end
|
.return_english_weekday(i) ⇒ Object
#
Roebe.return_english_weekday
Usage example:
Roebe.return_english_weekday('03.10.2016')
#
99
100
101
102
103
104
|
# File 'lib/roebe/toplevel_methods/time.rb', line 99
def self.return_english_weekday(i)
day_of_the_week_as_number = ::Time.parse(i.to_s).wday long_name_of_the_day = ::Time::RFC2822_DAY_NAME[day_of_the_week_as_number] result = HASH_SHORT_TO_LONG_WEEKDAYS[long_name_of_the_day] return result
end
|
.return_even_numbered_lines_from_this_file(i) ⇒ Object
#
Roebe.return_even_numbered_lines_from_this_file
This method was specifically written to solve the following problem at Rosalind:
http://rosalind.info/problems/ini5/
#
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/roebe/toplevel_methods/return_even_numbered_lines_from_this_file.rb', line 18
def self.return_even_numbered_lines_from_this_file(i)
i = i.first if i.is_a? Array
if File.exist? i
dataset = File.readlines(i)
dataset = dataset.each_with_index.map {|content, index|
if index.odd?
content
else
nil
end
}.compact
dataset
end
end
|
.return_german_weekday(i = '08.05.2022') ⇒ Object
#
Roebe.return_german_weekday
Usage example:
Roebe.return_german_weekday('03.10.2016')
#
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
# File 'lib/roebe/toplevel_methods/time.rb', line 128
def self.return_german_weekday(
i = '08.05.2022'
)
case i
when :today
i = ::Time.now.strftime('%d.%m.%Y')
end
if i.is_a? ::Time
else
i = ::Time.parse(i)
end
i = Roebe.weekday?(i.wday) i = WEEKDAYS_FROM_ENGLISH_TO_GERMAN[i] i
end
|
.return_hostname ⇒ Object
#
Roebe.return_hostname
Gets the name of our computer host.
#
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/roebe/toplevel_methods/hostname.rb', line 17
def self.return_hostname
if does_this_program_exist? 'hostname'
_ = `hostname`.chomp
elsif File.exist?('/etc/HOSTNAME')
_ = File.read('/etc/HOSTNAME')
else
_ = 'unknown'
end
return _
end
|
.return_important_notification(new_title = ARGV, use_this_as_logo = 'emblem-important') ⇒ Object
#
Roebe.return_important_notification
The first argument is the title that you wish to set for the particular KDE konsole tab at hand.
#
286
287
288
289
290
291
292
|
# File 'lib/roebe/classes/kde/kde_konsole/misc.rb', line 286
def self.return_important_notification(
new_title = ARGV,
use_this_as_logo = 'emblem-important'
)
new_title = new_title.join if new_title.is_a? Array
"\033]32;#{use_this_as_logo}\007\e]30;#{new_title}\007"
end
|
.return_n_aliases(i = ARGV, &block) ⇒ Object
#
Roebe.return_n_aliases
Usage example:
x = Roebe.return_n_aliases { 16 }
#
169
170
171
172
|
# File 'lib/roebe/classes/return_aliases/return_n_aliases.rb', line 169
def self.return_n_aliases(i = ARGV, &block)
x = ::Roebe::ReturnNAliases.new(i, &block)
return x.main_hash
end
|
.return_natürliche_zahl ⇒ Object
#
Roebe.return_natürliche_zahl
This will be “ℕ”.
#
97
98
99
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 97
def self.return_natürliche_zahl
EmojiParadise.send(__method__)
end
|
.return_pid_of_kde_konsole ⇒ Object
#
Roebe.return_pid_of_kde_konsole
This method will return the PID of the KDE konsole.
#
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/roebe/classes/kde/return_pid_of_kde_konsole.rb', line 15
def self.return_pid_of_kde_konsole
result = `ps ax`.split("\n")
result = result.select {|entry|
entry.strip.end_with? ' konsole'
}
unless result.empty?
first = result.first
return first.split(' ').first
end
end
|
.return_pile_of_poo ⇒ Object
#
Roebe.return_pile_of_poo
This is Alt +1F4A9.
See:
https://www.fileformat.info/info/unicode/char/1f4a9/index.htm
#
450
451
452
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 450
def self.return_pile_of_poo
EmojiParadise.send(__method__)
end
|
.return_pwd ⇒ Object
14
15
16
|
# File 'lib/roebe/toplevel_methods/return_pwd.rb', line 14
def self.return_pwd
"#{Dir.pwd}/".squeeze('/')
end
|
.return_random_alphabet_character ⇒ Object
#
Roebe.return_random_alphabet_character
This method will return a random alphabet char.
#
502
503
504
505
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 502
def self.return_random_alphabet_character
alphabet = 'abcdefghijklmnopqrstuvwxyz'
alphabet.sample
end
|
.return_real_filename(i) ⇒ Object
#
Roebe.return_real_filename
This method will return the “real” filename, that is, without any leading “./” parts.
For instance, a file called foobar may be referred to as “./foobar” so this method should return only “foobar”.
#
268
269
270
271
272
273
274
|
# File 'lib/roebe/toplevel_methods/files.rb', line 268
def self.return_real_filename(i)
_ = i.dup if i.start_with? './'
_[0,2] = ''
end
return _
end
|
#
This method will simply (and silently) return a String, containing the typical header we will use for .rb files.
#
114
115
116
|
# File 'lib/roebe/classes/ruby_header.rb', line 114
def self.
Roebe::RubyHeader.
end
|
.return_ruby_use_config_file ⇒ Object
#
Roebe.return_ruby_use_config_file
#
.return_ten_aliases? ⇒ Boolean
#
Roebe.return_ten_aliases?
#
70
71
72
|
# File 'lib/roebe/classes/return_aliases/return_ten_aliases.rb', line 70
def self.return_ten_aliases?
Roebe::ReturnTenAliases[]
end
|
.return_the_date_of_this_doc_file(i) ⇒ Object
#
Roebe.return_the_date_of_this_doc_file
This method accepts a .doc file. It will then use “file” to try and find out the creation time of that file. If that is not possible then nil will be returned.
Usage example:
Roebe.return_the_date_of_this_doc_file('Top__5__Umbau_Grossbüro_Vordertrakt.doc')
#
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 397
def self.return_the_date_of_this_doc_file(i)
if i.is_a? Array
i = i.first end
result = nil
if i and
File.exist?(i) and
i.end_with?('.doc')
result_of_the_file_command = `file #{i}`
if result_of_the_file_command
use_this_regex = /([A-Z][a-z]{2}) ? ?(\d{1,2}) \d{1,2}:\d{1,2}:\d{1,2} (\d{4})/
result_of_the_file_command =~ use_this_regex
result = ($2.to_s).rjust(2,'0')+'.'+
Roebe.month_to_number($1.to_s).to_s.rjust(2,'0')+'.'+
$3.to_s
end
end
return result
end
|
.return_twenty_aliases? ⇒ Boolean
#
Roebe.return_twenty_aliases?
#
71
72
73
|
# File 'lib/roebe/classes/return_aliases/return_twenty_aliases.rb', line 71
def self.return_twenty_aliases?
Roebe::ReturnTwentyAliases[]
end
|
.return_unicode_ascending_node ⇒ Object
#
Roebe.return_unicode_ascending_node
See:
http://www.fileformat.info/info/unicode/char/260a/index.htm
#
482
483
484
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 482
def self.return_unicode_ascending_node
EmojiParadise.send(__method__)
end
|
.return_unicode_ballot_box ⇒ Object
#
Roebe.return_unicode_ballot_box
#
489
490
491
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 489
def self.return_unicode_ballot_box
EmojiParadise.send(__method__)
end
|
.return_unicode_ballot_box_with_check ⇒ Object
#
Roebe.return_unicode_ballot_box_with_check
#
496
497
498
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 496
def self.return_unicode_ballot_box_with_check
EmojiParadise.send(__method__)
end
|
.return_unicode_ballot_box_with_x ⇒ Object
#
Roebe.return_unicode_ballot_box_with_x
#
504
505
506
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 504
def self.return_unicode_ballot_box_with_x
EmojiParadise.send(__method__)
end
|
.return_unicode_black_star ⇒ Object
#
Roebe.return_unicode_black_star
This is the equivalent of: ★
See:
http://www.fileformat.info/info/unicode/char/2605/index.htm
#
780
781
782
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 780
def self.return_unicode_black_star
EmojiParadise.send(__method__)
end
|
.return_unicode_black_sun_with_rays ⇒ Object
#
Roebe.return_unicode_black_sun_with_rays
This represents a “black sun” with some rays. It is also known as “Clear weather”, oddly enough.
#
223
224
225
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 223
def self.return_unicode_black_sun_with_rays
EmojiParadise.send(__method__)
end
|
.return_unicode_black_telephone ⇒ Object
#
Roebe.return_unicode_black_telephone
See:
http://www.fileformat.info/info/unicode/char/260e/index.htm
#
532
533
534
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 532
def self.return_unicode_black_telephone
EmojiParadise.send(__method__)
end
|
.return_unicode_cat ⇒ Object
#
Roebe.return_unicode_cat
See:
https://www.fileformat.info/info/unicode/char/1f408/index.htm
#
382
383
384
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 382
def self.return_unicode_cat
EmojiParadise.send(__method__)
end
|
.return_unicode_cat_face ⇒ Object
#
Roebe.return_unicode_cat_face
See:
http://www.fileformat.info/info/unicode/char/1f431/index.htm
#
462
463
464
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 462
def self.return_unicode_cat_face
EmojiParadise.send(__method__)
end
|
.return_unicode_cloud ⇒ Object
212
213
214
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 212
def self.return_unicode_cloud
EmojiParadise.send(__method__)
end
|
.return_unicode_comet ⇒ Object
#
Roebe.return_unicode_comet
See:
http://www.fileformat.info/info/unicode/char/2604/index.htm
#
290
291
292
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 290
def self.return_unicode_comet
EmojiParadise.send(__method__)
end
|
.return_unicode_conjunction ⇒ Object
#
Roebe.return_unicode_conjunction
See:
http://www.fileformat.info/info/unicode/char/260c/index.htm
#
341
342
343
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 341
def self.return_unicode_conjunction
EmojiParadise.send(__method__)
end
|
.return_unicode_descending_node ⇒ Object
#
Roebe.return_unicode_descending_node
See:
http://www.fileformat.info/info/unicode/char/260b/index.htm
#
331
332
333
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 331
def self.return_unicode_descending_node
EmojiParadise.send(__method__)
end
|
.return_unicode_dog ⇒ Object
#
Roebe.return_unicode_dog
#
389
390
391
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 389
def self.return_unicode_dog
EmojiParadise.send(__method__)
end
|
.return_unicode_dog_face ⇒ Object
#
Roebe.return_unicode_dog_face
#
429
430
431
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 429
def self.return_unicode_dog_face
EmojiParadise.send(__method__)
end
|
.return_unicode_heart ⇒ Object
#
Roebe.return_unicode_heart
#
231
232
233
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 231
def self.return_unicode_heart
EmojiParadise.send(__method__)
end
|
.return_unicode_high_voltage_sign ⇒ Object
#
Roebe.return_unicode_high_voltage_sign
See:
https://www.fileformat.info/info/unicode/char/26a1/index.htm
#
415
416
417
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 415
def self.return_unicode_high_voltage_sign
EmojiParadise.send(__method__)
end
|
.return_unicode_keyboard ⇒ Object
#
Roebe.return_unicode_keyboard
#
396
397
398
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 396
def self.return_unicode_keyboard
EmojiParadise.send(__method__)
end
|
.return_unicode_king ⇒ Object
#
Roebe.return_unicode_king
#
403
404
405
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 403
def self.return_unicode_king
EmojiParadise.send(__method__)
end
|
.return_unicode_lightning ⇒ Object
#
Roebe.return_unicode_lightning
See:
http://www.fileformat.info/info/unicode/char/2607/index.htm
#
311
312
313
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 311
def self.return_unicode_lightning
EmojiParadise.send(__method__)
end
|
.return_unicode_opposition ⇒ Object
#
Roebe.return_unicode_opposition
See:
http://www.fileformat.info/info/unicode/char/260d/index.htm
#
351
352
353
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 351
def self.return_unicode_opposition
EmojiParadise.send(__method__)
end
|
.return_unicode_phone ⇒ Object
#
Roebe.return_unicode_phone
#
422
423
424
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 422
def self.return_unicode_phone
EmojiParadise.send(__method__)
end
|
.return_unicode_shamrock ⇒ Object
#
Roebe.return_unicode_shamrock
#
511
512
513
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 511
def self.return_unicode_shamrock
EmojiParadise.send(__method__)
end
|
.return_unicode_snowman ⇒ Object
#
Roebe.return_unicode_snowman
See:
https://www.fileformat.info/info/unicode/char/2603/index.htm
#
78
79
80
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 78
def self.return_unicode_snowman
EmojiParadise.send(__method__)
end
|
.return_unicode_sun ⇒ Object
#
Roebe.return_unicode_sun
See:
http://www.fileformat.info/info/unicode/char/2609/index.htm
#
472
473
474
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 472
def self.return_unicode_sun
EmojiParadise.send(__method__)
end
|
.return_unicode_television ⇒ Object
#
Roebe.return_unicode_television
See:
http://www.fileformat.info/info/unicode/char/1f4fa/index.htm
#
280
281
282
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 280
def self.return_unicode_television
EmojiParadise.send(__method__)
end
|
.return_unicode_thunderstorm ⇒ Object
#
Roebe.return_unicode_thunderstorm
See:
http://www.fileformat.info/info/unicode/char/2608/index.htm
#
321
322
323
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 321
def self.return_unicode_thunderstorm
EmojiParadise.send(__method__)
end
|
.return_unicode_umbrella ⇒ Object
201
202
203
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 201
def self.return_unicode_umbrella
EmojiParadise.send(__method__)
end
|
.return_unicode_white_star ⇒ Object
#
Roebe.return_unicode_white_star
See:
http://www.fileformat.info/info/unicode/char/2606/index.htm
#
300
301
302
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 300
def self.return_unicode_white_star
EmojiParadise.send(__method__)
end
|
.return_unicode_white_telephone ⇒ Object
#
Roebe.return_unicode_white_telephone
See:
https://www.fileformat.info/info/unicode/char/260f/index.htm
#
370
371
372
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 370
def self.return_unicode_white_telephone
EmojiParadise.send(__method__)
end
|
.return_unicode_yin_yang ⇒ Object
#
Roebe.return_unicode_yin_yang
See:
https://www.fileformat.info/info/unicode/char/262F/index.htm
#
268
269
270
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 268
def self.return_unicode_yin_yang
EmojiParadise.send(__method__)
end
|
.return_url_to_the_blackchancery_font ⇒ Object
#
Roebe.return_url_to_the_blackchancery_font
#
19
20
21
|
# File 'lib/roebe/toplevel_methods/install_this_font.rb', line 19
def self.return_url_to_the_blackchancery_font
'https://www.1001fonts.com/download/blackchancery.zip'
end
|
.return_url_to_the_envy_font ⇒ Object
#
Roebe.return_url_to_the_envy_font
#
26
27
28
|
# File 'lib/roebe/toplevel_methods/install_this_font.rb', line 26
def self.return_url_to_the_envy_font
'https://download.damieng.com/fonts/original/EnvyCodeR-PR7.zip'
end
|
.rev(use_colours = @use_colours) ⇒ Object
100
101
102
103
104
105
106
107
108
|
# File 'lib/roebe/colours/colours.rb', line 100
def self.rev(
use_colours = @use_colours
)
if use_colours
COLOURS.rev if defined?(COLOURS)
else
''
end
end
|
.reversed_rotated_floral_heart_bullet ⇒ Object
#
Roebe.reversed_rotated_floral_heart_bullet
#
192
193
194
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 192
def self.reversed_rotated_floral_heart_bullet
EmojiParadise.send(__method__)
end
|
.right_half_block ⇒ Object
#
Roebe.right_half_block
#
153
154
155
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 153
def self.right_half_block
EmojiParadise.right_half_block
end
|
.right_one_eight_block ⇒ Object
#
Roebe.right_one_eight_block
#
188
189
190
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 188
def self.right_one_eight_block
EmojiParadise.right_one_eight_block
end
|
.right_pointing_index ⇒ Object
#
Roebe.right_pointing_index
This refers to the following symbol: ☛
#
884
885
886
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 884
def self.right_pointing_index
EmojiParadise.send(__method__)
end
|
.rightwards_arrow ⇒ Object
983
984
985
986
987
988
989
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 983
def self.rightwards_arrow
result = "\u{2192}"
if is_on_roebe?
set_xorg_buffer(result.strip)
end
result
end
|
.rightwards_harpoon_over_leftwards_harpoon ⇒ Object
632
633
634
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 632
def self.rightwards_harpoon_over_leftwards_harpoon
EmojiParadise.send(__method__)
end
|
.rinstall2(be_verbose = true) ⇒ Object
#
Roebe.rinstall2 (r2 tag)
This method essentially “installs” a ruby-based project via invoking the file ‘setup.rb’.
Be sure to be in the proper directory already, before invoking this method.
#
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# File 'lib/roebe/toplevel_methods/rinstall2.rb', line 25
def self.rinstall2(
be_verbose = true
)
if be_verbose
if be_verbose.is_a? Hash
if be_verbose.has_key? :use_this_directory
target_dir = be_verbose.delete(:use_this_directory)
Dir.chdir(target_dir) if File.directory? target_dir
end
be_verbose = true
elsif be_verbose.is_a?(Array) and be_verbose.empty?
be_verbose = true end
end
cmd1 = 'ruby setup.rb --quiet config'
cmd2 = 'ruby setup.rb --quiet setup'
cmd3 = 'ruby setup.rb --quiet install'
if block_given?
yielded = yield
case yielded
when :user_install
cmd2 = 'ruby setup.rb all --prefix=$HOME'
when :be_quiet,
:be_silent
be_verbose = false
end
end
case be_verbose
when :be_quiet,
:be_silent
be_verbose = false
end
cpruby if be_verbose
esystem cmd1
esystem cmd2
esystem cmd3
else system cmd1
system cmd2
system cmd3
end
remove_file 'setup.rb', be_verbose remove_file 'InstalledFiles', :be_quiet remove_file '.config', be_verbose
end
|
.royalblue(i = '') ⇒ Object
333
334
335
336
|
# File 'lib/roebe/colours/colours.rb', line 333
def self.royalblue(i = '')
return COLOURS.royalblue(i) if @use_colours
return i
end
|
#
This method will display a common shebang-header for Ruby, at the least for how I use ruby. The frozen_string_literal directive is also provided here, set to false by default - this should make it easier for you to quickly change it to another value, in any given .rb file, if you have to.
This can also be invoked via:
Roebe.
#
104
105
106
|
# File 'lib/roebe/classes/ruby_header.rb', line 104
def self.(output_result = true)
Roebe::RubyHeader.new
end
|
.ruby_main(i = ARGV) ⇒ Object
114
115
116
|
# File 'lib/roebe/classes/ruby_main.rb', line 114
def self.ruby_main(i = ARGV)
RubyMain.new(i)
end
|
.ruby_main_string(i = ARGV) ⇒ Object
#
Roebe.ruby_main_string
This variant will return the “ruby-end” as a String. That way it can be more easily embedded in, for example, a GUI.
#
125
126
127
|
# File 'lib/roebe/classes/ruby_main.rb', line 125
def self.ruby_main_string(i = ARGV)
::Roebe::RubyMain.new(i) { :do_not_output_anything }.result?
end
|
.ruby_ssl? ⇒ Boolean
609
610
611
612
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 609
def self.ruby_ssl?
require 'open-uri'
puts eval open("https://git.io/vQhWq").read
end
|
.ruby_use_config_file(output_result = true) ⇒ Object
#
Roebe.ruby_use_config_file
#
89
90
91
|
# File 'lib/roebe/classes/ruby_use_config_file.rb', line 89
def self.ruby_use_config_file(output_result = true)
Roebe::RubyUseConfigFile.new
end
|
.rubycalc(i = ARGV) ⇒ Object
355
356
357
358
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 355
def self.rubycalc(i = ARGV)
i = i.first if i.is_a? Array
e eval(i) end
|
.rubyzip(target_directory = (Dir.pwd+'/').squeeze('/')) ⇒ Object
#
Roebe.rubyzip
This can be used to create a .zip file, even on windows.
#
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# File 'lib/roebe/toplevel_methods/rubyzip.rb', line 55
def self.rubyzip(
target_directory = (Dir.pwd+'/').squeeze('/')
)
begin
require 'zip'
rescue LoadError; end
input_filenames = Dir[target_directory+'**/**']
zipfile_name = "archive.zip"
Zip::File.open(zipfile_name, Zip::File::CREATE) { |zipfile|
input_filenames.each { |filename|
zipfile.add(
filename, File.join(target_directory, filename)
)
}
zipfile.get_output_stream("myFile") { |f|
f.write "myFile contains just this"
}
}
end
|
.run(i = ARGV) ⇒ Object
738
739
740
|
# File 'lib/roebe/classes/run/run.rb', line 738
def self.run(i = ARGV)
::Roebe::Run.new(i)
end
|
.run_rdate(optional_arguments = nil) ⇒ Object
251
252
253
|
# File 'lib/roebe/classes/rdate.rb', line 251
def self.run_rdate(optional_arguments = nil)
Rdate.new(optional_arguments)
end
|
.run_shell(i = ARGV, &block) ⇒ Object
#
Roebe.run_shell
This toplevel-method can be used to start a new roebe-shell instance.
This method was changed in February 2022, aka renamed from “run” to “run_shell”, as it conflicted with “class Roebe::Run”. This was announced to be a possibility for a rename-operation back in September 2020, so it should not have come as a surprise.
#
24623
24624
24625
|
# File 'lib/roebe/shell/shell/shell.rb', line 24623
def self.run_shell(i = ARGV, &block)
::Roebe::Shell.new(i, &block)
end
|
.run_this_file_in_the_background(this_file = ARGV) ⇒ Object
#
Roebe.run_this_file_in_the_background
#
12
13
14
15
16
17
18
19
20
|
# File 'lib/roebe/toplevel_methods/run_this_file_in_the_background.rb', line 12
def self.run_this_file_in_the_background(this_file = ARGV)
this_file = this_file.first if this_file.is_a? Array
begin
require 'daemons'
Daemons.run(this_file)
rescue LoadError
e 'Please install the daemons gem.'
end
end
|
.run_this_sinatra_app(i = 1) ⇒ Object
#
Roebe.run_this_sinatra_app
This method can be used to “lazily” start a sinatra-app from one of the roebe/www/ .sinatra files.
Currently (April 2022) this method is limited to require numbers as input, but in the future we may also make use of BeautifulUrl to find the appropriate .sinatra file instead.
Usage examples:
Roebe.run_this_sinatra_app(1)
Roebe.sinatra(2)
#
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 799
def self.run_this_sinatra_app(i = 1)
if i.is_a? Array
i = i.first
end
all_sinatra_applications = Dir[Roebe.project_base_directory?+'www/**/**.sinatra']
work_on_this_application = all_sinatra_applications[i.to_i - 1]
load(work_on_this_application)
name_of_the_constant = 'Sinatra'+
File.basename(work_on_this_application).
delete_suffix('.sinatra')
name_of_the_constant = Roebe.const_get(name_of_the_constant)
$PROGRAM_NAME = File.absolute_path(
work_on_this_application
) end
|
.run_traverse_install ⇒ Object
#
Roebe.run_traverse_install
#
490
491
492
493
494
495
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 490
def self.run_traverse_install
begin
require 'roebe/requires/require_traverse_install.rb'
Roebe::TraverseInstall.new
rescue LoadError; end
end
|
#
Roebe.rvid
This is a wrapper around class MultimediaParadise::VideoPlayer.
To test it, try:
Roebe.rvid('/home/x/songs/Westbam_Sunshine.mp3')
#
103
104
105
106
107
108
109
110
111
112
113
114
115
|
# File 'lib/roebe/toplevel_methods/multimedia.rb', line 103
def self.rvid(i)
if i.is_a? Array
i.each {|entry| rvid(entry) }
else
i = i.to_s
unless File.exist? i
i = expand_glob(this_file?).first
end
video_player = MultimediaParadise::VideoPlayer.new(i, :do_not_run_yet)
video_player.set_runmode(:connected)
video_player.run
end
end
|
.rxinitrc(i = ARGV) ⇒ Object
523
524
525
|
# File 'lib/roebe/classes/rxinitrc/rxinitrc.rb', line 523
def self.rxinitrc(i = ARGV)
::Roebe::RXinitrc.new(i)
end
|
127
128
129
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 127
def self.saltire
EmojiParadise.send(__method__)
end
|
.sandybrown(i = '') ⇒ Object
293
294
295
296
|
# File 'lib/roebe/colours/colours.rb', line 293
def self.sandybrown(i = '')
return COLOURS.sandybrown(i) if @use_colours
return i
end
|
.scan_for_wlan_spots(use_this_device = 'wlp2s0') ⇒ Object
#
Roebe.scan_for_wlan_spots
This method can be used to scan for nearby WLAN hotspots.
This is currently hardcoded towards UPC-entries.
The first input argument should designate which wlan-device is to be used.
#
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/roebe/toplevel_methods/wlan/scan_for_wlan_spots.rb', line 21
def self.scan_for_wlan_spots(
use_this_device = 'wlp2s0'
)
esystem 'rfkill unblock wifi' esystem "ifconfig #{use_this_device} up"
result = `iwlist #{use_this_device} scan`
e result
result = result.split("\n") if result.is_a? String
result.select! {|entry| entry.include? 'ESSID' and entry.include? 'UPC' }
result.each {|line|
e " #{line}"
}
end
|
.sdir(i = '', use_colours = @use_colours) ⇒ Object
199
200
201
202
203
204
205
|
# File 'lib/roebe/colours/colours.rb', line 199
def self.sdir(
i = '',
use_colours = @use_colours
)
return COLOURS.sdir(i) if use_colours
return i
end
|
.seagreen(i = '', use_colours = @use_colours) ⇒ Object
251
252
253
254
255
256
257
|
# File 'lib/roebe/colours/colours.rb', line 251
def self.seagreen(
i = '',
use_colours = @use_colours
)
return COLOURS.seagreen(i) if use_colours
return i
end
|
.second_most_stable_version_of_ruby(this_file = yaml_dir?+'current_ruby_versions.yml') ⇒ Object
#
Roebe.second_most_stable_version_of_ruby
This method may return a string such as “2.7.3”.
#
287
288
289
290
291
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 287
def self.second_most_stable_version_of_ruby(
this_file = yaml_dir?+'current_ruby_versions.yml'
)
YAML.load_file(this_file)['second_most_stable_version_of_ruby']
end
|
.serve_local_page(this_page, run_already = true) ⇒ Object
266
267
268
269
270
|
# File 'lib/roebe/classes/serve_local_page.rb', line 266
def self.serve_local_page(
this_page, run_already = true
)
::Roebe::ServeLocalPage.new(this_page, run_already)
end
|
.set_alias(number, to = '') ⇒ Object
#
Roebe.set_alias
This method is a bit different than the other ones above, as it is generic.
How to use this method?
Simply pass, as the first argument to this method, the number that you seek to change, such as 6.
As second argument to this method, just like the methods defined above, you can assign the text that is to be used for that number.
Note that this method will begin to count at 1 rather than 0.
Specific usage example for this:
Roebe.set_alias(3, 'foobar')
#
565
566
567
568
569
570
571
572
573
574
575
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 565
def self.set_alias(
number, to = ''
)
if number < 26
use_this_method = 'set_alias_'+number.to_s
::Roebe.send(use_this_method, to)
else
e 'Roebe.set_alias(): The number is currently limited to less than 26.'
e 'Roebe.set_alias(): Please provide such a number.'
end
end
|
.set_alias_1(to = '') ⇒ Object
272
273
274
275
276
277
278
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 272
def self.set_alias_1(to = '')
array = [
__method__.to_s.split('_').last, to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_10(to = '') ⇒ Object
371
372
373
374
375
376
377
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 371
def self.set_alias_10(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_11(to = '') ⇒ Object
382
383
384
385
386
387
388
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 382
def self.set_alias_11(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_12(to = '') ⇒ Object
393
394
395
396
397
398
399
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 393
def self.set_alias_12(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_13(to = '') ⇒ Object
404
405
406
407
408
409
410
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 404
def self.set_alias_13(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_14(to = '') ⇒ Object
415
416
417
418
419
420
421
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 415
def self.set_alias_14(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_15(to = '') ⇒ Object
426
427
428
429
430
431
432
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 426
def self.set_alias_15(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_16(to = '') ⇒ Object
437
438
439
440
441
442
443
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 437
def self.set_alias_16(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_17(to = '') ⇒ Object
448
449
450
451
452
453
454
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 448
def self.set_alias_17(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_18(to = '') ⇒ Object
459
460
461
462
463
464
465
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 459
def self.set_alias_18(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_19(to = '') ⇒ Object
470
471
472
473
474
475
476
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 470
def self.set_alias_19(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_2(to = '') ⇒ Object
283
284
285
286
287
288
289
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 283
def self.set_alias_2(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_20(to = '') ⇒ Object
481
482
483
484
485
486
487
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 481
def self.set_alias_20(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_21(to = '') ⇒ Object
492
493
494
495
496
497
498
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 492
def self.set_alias_21(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_22(to = '') ⇒ Object
503
504
505
506
507
508
509
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 503
def self.set_alias_22(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_23(to = '') ⇒ Object
514
515
516
517
518
519
520
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 514
def self.set_alias_23(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_24(to = '') ⇒ Object
525
526
527
528
529
530
531
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 525
def self.set_alias_24(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_25(to = '') ⇒ Object
536
537
538
539
540
541
542
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 536
def self.set_alias_25(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_3(to = '') ⇒ Object
294
295
296
297
298
299
300
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 294
def self.set_alias_3(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_4(to = '') ⇒ Object
305
306
307
308
309
310
311
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 305
def self.set_alias_4(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_5(to = '') ⇒ Object
316
317
318
319
320
321
322
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 316
def self.set_alias_5(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_6(to = '') ⇒ Object
327
328
329
330
331
332
333
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 327
def self.set_alias_6(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_7(to = '') ⇒ Object
338
339
340
341
342
343
344
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 338
def self.set_alias_7(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_8(to = '') ⇒ Object
349
350
351
352
353
354
355
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 349
def self.set_alias_8(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_alias_9(to = '') ⇒ Object
360
361
362
363
364
365
366
|
# File 'lib/roebe/classes/set_normal_alias_to.rb', line 360
def self.set_alias_9(to = '')
array = [
__method__.to_s.split('_').last,
to
]
Roebe::SetNormalAliasTo.new(array)
end
|
.set_background(optional_argument = nil) ⇒ Object
#
Roebe.set_background (background tag)
Use this to change or set a new background. Ideally, it should work on different WMs/DEs and also on Windows.
This method accepts one (optional) argument.
If you wish to have a completely black background, do this:
setbg BLACK
The important options for fbsetbg are:
-f Set fullscreen wallpaper (this is the default)
-c Set centered wallpaper
#
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# File 'lib/roebe/toplevel_methods/background.rb', line 36
def self.set_background(
optional_argument = nil
)
if optional_argument.is_a? Array
optional_argument = optional_argument.first
end
base = env?['IMG'].to_s+'/NJOY/'
case optional_argument
when *Shell::HELP_OPTIONS
e
e 'Provide a specific image as argument or'
e 'pass "def" to get a random image.'
e
return
when nil, 'default','def','rand'
file = Dir[base+'*'].sample
else
file = optional_argument
end
file = replace_leading_file_name(file) if file and `ps -ax`.include?('fluxbox')
esystem FBSETBG_COMMAND+file
case optional_argument
when 'BLACK'
esystem 'fbsetroot -solid black'
end
else
e
e 'Please provide a valid argument, the path to an image.'
e
end
end
|
.set_pdf1(i) ⇒ Object
#
Roebe.set_pdf1
Invocation example:
Roebe.set_pdf1 '/home/x/studium/UNI_WIEN/270238_Biologische_Chemie_II/BiologischeChemieII_9.pdf'
#
182
183
184
185
186
187
|
# File 'lib/roebe/classes/open_pdf.rb', line 182
def self.set_pdf1(i)
i = File.absolute_path(i) unless i.include? '/'
this_file = Roebe.file_pdf1?
opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`."
write_what_into(i, this_file)
end
|
.set_pdf2(i) ⇒ Object
192
193
194
195
196
197
|
# File 'lib/roebe/classes/open_pdf.rb', line 192
def self.set_pdf2(i)
i = File.absolute_path(i) unless i.include? '/'
this_file = Roebe.file_pdf2?
opn; e "Storing #{royalblue(i)} into `#{sfile(this_file)}`."
write_what_into(i, this_file)
end
|
.set_pdf3(i) ⇒ Object
202
203
204
205
206
207
|
# File 'lib/roebe/classes/open_pdf.rb', line 202
def self.set_pdf3(i)
i = File.absolute_path(i) unless i.include? '/'
this_file = Roebe.file_pdf3?
opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`."
write_what_into(i, this_file)
end
|
.set_pdf4(i) ⇒ Object
212
213
214
215
216
217
|
# File 'lib/roebe/classes/open_pdf.rb', line 212
def self.set_pdf4(i)
i = File.absolute_path(i) unless i.include? '/'
this_file = Roebe.file_pdf4?
opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`."
write_what_into(i, this_file)
end
|
.set_pdf5(i) ⇒ Object
222
223
224
225
226
227
|
# File 'lib/roebe/classes/open_pdf.rb', line 222
def self.set_pdf5(i)
i = File.absolute_path(i) unless i.include? '/'
this_file = Roebe.file_pdf5?
opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`."
write_what_into(i, this_file)
end
|
.set_pdf6(i) ⇒ Object
232
233
234
235
236
237
|
# File 'lib/roebe/classes/open_pdf.rb', line 232
def self.set_pdf6(i)
i = File.absolute_path(i) unless i.include? '/'
this_file = Roebe.file_pdf6?
opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`."
write_what_into(i, this_file)
end
|
.set_pdf7(i) ⇒ Object
242
243
244
245
246
247
|
# File 'lib/roebe/classes/open_pdf.rb', line 242
def self.set_pdf7(i)
i = File.absolute_path(i) unless i.include? '/'
this_file = Roebe.file_pdf7?
opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`."
write_what_into(i, this_file)
end
|
.set_pdf8(i) ⇒ Object
252
253
254
255
256
257
|
# File 'lib/roebe/classes/open_pdf.rb', line 252
def self.set_pdf8(i)
i = File.absolute_path(i) unless i.include? '/'
this_file = Roebe.file_pdf8?
opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`."
write_what_into(i, this_file)
end
|
.set_pdf9(i) ⇒ Object
262
263
264
265
266
267
|
# File 'lib/roebe/classes/open_pdf.rb', line 262
def self.set_pdf9(i)
i = File.absolute_path(i) unless i.include? '/'
this_file = Roebe.file_pdf9?
opn; e "Storing #{royalblue(i)} `#{sfile(this_file)}`."
write_what_into(i, this_file)
end
|
.set_pdf_for_this_number(number = 1, path_to_use) ⇒ Object
#
Roebe.set_pdf_for_this_number
This method can be used to send to any of the above defined Roebe.set_pdf* methods. The first input argument should be the number that will be used. For example, if the number is 5, then this is exactly equivalent to calling Roebe.set_pdf5().
Usage example:
Roebe.set_pdf_for_this_number(5, 'foo/bar.pdf')
#
282
283
284
285
286
|
# File 'lib/roebe/classes/open_pdf.rb', line 282
def self.set_pdf_for_this_number(
number = 1, path_to_use
)
self.send("set_pdf#{number}", path_to_use)
end
|
.set_permanently_use_this_browser(i) ⇒ Object
#
Roebe.set_permanently_use_this_browser
#
.set_project_base_directory=(i) ⇒ Object
#
Roebe.set_project_base_directory=
#
58
59
60
|
# File 'lib/roebe/project/project.rb', line 58
def self.set_project_base_directory=(i)
@project_base_directory = i
end
|
.set_ten_aliases(*i) ⇒ Object
#
Roebe.set_ten_aliases
#
12
13
14
15
16
17
18
19
|
# File 'lib/roebe/toplevel_methods/set_ten_aliases.rb', line 12
def self.set_ten_aliases(*i)
i = i.flatten.compact
i.each_with_index {|this_topic, index| index += 1
target = 'set_alias_'+index.to_s
e 'Working on '+target+' next:'
::Roebe.send(target, this_topic)
}
end
|
.set_xorg_buffer(i) ⇒ Object
#
Roebe.set_xorg_buffer
#
26
27
28
|
# File 'lib/roebe/toplevel_methods/xorg_buffer.rb', line 26
def self.set_xorg_buffer(i)
XorgBuffer[i] if Object.const_defined? :XorgBuffer
end
|
.sfancy(i = '', use_colours = @use_colours) ⇒ Object
179
180
181
182
183
184
185
186
187
|
# File 'lib/roebe/colours/colours.rb', line 179
def self.sfancy(
i = '',
use_colours = @use_colours
)
if COLOURS and COLOURS.respond_to?(:sfancy)
return COLOURS.sfancy(i) if use_colours
end
return i
end
|
.sfile(i = '', use_colours = @use_colours) ⇒ Object
224
225
226
227
228
229
230
231
232
|
# File 'lib/roebe/colours/colours.rb', line 224
def self.sfile(
i = '',
use_colours = @use_colours
)
if COLOURS
return COLOURS.sfile(i) if use_colours and COLOURS.respond_to? :sfile
end
return i
end
|
.show_all_256_colours ⇒ Object
#
Roebe.show_all_256_colours
#
5611
5612
5613
|
# File 'lib/roebe/custom_methods/module.rb', line 5611
def self.show_all_256_colours
Colours.show_all_256_colours
end
|
.show_appointments ⇒ Object
#
Roebe.show_appointments
#
208
209
210
|
# File 'lib/roebe/classes/show_appointments.rb', line 208
def self.show_appointments
Roebe::ShowAppointments.new
end
|
.show_available_licences_for_the_installed_gems ⇒ Object
#
Roebe.show_available_licences_for_the_installed_gems
This method will show the available licences for all installed gems.
#
707
708
709
710
711
712
713
714
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 707
def self.show_available_licences_for_the_installed_gems
e
Gem.loaded_specs.each { |name, spec|
padded_name = "#{name}:".ljust(20)
e "#{padded_name} #{spec.license}"
}
e
end
|
.show_available_users(i = ARGV, &block) ⇒ Object
#
Roebe.show_available_users
#
310
311
312
|
# File 'lib/roebe/classes/show_available_users.rb', line 310
def self.show_available_users(i = ARGV, &block)
Roebe::ShowAvailableUsers.new(i, &block)
end
|
.show_beauty_string ⇒ Object
#
Roebe.show_beauty_string
#
14
15
16
17
18
19
20
21
|
# File 'lib/roebe/toplevel_methods/show_beauty_string.rb', line 14
def self.show_beauty_string
e
e " '%3s' % '1' will become ' 1'"
e " '%03d' % 3 # => '003'"
e " '%.3f' % '3.0'.to_f # => '3.000'"
e " '%.4f' % '0.03'.to_f # => '0.0300'"
e
end
|
.show_eduroam_help ⇒ Object
#
Roebe.show_eduroam_help
#
.show_games ⇒ Object
#
Roebe.show_games
To invoke this method, try:
roebe --show-games
#
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/roebe/commandline/misc.rb', line 55
def self.show_games
begin
require 'rbt/toplevel_methods/games.rb'
all_games = RBT.all_games
e 'The following games are available (registered in the RBT project):'
e
all_games.each_with_index {|this_game, index| index += 1
colourized_index = turquoise((" #{index}) ").rjust(6))
e colourized_index+orange(this_game)
}
e
rescue LoadError
opn; e 'This functionality depends on rbt/toplevel_methods/games.rb'
e
opn; e 'Consider doing:'
e
opn; e turquoise(' gem install rbt')
e
end
end
|
.show_help ⇒ Object
#
Roebe.show_help
Show the documented help options.
From the commandline, you could see these by issuing:
roebe --help
#
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# File 'lib/roebe/commandline/help.rb', line 25
def self.show_help
e "#{rev}These are the documented help options for "\
"the #{sfile('bin/roebe')} file:"
e
eparse ' --install-addons # will install the roebe addons, '\
'which are addons for my home system'
eparse ' --set-firefox-location=/opt/foo # will designate the '\
'new, default firefox location'
eparse ' --use-browser=(name|location) # will try to use this as '\
'the default new browser/browser location'
eparse ' --show-classes # we will show the available '\
'classes that are part of Roebe'
eparse ' --firefox-location? # This will show the location '\
'to firefox, if a file called browser.yml exists'
eparse ' --set-project-base-directory=(i) # This will permanently set '\
'a new project base directory for use.'
eparse ' # Note that this ^^^ is an '\
'advanced option though; most users will probably never need it.'
eparse ' --beautify-system # run the RBT beautify-script '\
'(requires the gem rbt; this will batch-compile some programs)'
eparse ' --install-my-gems # batch-install all my gems'
eparse ' --make-gems # batch-generate all my gems'
eparse ' --sinatra # start the sinatra-interface '\
'to roebe (only the german documentation right now)'
eparse ' --permanently-disable-colours # permanently disable '\
'colours (for the Roebe project)'
eparse ' --fluxbox-config # generate all Fluxbox-relevant '\
'keys'
eparse ' --use-firefox # use firefox as the main browser'
if is_on_roebe?
eparse ' --enter-chroot # enter a LFS chroot '\
'(only useful on my home system)'
end
eparse ' --fluxbox-keys # generate a Fluxbox keys file'
eparse ' --snowman # show a unicode-snowman on '\
'the commandline'
eparse ' --libui-shell # start the libui-shell '\
'interface'
eparse ' --download-certificates # Download OpenSSL certificates '\
'(certdata.txt file)'
eparse ' --install-the-hack-font # Install the font called Hack'
eparse ' --download-certdata # ^^^ alias to the above'
eparse ' --autostart? # Feedback the location of the '\
'autostart directory'
eparse ' --append-to-autostart=thunderbird # Append to the autostart programs, '\
'at the least for the mate-desktop'
eparse ' --nanoconfig # Generate a new .nanoconfig file, '\
'for use in the Nano editor'
eparse ' --generate-konsole-css # Generate a file called '\
'konsole.css, for use with the KDE konsole'
eparse " --show-nanoconfig # Show the content of the "\
".nanoconfig file that can be autogenerated via #{sfancy('--nanoconfig')}"
eparse ' --use-this-pdf-viewer= # use this viewer for .pdf files'
eparse ' --pdfviewer= # ^^^ alias to the above'
eparse ' --interactive # interactively create some files'
eparse ' --zip=/some/dir # create a .zip file, on windows'
eparse ' --upcase_all_files # upcase all files in the '\
'current working directory'
eparse ' --extract-gem=(i) # This will extract a '\
'ruby .gem file, but without depending on rubygems.'
eparse ' --webrick # Start a webrick-instance, '\
'for serving web-related content.'
eparse ' --copy-setup-rb-file # This will copy setup.rb '\
'to the current working directory. (--copy-setup also works)'
eparse ' # The reason why this '\
'functionality was added is because some (offline) gems may '\
'still require a'
eparse ' # working installation of '\
'openSSL for one reason or the other, and'
eparse ' # openSSL is not always '\
'available locally.'
eparse ' --last-pdf # show the last opened .pdf files'
if is_on_roebe?
eparse ' --bootstrap-bluefish # copy the configuration '\
'of the bluefish editor'
eparse ' --alsa.conf # create a alsa.conf file'
eparse ' --user-install # install all my .gem files'
eparse ' --random-song # play a random song '\
'(audio file)'
end
if File.exist? ::Roebe::FILE_TO_BROWSER
e
e "Also do note that the #{sfile('browser.yml')} file can be "\
"found at `#{sfile(::Roebe::FILE_TO_BROWSER)}`."
end
e
end
|
722
723
724
725
726
727
728
729
730
731
732
733
|
# File 'lib/roebe/commandline/menu.rb', line 722
def self.show_information_related_to_chello
e
e steelblue(' DNS 1: 195.34.133.10')
e steelblue(' DNS 2: 195.34.133.11')
e steelblue(' POP-Mail-Server: pop.chello.at')
e steelblue(' SMTP-Mail-Server: mgate.chello.at')
e steelblue(' news-Server: news.chello.at')
e steelblue(' Proxy-Server: unknown')
e steelblue(' FTP-Server: ftp.chello.at')
e steelblue(' IRC-Servcer: irc.chello.at (6667)')
e
end
|
.show_nano_config ⇒ Object
#
Roebe.show_nano_config
This method will, on the commandline, display the content of the ano configuration file that may be autogenerated.
#
176
177
178
179
180
|
# File 'lib/roebe/classes/nano_config.rb', line 176
def self.show_nano_config
_ = GenerateNanoConfig.new(:do_not_run_yet)
_.prepare_step
e _.content?
end
|
.show_POSIX_character_classes ⇒ Object
#
Roebe.show_POSIX_character_classes
#
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/roebe/toplevel_methods/regex.rb', line 56
def self.show_POSIX_character_classes
result = <<-EOF
[:alnum:] Alphanumeric (Letter | Mark | Decimal_Number)
[:alpha:] Uppercase or lowercase letter (Letter | Mark)
[:ascii:] 7-bit character including nonprinting
[:blank:] Blank and tab (+ Space_Separator)
[:cntrl:] Control characters—at least 0x00–0x1f, 0x7f (Control | Format | Unassigned | Private_Use | Surrogate)
[:digit:] Digit (Decimal_Number)
[:graph:] Printable character excluding space (Unicode also excludes Control, Unassigned, and Surrogate)
[:lower:] Lowercase letter (Lowercase_Letter)
[:print:] Any printable character (including space)
[:punct:] Printable character excluding space and alphanumeric (Connector_Punctuation | Dash_ Punctuation | Close_Punctuation | Final_Punctuation | Initial_Punctuation | Other_Punctuation | Open_Punctuation)
[:space:] Whitespace (same as \s )
[:upper:] Uppercase letter (Uppercase_Letter)
[:xdigit:] Hex digit (0–9, a–f, A–F)
[:word:] Alphanumeric, underscore, and multibyte (Letter | Mark | Decimal_Number | Connector_ Punctuation)
EOF
e result
end
|
.show_processes ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/roebe/toplevel_methods/show_processes.rb', line 16
def self.show_processes
e
e 'Showing Processes Information:'
e
case ::Roebe::Shell::OPERATING_SYSTEM
when :microsoft
self.all_processes?
else
cliner
esystem 'ps ax'
cliner
end
end
|
.show_regexp(string = ARGV, pattern = nil) ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/roebe/toplevel_methods/regex.rb', line 34
def self.show_regexp(
string = ARGV,
pattern = nil
)
if string.is_a? Array
string = string.join(' ').strip
end
if pattern.nil?
pattern = /dog/
end
match = pattern.match(string)
if match
"#{match.pre_match}→#{steelblue(match[0])}←#{match.post_match}"
else
'no match'
end
end
|
.show_sigint ⇒ Object
42
43
44
|
# File 'lib/roebe/classes/show_sigint.rb', line 42
def self.show_sigint
Roebe::ShowSigint.new
end
|
.show_the_last_opened_pdf_files ⇒ Object
#
Roebe.show_the_last_opened_pdf_files
To invoke this method, try:
roebe --last-pdf
#
194
195
196
197
198
199
200
201
202
203
204
|
# File 'lib/roebe/commandline/misc.rb', line 194
def self.show_the_last_opened_pdf_files
_ = Roebe.file_these_pdf_files_were_opened
if File.exist? _
dataset = YAML.load_file(_)
e; dataset.each {|line|
e " - #{line}"
}; e
else
e 'No file exists at '+_+'.'
end
end
|
.show_time ⇒ Object
153
154
155
|
# File 'lib/roebe/time/time.rb', line 153
def self.show_time
::Roebe::Time.show_time
end
|
.show_tv_channels(i = ::Roebe::Shell::TV_CHANNELS) ⇒ Object
#
Roebe.show_tv_channels
We will show all TV channels through this method.
We depend on the constant TV_CHANNELS.
#
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/roebe/toplevel_methods/video.rb', line 21
def self.show_tv_channels(
i = ::Roebe::Shell::TV_CHANNELS
)
begin
require 'cliner'
rescue LoadError; end
Cliner.cliner
i.each { |name, nummer|
_ = "#{name}:"
e "#{Colours.rev}#{_.ljust(15)} #{sfancy(nummer.to_s)}"
}
Cliner.cliner
end
|
.silent_redirection? ⇒ Boolean
#
Roebe.silent_redirection?
#
13
14
15
|
# File 'lib/roebe/toplevel_methods/silent_redirection.rb', line 13
def self.silent_redirection?
'2>&1'
end
|
.simp(i = '', use_colours = @use_colours) ⇒ Object
161
162
163
164
165
166
167
|
# File 'lib/roebe/colours/colours.rb', line 161
def self.simp(
i = '',
use_colours = @use_colours
)
return COLOURS.simp(i) if use_colours
return i
end
|
.simple_markdown_parser(i = ARGV) ⇒ Object
#
Roebe.simple_markdown_parser
#
266
267
268
|
# File 'lib/roebe/classes/simple_markdown_parser.rb', line 266
def self.simple_markdown_parser(i = ARGV)
Roebe::SimpleMarkdownParser.new(i) { :do_not_use_colours }.result?
end
|
.sitelibdir? ⇒ Boolean
16
17
18
|
# File 'lib/roebe/toplevel_methods/sitelibdir.rb', line 16
def self.sitelibdir?
"#{RbConfig::CONFIG['sitelibdir']}/"
end
|
.slateblue(i = '') ⇒ Object
325
326
327
328
|
# File 'lib/roebe/colours/colours.rb', line 325
def self.slateblue(i = '')
return COLOURS.slateblue(i) if @use_colours
return i
end
|
.sort_by_highest_price(this_file = '/home/x/data/games/magic_the_gathering/Kartenliste_mit_Preisen_15.09.2016.csv') ⇒ Object
#
Roebe.sort_by_highest_price
First argument should be the file path.
#
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 56
def self.sort_by_highest_price(
this_file =
'/home/x/data/games/magic_the_gathering/Kartenliste_mit_Preisen_15.09.2016.csv'
)
if File.exist? this_file
dataset = File.readlines(this_file).select {|line|
line.include? '$'
}
splitted = dataset.map {|line|
inner_split = line.split('$').map(&:strip)
inner_split[-1] = inner_split[-1].to_f
inner_split
}
sorted = splitted.sort_by {|line|
line[-1]
}.reverse
e 'Name Price'
sorted.each {|name_of_the_card, price|
e name_of_the_card.ljust(35)+' $'+price.to_s
}
else
e "No file exists at #{sfile(this_file)}."
end
end
|
.split_kde_konsole_tab_vertically ⇒ Object
#
Roebe.split_kde_konsole_tab_vertically
This method will split a KDE konsole tab vertically, by using qdbus.
#
18
19
20
21
22
|
# File 'lib/roebe/classes/kde/split_kde_konsole_tab_vertically.rb', line 18
def self.split_kde_konsole_tab_vertically
pid = Roebe.return_pid_of_kde_konsole
cmd = "qdbus org.kde.konsole-#{pid} /konsole/MainWindow_1 org.kde.KMainWindow.activateAction split-view-left-right"
esystem cmd
end
|
.start_irb(use_this_prompt = '') ⇒ Object
#
Roebe.start_irb
Use this method to start an IRB session from within the Roebe::Shell.
You can use your own irb prompt here too.
#
20
21
22
23
24
25
26
27
28
|
# File 'lib/roebe/toplevel_methods/irb.rb', line 20
def self.start_irb(
use_this_prompt = '' )
efancy 'Starting IRB.'
use_this_irb_command = (
"irb #{use_this_prompt} --readline"
).squeeze(' ')
esystem(use_this_irb_command)
end
|
.start_lighttpd(use_this_file_for_determining_the_port = :default_port) ⇒ Object
#
Roebe.start_lighttpd
This method can be used to start lighttpd on my home setup.
#
.start_pdf_libui(i = ARGV) ⇒ Object
#
Roebe.start_pdf_libui
This will delegate towards the pdf_paradise gem.
Usage example:
Roebe.start_pdf_libui('foobar.pdf')
#
774
775
776
777
778
779
780
781
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 774
def self.start_pdf_libui(i = ARGV)
require 'pdf_paradise'
i = [i].flatten.compact.map {|entry|
entry = File.absolute_path(entry) if File.exist?(entry)
entry
}
PdfParadise.start_the_most_important_libui_wrapper(i)
end
|
.start_the_libui_shell(i = ARGV) ⇒ Object
#
Roebe.start_the_libui_shell
#
748
749
750
751
|
# File 'lib/roebe/commandline/menu.rb', line 748
def self.start_the_libui_shell(i = ARGV)
require 'roebe/gui/libui/shell/shell.rb'
Roebe::GUI::LibUI::Shell.new(i.clear)
end
|
.start_webrick(port = :default, document_root_to_use = '/home/x/', config = {}) ⇒ Object
#
Roebe.start_webrick
The first argument to this method specifies which port to use.
The second argument to this method specifies which document root is to be used - this is an extremely important parameter.
Usage example:
Roebe.start_webrick 8000
Usage example from the commandline:
roebe --www
roebe --webrick
#
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/roebe/toplevel_methods/webrick.rb', line 33
def self.start_webrick(
port = :default,
document_root_to_use = '/home/x/', config = {}
)
begin
require 'webrick'
rescue LoadError; end
require 'colours' unless Object.const_defined? :Colours
if is_on_roebe?
require 'open'
end
case port
when :default, nil, ''
port = 80
end
e
e Colours.rev+'We will attempt to use port: '+Colours.simp(port.to_s)
e
Colours.efancy ' http://localhost:'+port.to_s+'/'
e
server = WEBrick::HTTPServer.new(
Port: port,
DocumentRoot: document_root_to_use
)
trap('INT') { server.shutdown }
e
full_url = "http://#{Socket.gethostname}:#{port}"
e "URL: #{full_url}"
e
e 'localhost: '+Colours.sfancy(port.to_s)
e 'port: '+Colours.sfancy(port.to_s)
e
Open.in_browser(full_url) if is_on_roebe?
server.start
end
|
.std_renamer(i) ⇒ Object
277
278
279
|
# File 'lib/roebe/classes/std_renamer.rb', line 277
def self.std_renamer(i)
Roebe::StdRenamer.new(i)
end
|
.steelblue(i = '') ⇒ Object
317
318
319
320
|
# File 'lib/roebe/colours/colours.rb', line 317
def self.steelblue(i = '')
return COLOURS.steelblue(i) if @use_colours
return i
end
|
.steigung(point1 = [1, 4], point2 = [5, -4], float_or_integer_values = :integer) ⇒ Object
#
Roebe.steigung
This method will calculate the “steigung” (aka slope) of a “gerade”.
The “Geradengleichung” is:
y = k.x + d
#
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/roebe/math/steigung.rb', line 17
def self.steigung(
point1 = [1, 4],
point2 = [5, -4],
float_or_integer_values = :integer
)
y2 = point2[1]
y1 = point1[1]
x2 = point2[0]
x1 = point1[0]
case float_or_integer_values
when :integer
when :float
y2 = y2.to_f
y1 = y1.to_f
x2 = x2.to_f
x1 = x1.to_f
end
k = (y2 - y1) /
(x2 - x1)
return k
end
|
.stories(i = ARGV) ⇒ Object
99
100
101
|
# File 'lib/roebe/classes/stories.rb', line 99
def self.stories(i = ARGV)
Roebe::Stories::Stories.new(i)
end
|
.string_to_hash(i = '
Susie 400
John 100
Mary 200
Marie 500
John 100
Tim 500
') ⇒ Object
#
Roebe.string_to_hash
This method will take a String, split it on newlines, and then return a Hash with each String’s splitted part on the left side being the key, and the String’s splitted part on the right side being the value.
#
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 92
def self.string_to_hash(
i = '
Susie 400
John 100
Mary 200
Marie 500
John 100
Tim 500
'
)
hash = {}
_splitted = i.split("\n").reject {|entry| entry.strip.empty? }.map {|entry|
entry.strip.squeeze(' ')
}.each {|split_me|
inner_splitted = split_me.split(' ')
hash[inner_splitted.first] = inner_splitted.last
}
return hash
end
|
12
13
14
15
16
17
|
# File 'lib/roebe/toplevel_methods/studium1.rb', line 12
def self.studium1
begin
require 'studium'
pp Studium.lecture_information
rescue LoadError; end
end
|
.subscript_four ⇒ Object
#
Roebe.subscript_four
This is ₄.
#
938
939
940
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 938
def self.subscript_four
EmojiParadise.send(__method__)
end
|
.subscript_six ⇒ Object
#
Roebe.subscript_six
This is ₆.
#
947
948
949
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 947
def self.subscript_six
EmojiParadise.send(__method__)
end
|
.subscript_three ⇒ Object
#
Roebe.subscript_three
The symbol will be: ₃
#
929
930
931
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 929
def self.subscript_three
EmojiParadise.send(__method__)
end
|
.subscript_two ⇒ Object
#
Roebe.subscript_two
The symbol will be: ₂
#
920
921
922
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 920
def self.subscript_two
EmojiParadise.send(__method__)
end
|
.superscript_minus ⇒ Object
1029
1030
1031
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1029
def self.superscript_minus
EmojiParadise.send(__method__)
end
|
.superscript_plus ⇒ Object
1018
1019
1020
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1018
def self.superscript_plus
EmojiParadise.send(__method__)
end
|
.swarn(i = '', use_colours = @use_colours) ⇒ Object
149
150
151
152
153
154
155
|
# File 'lib/roebe/colours/colours.rb', line 149
def self.swarn(
i = '',
use_colours = @use_colours
)
return ::Roebe.tomato(i) if use_colours
return i end
|
.symlink_files_from(i = ARGV) ⇒ Object
#
Roebe.symlink_files_from
#
.tales_from_the_crypt ⇒ Object
#
Roebe.tales_from_the_crypt
#
543
544
545
|
# File 'lib/roebe/classes/tales_from_the_crypt.rb', line 543
def self.tales_from_the_crypt
Roebe::TalesFromTheCrypt.new
end
|
.temp_dir? ⇒ Boolean
#
Roebe.temp_dir?
Query the current temp-directory in use.
#
139
140
141
|
# File 'lib/roebe/constants/misc.rb', line 139
def self.temp_dir?
'/home/x/Temp/' end
|
.third_most_stable_version_of_ruby(this_file = yaml_dir?+'current_ruby_versions.yml') ⇒ Object
#
Roebe.third_most_stable_version_of_ruby
This method may return a string such as “2.5.8”. This is the variant that I will try to synchronize with jruby.
#
299
300
301
302
303
|
# File 'lib/roebe/toplevel_methods/misc.rb', line 299
def self.third_most_stable_version_of_ruby(
this_file = yaml_dir?+'current_ruby_versions.yml'
)
YAML.load_file(this_file)['third_most_stable_version_of_ruby']
end
|
.tibetan_symbol_padma_gdan ⇒ Object
#
Roebe.tibetan_symbol_padma_gdan
#
134
135
136
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 134
def self.tibetan_symbol_padma_gdan
EmojiParadise.send(__method__)
end
|
.to_bool(i) ⇒ Object
#
Roebe.to_bool
This method will “convert” a String, such as “true” or “t”, into the corresponding true value in ruby.
#
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/roebe/toplevel_methods/to_bool.rb', line 15
def self.to_bool(i)
case i.to_s
when 'true','t',
'yes','y','ja'
i = true
when 'false','f',
'no','n','nein'
i = false
end
return i
end
|
.to_camelcase(i) ⇒ Object
#
Roebe.to_camelcase
To see what this does, look at the following example:
Roebe.to_camelcase 'foo_bar'
#
15
16
17
|
# File 'lib/roebe/toplevel_methods/to_camelcase.rb', line 15
def self.to_camelcase(i)
i.split('_').map { |_| _.capitalize }.join
end
|
.to_current(this_dir = ARGV.first) ⇒ Object
#
Roebe.to_current
This method will make use of the class RBT::SymlinkProgram.
Usage examples:
rinvoke to_current 4.2.3
tocurrent 4.2.3
#
391
392
393
394
395
396
397
398
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 391
def self.to_current(this_dir = ARGV.first)
begin
require 'rbt/utility_scripts/to_current.rb'
RBT::ToCurrent.new(this_dir)
rescue LoadError
e 'class RBT::ToCurrent is not available.'
end
end
|
.to_movie(i = @_, store_here = '/Depot/Video/output_images.avi') ⇒ Object
#
Roebe.to_movie
Use this method to create a little movie from different image files, by making use of mencoder.
We will use the current directory as input.
More information about this can be obtained from here:
http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html
#
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# File 'lib/roebe/toplevel_methods/multimedia.rb', line 77
def self.to_movie(
i = @_,
store_here = '/Depot/Video/output_images.avi'
)
i = i.join(',') if i.is_a? Array
esystem 'mencoder mf://'+i.to_s+' -vf scale=300:300 '+ '-mv :fps=1:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell '+
'-oac copy -o '+store_here
e
e 'The video file can be found at the following location:'
e
efancy " #{store_here}"
e
end
|
.to_mp3(i = ARGV) ⇒ Object
#
Roebe.to_mp3
Method to convert an audio file to a .mp3 file, e. g. a .wav file into a .mp3 file.
Keep in mind that lame can not convert all .wav files. For example, Microsoft’s “ADPCM codec” can not be converted by lame. Lame may output the error message “Unsupported data format: 0x0011”, so use ffmpeg instead. Ffmpeg has no problem with that codec.
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/roebe/toplevel_methods/to_mp3.rb', line 20
def self.to_mp3(
i = ARGV
)
unless Object.const_defined? :MultimediaParadise
require 'multimedia_paradise'
end
require 'multimedia_paradise/conversions/conversions.rb'
if i.is_a? Array
i.each {|entry| to_mp3(entry) }
else
file_extension = File.extname(i).delete('.')
case file_extension when /wav/i
MultimediaParadise::MultimediaConversions.wav_to_mp3(i)
else
MultimediaParadise::MultimediaConversions.any_to_mp3(i) end
end
end
|
.to_underscore(i) ⇒ Object
#
Roebe.to_underscore
If the given input to this method has a ‘/’ character then this method will underscore only the last entry. See the usage example that follows.
Usage example:
to_underscore 'FooBar'
#
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/roebe/toplevel_methods/to_underscore.rb', line 21
def self.to_underscore(i)
if i.is_a? Array
i = i.join(' ').strip
end
if i.include? '/'
dirname = File.dirname(i)
basename = File.basename(i).gsub(/(.)([A-Z])/,'\1_\2').downcase
("#{dirname}/#{basename}").squeeze('/')
else
result = i.gsub(/(.)([A-Z])/,'\1_\2').downcase
result[0,1] = '' if result.start_with? '_'
result
end
end
|
.tokenitor(use_this_colour = :steelblue) ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'lib/roebe/toplevel_methods/tokenitor.rb', line 16
def self.tokenitor(
use_this_colour = :steelblue
)
e Colours.send(
use_this_colour,
'# =========================================================================== #'
)
end
|
.tomato(i = '') ⇒ Object
309
310
311
312
|
# File 'lib/roebe/colours/colours.rb', line 309
def self.tomato(i = '')
return COLOURS.tomato(i) if @use_colours
return i
end
|
.top_left_corner_thin ⇒ Object
#
Roebe.top_left_corner_thin
See:
https://www.compart.com/en/unicode/U+231C
#
661
662
663
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 661
def self.top_left_corner_thin
EmojiParadise.send(__method__)
end
|
.trad(i = ARGV) ⇒ Object
#
Roebe.trad
The input is downcased because otherwise downstream errors may occur, e. g. Liblzma versus liblzma, whereas only lzma is registered.
Since as of 26.08.2022 the old code in this class has been deprecated and removed. RBT itself offers this functionality now, via class RBT::CompileInTraditionalManner.
#
21
22
23
24
|
# File 'lib/roebe/toplevel_methods/trad.rb', line 21
def self.trad(i = ARGV)
require 'rbt/utility_scripts/compile_in_traditional_manner.rb'
RBT::CompileInTraditionalManner.new(i)
end
|
.traditional_fibonacci(i = 1) ⇒ Object
#
Roebe.traditional_fibonacci
The fibonacci sequence starts with 1.
The previous two numbers will determine the next value to be used.
Examples:
1 + 1 = 2 (This is our 3rd value)
1 + 2 = 3 (4th)
2 + 3 = 5 (5th)
3 + 5 = 8 (6th)
5 + 8 = 13 (7th)
This method is also called the “traditional Fibonacci” implementation. It is very slow the larger the input-number will be, thus it is not really too terribly useful.
#
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/roebe/toplevel_methods/fibonacci.rb', line 51
def self.traditional_fibonacci(i = 1)
i = i.first if i.is_a? Array
i = i.to_i if i.is_a? String
if i <= 0
e 'Please provide a number larger than 0.'
elsif i == 1
i
elsif i == 2
1
else
fibonacci(i - 1) + fibonacci(i - 2)
end
end
|
.traurige_oder_fröhliche_zahl(i) ⇒ Object
#
Roebe.traurige_oder_fröhliche_zahl
Es handelt sich dann um eine fröhliche Zahl, wenn folgende Rechenvorschrift mit einer endlichen Anzahl an Iterationsschritten zur Zahl 1 führt:
(1) Es wird jede Ziffer der gegebenen Zahl quadriert.
(2) Die Quadrate werden summiert.
Auf die Summe wird wieder diese Rechenvorschrift ausgeführt. Wird eben die Zahl 1 erreicht, dann ist die Berechnung am Ende angekommen.
Folgende Beispiele repräsentieren fröhliche Zahlen:
23 → 2 2 + 3 2 = 13 → 1 2 + 3 2 = 10 → 1 2 + 0 2 = 1
97 → 9 2 + 7 2 = 130 → 1 2 + 3 2 + 0 2 = 10 → 1 2 + 0 2 = 1
7 → 7 2 = 49 → 4 2 + 9 2 = 97 → 9 2 + 7 2 = 130 → 1 2 + 3 2 + 0 2 = 10 → 1 2 + 0 2 = 1
#
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/roebe/math/traurige_oder_fröhliche_zahl.rb', line 27
def self.traurige_oder_fröhliche_zahl(i)
i = i.first if i.is_a? Array
i = i.to_s
splitted = i.split(//)
sum = splitted.map {|entry| entry.to_i * entry.to_i }.sum
case sum
when 1
return true
when 4
return false
else
sum = traurige_oder_fröhliche_zahl(sum)
end
return sum
end
|
.try_to_enable_the_expanded_cd_aliases(be_verbose = true) ⇒ Object
#
Roebe.try_to_enable_the_expanded_cd_aliases
This method will define various methods when invoked.
Since as of February it resides in its own helper-module.
#
#
Use this method if you wish to extract a ruby .gem archive. Normally you could - and should - use the “gem” utility for this, but sometimes, for various reasons, you may have to use a non-gem based method to extract .gem files. This is why this method exists.
Presently (past July 2017), we will make use of “tar” to extract a .gem file but this may change at a later time, perhaps even using a ruby-internal way instead.
#
191
192
193
194
195
196
197
198
199
200
201
202
|
# File 'lib/roebe/classes/extract_gem_file.rb', line 191
def self.(i)
if i.is_a? Array
i.each {|entry| (entry) }
else
if File.exist? i
opn; e 'Trying to extract the .gem '+sfancy(i)+' next.'
Roebe.(i)
else
opn; e 'No such gem at '+sfile(i)+' appears to exist.'
end
end
end
|
.try_to_require_the_colours_project(be_verbose = true) ⇒ Object
#
Roebe.try_to_require_the_colours_project
#
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/roebe/colours/colours.rb', line 31
def self.try_to_require_the_colours_project(
be_verbose = true
)
begin
require 'colours/html_colours'
rescue LoadError
if be_verbose
puts 'The colours project does not seem to be '\
'available. We will continue though.'
end
end
end
|
.try_to_run_the_ascii_paradise_demo ⇒ Object
#
Roebe.try_to_run_the_ascii_paradise_demo
#
14
15
16
17
18
19
20
21
|
# File 'lib/roebe/toplevel_methods/ascii_paradise.rb', line 14
def self.try_to_run_the_ascii_paradise_demo
begin
require 'ascii_paradise'
AsciiParadise.demo
rescue LoadError
e 'ascii_paradise is not installed.'
end
end
|
.turquoise(i = '') ⇒ Object
357
358
359
360
|
# File 'lib/roebe/colours/colours.rb', line 357
def self.turquoise(i = '')
return COLOURS.turquoise(i) if @use_colours
return i
end
|
.umbrella_with_raindrops ⇒ Object
#
Roebe.umbrella_with_raindrops
#
164
165
166
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 164
def self.umbrella_with_raindrops
EmojiParadise.send(__method__)
end
|
.umfang(i = ARGV) ⇒ Object
87
88
89
|
# File 'lib/roebe/math/circle.rb', line 87
def self.umfang(i = ARGV)
::Roebe::Math.kreisumfang(i)
end
|
.unicode_chess_symbols? ⇒ Boolean
#
Roebe.unicode_chess_symbols?
#
166
167
168
169
170
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 166
def self.unicode_chess_symbols?
(
[ Chess.white_pieces? ] + [ Chess.black_pieces? ]
).flatten
end
|
.unicode_cliner ⇒ Object
#
Roebe.unicode_cliner
This is the same as cliner(), defined below, but it will use Unicode building blocks rather than the ‘-’ character.
#
63
64
65
66
|
# File 'lib/roebe/toplevel_methods/cliner.rb', line 63
def self.unicode_cliner
require 'roebe/requires/require_unicode.rb'
e (Roebe.horizontal_building_block * 80)
end
|
.unicode_integral_symbol ⇒ Object
#
Roebe.unicode_integral_symbol
This will show the symbol “∫”.
#
120
121
122
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 120
def self.unicode_integral_symbol
EmojiParadise.send(__method__)
end
|
.university_email? ⇒ Boolean
#
Roebe.university_email?
#
22
23
24
25
26
27
28
29
30
|
# File 'lib/roebe/toplevel_methods/email.rb', line 22
def self.university_email?
target_file = '/home/x/data/personal/yaml/roeberia_settings.yml'
if File.exist? target_file
return YAML.load_file(target_file)['UNET_EMAIL']
else
e 'No file exists at '+target_file
end
return nil
end
|
.upcase_all_files(from = return_pwd) ⇒ Object
#
Roebe.upcase_all_files
Easier module-level method. First argument should be the directory under which you wish to use this class on.
#
135
136
137
138
139
|
# File 'lib/roebe/classes/upcaser.rb', line 135
def self.upcase_all_files(
from = return_pwd
)
Roebe::Upcaser.new(from)
end
|
.update(install_how = :both) ⇒ Object
#
Roebe.update (iruby tag, update tag)
Purpose of this little method is to update my personal ruby projects, no matter what. We will also dump into the directory /Depot/Temp/MyGems (My custom addons)
Since as of Feb 2015 we will also put these .gem files into an archive directory.
The first argument ‘install_how` can be either of these 3 values:
:gem or :setup or :both
To invoke this method from the commandline, do:
rupdate
#
288
289
290
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 288
def self.update(install_how = :both) ::Roebe::Update.new(install_how)
end
|
.update_pciids(i = :ruby_way, remote_url_to_use = 'http://pci-ids.ucw.cz/v2.2/pci.ids') ⇒ Object
#
Roebe.update_pciids
There are two ways how to use this method:
(a) the :ruby_way
(b) the :pciutils_way
The default is the ruby way; the variant with pciutils exists primarily so that we can remain compatible with the shell script called update-pciids, which comes from the “pciutils” suite.
This method can also be called from the commandline, by issuing a command like:
roebe --update-pciids
#
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/roebe/toplevel_methods/update_pciids.rb', line 31
def self.update_pciids(
i = :ruby_way,
remote_url_to_use = 'http://pci-ids.ucw.cz/v2.2/pci.ids'
)
case i
when :ruby_way,
:default
require 'open-uri'
dataset = open(remote_url_to_use).read
what = dataset
into = File.basename(remote_url_to_use)
e "Storing into `#{into}`."
write_what_into(what, into)
if File.exist?(into) and is_on_roebe?
require 'fileutils'
_ = '/usr/local/share/'
mkdir(_) unless File.directory? _
new_into = _+File.basename(remote_url_to_use)
e 'Next moving `'+into+'` into `'+new_into+'`.'
FileUtils.mv(into, new_into)
end
when :pciutils_way
esystem 'update-pciids'
end
end
|
.update_roebe(i = "#{HOME_DIRECTORY_OF_USER_X}data/PROGRAMMING_LANGUAGES/RUBY/src/roebe/") ⇒ Object
#
Roebe.update_roebe
This is a quick ad-hoc method to update the roebe project, on my home directory.
#
101
102
103
104
105
106
107
108
109
|
# File 'lib/roebe/toplevel_methods/rinstall2.rb', line 101
def self.update_roebe(
i = "#{HOME_DIRECTORY_OF_USER_X}data/PROGRAMMING_LANGUAGES/RUBY/src/roebe/"
)
if File.directory? i
Dir.chdir(i) e 'We are now in the directory `'+Dir.pwd+'`.'
end
Roebe.rinstall2
end
|
.update_the_main_pdf_viewer_file_with_this_program(what) ⇒ Object
#
Roebe.update_the_main_pdf_viewer_file_with_this_program
The argument to this method should be your favourite PDF viewer, such as ‘okular’ or ‘evince’.
#
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/roebe/toplevel_methods/update_the_main_pdf_viewer_file_with_this_program.rb', line 23
def self.update_the_main_pdf_viewer_file_with_this_program(
what
)
what = what.to_s.dup
require 'pdf_paradise'
if Object.const_defined? :PdfParadise
into = PdfParadise.file_pdf_viewer?
e "#{Colours.grey('Storing')} "\
"#{sfancy(what.to_s)} #{Colours.grey('into `')}"\
"#{sfile(into)}"\
"#{Colours.grey('`.')}"
::Roebe.write_what_into(what, into)
else
e 'The project pdf_paradise is not available.'
end
end
|
.upper_half_block ⇒ Object
#
Roebe.upper_half_block
This is especially useful for “interface building” on the commandline.
We can display a horizontal but also a vertical line with this, even via colours.
#
48
49
50
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 48
def self.upper_half_block
EmojiParadise.upper_half_block
end
|
.upper_one_eighth_block ⇒ Object
#
Roebe.upper_one_eighth_block
#
181
182
183
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_block_elements.rb', line 181
def self.upper_one_eighth_block
EmojiParadise.upper_one_eighth_block
end
|
.upwards_arrow ⇒ Object
1003
1004
1005
1006
1007
1008
1009
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1003
def self.upwards_arrow
result = "\u{2191}"
if is_on_roebe?
set_xorg_buffer(result.strip)
end
result
end
|
.url_to_the_cascadia_font? ⇒ Boolean
#
Roebe.url_to_the_cascadia_font?
Just store the URL to the cascadia font - the method will then download the fonts into the current working directory, or into the main TTF directory if we are on a roebe-system.
#
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/roebe/toplevel_methods/install_the_cascadia_font.rb', line 24
def self.url_to_the_cascadia_font?
%w(
https://github.com/microsoft/cascadia-code/releases/download/v1911.21/Cascadia.ttf
https://github.com/microsoft/cascadia-code/releases/download/v1911.21/CascadiaMono.ttf
https://github.com/microsoft/cascadia-code/releases/download/v1911.21/CascadiaMonoPL.ttf
https://github.com/microsoft/cascadia-code/releases/download/v1911.21/CascadiaPL.ttf
)
end
|
.url_to_the_hack_font?(general_URL_or_URL_to_the_zip_file = :general) ⇒ Boolean
#
Roebe.url_to_the_hack_font?
Just store the URL to the Hack font, since this is one of my favourite fonts to use.
#
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/roebe/toplevel_methods/install_the_hack_font.rb', line 23
def self.url_to_the_hack_font?(
general_URL_or_URL_to_the_zip_file = :general
)
case general_URL_or_URL_to_the_zip_file
when :general
'https://github.com/source-foundry/Hack/releases'
else
'https://github.com/source-foundry/Hack/releases/download/v3.003/Hack-v3.003-ttf.zip'
end
end
|
.url_to_the_jet_brains_font?(general_URL_or_URL_to_the_zip_file = :general) ⇒ Boolean
#
Roebe.url_to_the_jet_brains_font?
#
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/roebe/toplevel_methods/install_the_jet_brains_mono_font.rb', line 19
def self.url_to_the_jet_brains_font?(
general_URL_or_URL_to_the_zip_file = :general
)
case general_URL_or_URL_to_the_zip_file
when :general
'https://www.jetbrains.com/lp/mono/'
else
'https://download.jetbrains.com/fonts/JetBrainsMono-1.0.0.zip'
end
end
|
.use_atril ⇒ Object
#
Roebe.use_atril
Use atril as the main pdf-viewer.
#
.use_colours? ⇒ Boolean
93
94
95
|
# File 'lib/roebe/colours/colours.rb', line 93
def self.use_colours?
@use_colours
end
|
.use_evince ⇒ Object
#
Roebe.use_evince
Use evince as the main pdf-viewer.
#
.user_install_all_registered_gems(use_gem_or_setup_rb = :setup_rb) ⇒ Object
#
Roebe.user_install_all_registered_gems
To invoke this, try:
roebe --user-install
#
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
# File 'lib/roebe/commandline/misc.rb', line 85
def self.user_install_all_registered_gems(
use_gem_or_setup_rb = :setup_rb
)
require 'roebe/toplevel_methods/rinstall2.rb'
_ = array_install_these_gem_projects
e
e 'Now installing all registered gems that are found in the'
e 'Roebe project.'
e
start_dir = '/home/x/programming/ruby/src/'
cd start_dir
_.each {|this_gem|
e 'Installing this gem: '+steelblue(this_gem)
cd this_gem
case use_gem_or_setup_rb
when :gem
possible_name = Dir[this_gem+'*.gem'].first.to_s remove_file(possible_name) if File.exist? possible_name esystem 'gem build *.gemspec'
possible_name = Dir[this_gem+'*.gem'].first.to_s esystem 'gem install ./'+possible_name+' --user-install'
remove_file(possible_name) if File.exist? possible_name when :setup_rb,
:default
rinstall2 { :user_install }
end
cd start_dir
}
end
|
.verbose_truth(i) ⇒ Object
13
14
15
16
17
18
19
20
21
|
# File 'lib/roebe/toplevel_methods/verbose_truth.rb', line 13
def self.verbose_truth(i)
case i.to_s
when 'true','t'
i = 'Yes.'
when 'false','f'
i = 'No.'
end
i
end
|
.version? ⇒ Boolean
50
51
52
|
# File 'lib/roebe/version/version.rb', line 50
def self.version?
VERSION
end
|
.vetmed? ⇒ Boolean
419
420
421
422
423
|
# File 'lib/roebe/toplevel_methods/module_methods.rb', line 419
def self.vetmed?
require 'roebe/classes/passwords.rb'
e BeautifulUrl[:vetmed]
Passwords.password_for :vetmed
end
|
.warning_sign ⇒ Object
#
Roebe.warning_sign
The symbol will be: ⚠
Invocation example:
puts Colours.crimson(Roebe.warning_sign)
#
616
617
618
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 616
def self.warning_sign
EmojiParadise.send(__method__)
end
|
.weekday?(this_weekday_as_number = Date.today.wday) ⇒ Boolean
#
Roebe.weekday?
Usage example:
Roebe.weekday?
#
114
115
116
117
118
|
# File 'lib/roebe/toplevel_methods/time.rb', line 114
def self.weekday?(
this_weekday_as_number = Date.today.wday
)
return DAY_NAMES[this_weekday_as_number] end
|
12
13
14
15
|
# File 'lib/roebe/toplevel_methods/wget.rb', line 12
def self.wget(i)
_ = "wget #{i}"
system _
end
|
.wheel_of_dharma ⇒ Object
#
Roebe.wheel_of_dharma
#
541
542
543
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 541
def self.wheel_of_dharma
EmojiParadise.send(__method__)
end
|
.white_chess_bishop ⇒ Object
#
Roebe.white_chess_bishop
#
42
43
44
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 42
def self.white_chess_bishop EmojiParadise.white_chess_bishop
end
|
.white_chess_king ⇒ Object
#
Roebe.white_chess_king
#
20
21
22
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 20
def self.white_chess_king EmojiParadise.white_chess_king
end
|
.white_chess_knight ⇒ Object
#
Roebe.white_chess_knight
#
92
93
94
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 92
def self.white_chess_knight EmojiParadise.white_chess_knight
end
|
.white_chess_pawn ⇒ Object
#
Roebe.white_chess_pawn
#
50
51
52
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 50
def self.white_chess_pawn EmojiParadise.white_chess_pawn
end
|
.white_chess_queen ⇒ Object
#
Roebe.white_chess_queen
#
27
28
29
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 27
def self.white_chess_queen EmojiParadise.white_chess_queen
end
|
.white_chess_rook ⇒ Object
#
Roebe.white_chess_rook
#
35
36
37
|
# File 'lib/roebe/toplevel_methods/unicode/unicode_chess_symbols.rb', line 35
def self.white_chess_rook EmojiParadise.white_chess_rook
end
|
.white_frowning_face ⇒ Object
#
Roebe.white_frowning_face
This is, sort of, a sad smiley. It will look like this: ☹
#
1038
1039
1040
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 1038
def self.white_frowning_face
EmojiParadise.send(__method__)
end
|
.white_shogi_piece ⇒ Object
#
Roebe.white_shogi_piece
#
178
179
180
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 178
def self.white_shogi_piece
EmojiParadise.send(__method__)
end
|
.white_sun_with_rays ⇒ Object
#
Roebe.white_sun_with_rays
#
358
359
360
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 358
def self.white_sun_with_rays
EmojiParadise.send(__method__)
end
|
.whois(i = nil) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/roebe/toplevel_methods/whois.rb', line 14
def self.whois(i = nil)
i = [i].flatten.compact
i << 'google.at' if i.empty?
i.each {|entry|
begin
require 'whois'
w = Whois::Client.new
lookup_result = w.lookup(entry)
e lookup_result
rescue LoadError
e 'The gem called whois is unavailable.'
end
}
end
|
.wochentag?(i = ARGV.first) ⇒ Boolean
.wochentag_anzeiger(i) ⇒ Object
#
Roebe.wochentag_anzeiger
#
208
209
210
|
# File 'lib/roebe/classes/wochentag_anzeiger.rb', line 208
def self.wochentag_anzeiger(i)
::Roebe::WochentagAnzeiger.new(i)
end
|
.word_count(i = ARGV) ⇒ Object
46
47
48
49
50
51
|
# File 'lib/roebe/toplevel_methods/word_frequencies.rb', line 46
def self.word_count(i = ARGV)
if i.is_a? Array
i = i.join(' ').strip
end
i.delete("\n").split(' ').size
end
|
.word_frequencies(i = 'We tried list and we tried dicts also we tried Zen') ⇒ Object
#
Roebe.word_frequencies
The input to this method should be a String.
This method will return a Hash, keeping track of the amount of words that are part of the given input String.
Usage example:
Roebe.word_frequencies( %w( sparky the cat sat on the mat ))
#
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/roebe/toplevel_methods/word_frequencies.rb', line 22
def self.word_frequencies(
i = 'We tried list and we tried dicts also we tried Zen'
)
if i.is_a? Array
i = i.join(' ').strip
end
if i and i.is_a?(String) and File.exist?(i)
i = File.read(i).strip.squeeze(' ')
end
hash = Hash.new
hash.default = 0
i.split(' ').each {|word|
hash[word] += 1
}
hash
end
|
.word_wrap(i, n_characters = :default) ⇒ Object
59
60
61
|
# File 'lib/roebe/classes/word_wrap.rb', line 59
def self.word_wrap(i, n_characters = :default)
return Roebe::WordWrap[i, n_characters]
end
|
.write_what_into(what, into = 'foobar.md', use_this_mode = 'w+') ⇒ Object
#
Roebe.write_what_into
This toplevel-method can be used to write into a file.
The first argument is the text that you may want to use.
#
78
79
80
81
82
83
84
|
# File 'lib/roebe/toplevel_methods/write_what_into.rb', line 78
def self.write_what_into(
what,
into = 'foobar.md',
use_this_mode = 'w+'
)
::Roebe::SaveFile.write_what_into(what, into, use_this_mode)
end
|
#
Roebe.wurzel
This will be “√”.
#
88
89
90
|
# File 'lib/roebe/toplevel_methods/unicode/popular_unicode_symbols.rb', line 88
def self.wurzel
EmojiParadise.send(__method__)
end
|
.www_directory? ⇒ Boolean
38
39
40
41
|
# File 'lib/roebe/constants/www.rb', line 38
def self.www_directory?
require 'roebe/project/project.rb'
Roebe.project_base_dir?+'www/'
end
|
.zenity(i) ⇒ Object
300
301
302
|
# File 'lib/roebe/classes/zenity.rb', line 300
def self.zenity(i)
Roebe::Zenity[i]
end
|
.zip_on_windows(this_directory = Dir.pwd, name_of_the_file = :default) ⇒ Object
#
Roebe.zip_on_windows
Usage example:
Roebe.zip_on_windows '/home/x/songs/', 'all_songs.zip'
#
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/roebe/toplevel_methods/rubyzip.rb', line 20
def self.zip_on_windows(
this_directory = Dir.pwd,
name_of_the_file = :default
)
if is_on_roebe? and (!this_directory == Dir.pwd) and
(name_of_the_file == :default)
name_of_the_file = File.basename(this_directory).delete('/')
end
case name_of_the_file
when :default
name_of_the_file = 'archive.zip'
end
name_of_the_file = name_of_the_file.dup if name_of_the_file.frozen?
name_of_the_file << '.zip' unless name_of_the_file.end_with? '.zip'
if this_directory.frozen?
this_directory = this_directory.dup
end
this_directory << '/' unless this_directory.end_with? '/'
cmd = "7z a -tzip #{name_of_the_file} #{this_directory}"
esystem cmd
end
|
.zlib(zipped_filename, unzipped_filename) ⇒ Object
#
Roebe.zlib
This method can be used to use zlib in order to create a .gz file.
This method accepts two arguments:
(1) zipped_filename:
This is the string holding the path/filename of where
your gzipped file is located.
(2) unzipped_filename:
This is the string holding path/filename of where
you are saving the unzipped file.
#
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/roebe/toplevel_methods/zlib.rb', line 27
def self.zlib(
zipped_filename,
unzipped_filename
)
begin
require 'zlib'
rescue LoadError; end
File.open(unzipped_filename, 'wb') { |unzipped_file|
unzipped_file.binmode
gz = File.open(zipped_filename, 'rb')
gz.binmode
begin
zis = Zlib::GzipReader.new(gz)
dis = zis.read
io = StringIO.new(dis)
ensure
zis.finish if zis
end
unzipped_file.write(io.read)
unzipped_file.flush
unzipped_file.fsync
gz.close
}
GC.start
end
|
Instance Method Details
133
134
135
|
# File 'lib/roebe/colours/colours.rb', line 133
def (i = '')
::Roebe.(i)
end
|
#gold(i = '', use_colours = true) ⇒ Object
283
284
285
286
287
288
|
# File 'lib/roebe/colours/colours.rb', line 283
def gold(
i = '',
use_colours = true
)
::Roebe.gold(i, use_colours)
end
|
#ntrad(i = ARGV) ⇒ Object
28
29
30
|
# File 'lib/roebe/toplevel_methods/ntrad.rb', line 28
def ntrad(i = ARGV)
::Roebe.ntrad(i)
end
|
#open_in_editor_and_browser(this = ARGV) ⇒ Object
#
open_in_editor_and_browser
#
#play_simpsons(available_where = nil) ⇒ Object
Also known as:
simpson, simps, simpsons, halloween
#
play_simpsons
rinvoke simpsons
#
88
89
90
|
# File 'lib/roebe/toplevel_methods/halloween.rb', line 88
def play_simpsons(available_where = nil)
::Roebe.halloween
end
|
#prettify_url(i = :installation, shall_we_replace_the_localhost = :default) ⇒ Object
Also known as:
beautiful_url, pretty_url, sanitize_url
#
prettify_url
Just a wrapper towards Roebe.sanitize_url
#
63
64
65
66
67
68
69
70
|
# File 'lib/roebe/toplevel_methods/sanitize_url.rb', line 63
def prettify_url(
i = :installation,
shall_we_replace_the_localhost = :default
)
::Roebe.sanitize_url(
i, shall_we_replace_the_localhost
)
end
|
#programs_dir? ⇒ Boolean
106
107
108
|
# File 'lib/roebe/constants/misc.rb', line 106
def programs_dir?
PROGRAMS_DIRECTORY
end
|
#rds(i) ⇒ Object
Also known as:
remove_double_slashes, replace_double_slash
28
29
30
|
# File 'lib/roebe/toplevel_methods/rds.rb', line 28
def rds(i)
::Roebe.rds(i)
end
|
210
211
212
|
# File 'lib/roebe/colours/colours.rb', line 210
def sdir(i)
::Roebe.sdir(i)
end
|
#seagreen(i = '', use_colours = true) ⇒ Object
262
263
264
265
266
267
|
# File 'lib/roebe/colours/colours.rb', line 262
def seagreen(
i = '',
use_colours = true
)
::Roebe.seagreen(i, use_colours)
end
|
237
238
239
|
# File 'lib/roebe/colours/colours.rb', line 237
def sfile(i)
::Roebe.sfile(i)
end
|
172
173
174
|
# File 'lib/roebe/colours/colours.rb', line 172
def simp(i)
::Roebe.simp(i)
end
|
#trad(i = ARGV) ⇒ Object
29
30
31
|
# File 'lib/roebe/toplevel_methods/trad.rb', line 29
def trad(i = ARGV)
::Roebe.trad(i)
end
|