$ git config --global init.defaultBranch main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Pluralize | |
{ | |
public static class PluralizeTask | |
{ | |
public static string PluralizeRubles(int count) | |
{ | |
if (count % 10 == 1 && count % 100 != 11) | |
return "рубль"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Rectangles | |
{ | |
public static class RectanglesTask | |
{ | |
// Пересекаются ли два прямоугольника (пересечение только по границе также считается пересечением) | |
public static bool AreIntersected(Rectangle r1, Rectangle r2) | |
{ | |
return !(r1.Left > r2.Right || r2.Left > r1.Right || r1.Bottom < r2.Top || r2.Bottom < r1.Top); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Billiards | |
{ | |
public static class BilliardsTask | |
{ | |
/// <summary> | |
/// | |
/// </summary> | |
/// <param name="directionRadians">Угол направления движения шара</param> | |
/// <param name="wallInclinationRadians">Угол</param> | |
/// <returns></returns> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class atom(object): | |
"""An implementation of the atom concept, inspired by Erlang. | |
Modified from here: http://www.me.net.nz/blog/atoms-slash-symbols-in-python/ | |
""" | |
def __init__(self, a): | |
self._a = intern(a) | |
def __eq__(self, other): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Filter "/etc/fail2ban/filter.d/cockpit.conf": | |
# Fail2Ban filter for Cockpit | |
# | |
[Definition] | |
failregex = pam_unix\(cockpit:auth\): authentication failure;.*rhost=<HOST> | |
datepattern = ^%%b %%d %%H:%%M:%%S | |
# DEV Notes: | |
# Author: Dmitriy Pertsev | |
Jail "/etc/fail2ban/jail.local": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
From the man page for ssh: | |
-f Requests ssh to go to background just before command execution. This is useful if ssh is going to ask | |
for passwords or passphrases, but the user wants it in the background. This implies -n. The recommended way | |
to start X11 programs at a remote site is with something like ssh -f host xterm. | |
If the ExitOnForwardFailure configuration option is set to “yes”, then a client started with -f will wait | |
for all remote port forwards to be successfully established before placing itself in the background. |
asdf
lives in https://github.com/asdf-vm/asdf
Follow its installation instructions, which at the moment of writing were:
cd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script designed to upgrade PNETLab from almost any version to NEW_PNETLAB_VERSION version | |
# Requirement: Not having PNETLab 6.x installed for being able to upgrade to NEW_PNETLAB_VERSION | |
# This script avoids to make this upgrade process twice | |
# CONSTANTS | |
NEW_PNETLAB_VERSION=5.3.11 | |
GREEN='\033[32m' | |
NO_COLOR='\033[0m' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Usage: | |
# elixir <this_script_name.exs> 1.7.2 | |
# | |
# The script grabs a Phoenix version and places it | |
# under `phoenix/<version>` subfolder. It attempts to call | |
# a diff GUI, if there's another version found in `phoenix`. | |
# It picks the closest older version, if more than one found. | |
# | |
# Feel free to modify PhoenixCompareConfig |
OlderNewer