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
// Optional chaining | |
const test = { | |
x: { | |
x: 1 | |
} | |
} | |
// undefined | |
console.log(test?.x?.z?.z); | |
// TypeError: test.x.z is undefined |
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
/** | |
* Ох боже. Защо се налага да се правят подобни извратени | |
* врътки само и само да угодиш на някой дизаинер ... | |
* В 2:30ч през ноща .. | |
**/ | |
.starter { | |
background-color: darkred; | |
} | |
.starter ~ tr:not([class=starter]):nth-child(even) { | |
background-color: blue; |
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
(function() { | |
const winners = document.querySelector('._54_6._4-ss._4-sv').querySelectorAll('a[data-hovercard]'); | |
winners[10].style.backgroundColor = 'coral'; | |
})() |
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
(function() { | |
const winners = document.querySelector('._54_6._4-ss._4-sv').querySelectorAll('a[data-hovercard]'); | |
winners[999].style.backgroundColor = 'coral'; | |
})() |
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
public class Main { | |
/** | |
* Because it is possible to initialize a char with a | |
* positive integer number we can made funny things | |
* with it. For example we can show all letters from | |
* an alphabet with loop. This example lists all | |
* hebrew letters. They are between U+05D0 and | |
* U+05EA. | |
**/ | |
public static void main(String[] args) { |
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
$username = Read-Host "Enter a user name" | |
$password = Read-Host "Enter a Password" -AsSecureString | |
$requestPassword = ConvertFrom-SecureString -SecureString $password -AsPlainText | |
$command = -join( | |
"git push https://", | |
[uri]::EscapeDataString($username), | |
":", | |
[uri]::EscapeDataString($requestPassword), | |
"@github.com/userName/projectName.git master" | |
) |
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
#!/usr/bin/env bash | |
test -f resuls.json && rm resuls.json ;egrep --include="*.txt" -rwoih '[^[:space:]@]+@[^@[:space:]]+\.[^[:space:]]{2,4}' . | uniq | awk 'BEGIN {printf "There are the following emails found\n"; count=0; print "[" > "resuls.json";out=""} { print $0; count++; out = out "\"" $0 "\",\n" } END {printf "Total %d\n", count; out=substr(out, 1, length(out) - 2); printf "%s\n]",out > "resuls.json"; printf "There are generated json file with them - resuls.json"}' |
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 User { | |
String login; | |
String firstName; | |
String lastName; | |
public User(String login, String firstName, String lastName) { | |
this.login = login; | |
this.firstName = firstName; | |
this.lastName = lastName; | |
} | |
} |
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 Car { | |
int yearModel; | |
String make; | |
int speed = 0; | |
public void accelerate() { | |
this.speed += 5; | |
} | |
public void brake() { |
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
import java.util.Arrays; | |
import java.util.Scanner; | |
class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
int size = scanner.nextInt(); | |
char[][] matrix = new char[size][size]; | |
int center = (int) Math.ceil(size / 2.0) - 1; | |
for (char[] chars : matrix) { |