This file contains 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
Get-ChildItem -Path . -Recurse | Unblock-File |
This file contains 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
curl -s http://mirrors.ubuntu.com/mirrors.txt | xargs -n1 -I {} sh -c 'echo `curl -r 0-102400 -s -w %{speed_download} -o /dev/null {}/ls-lR.gz` {}' |sort -g -r |head -1| awk '{ print $2 }' |
This file contains 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
# This is an example of krb5.conf for authentication with Active Directory | |
# Tested on libkrb5-3 1.15-1+deb9u1 | |
[libdefaults] | |
default_realm = EXAMPLE.COM | |
dns_lookup_realm = true | |
dns_lookup_kdc = true | |
forwardable = true | |
# Values for next three parameters should be used from Default Domain Policy GPO |
This file contains 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
<div class="container"> | |
<div class="score"> | |
score: <span class="score_val">0</span> | |
</div> | |
<div class="canvas-wrapper"> | |
<canvas width="400" height="400"></canvas> | |
</div> | |
<div class="controls"> | |
<button class="btn-start">Start</button> | |
<button class="btn-pause">Pause</button> |
This file contains 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 Solution { | |
public static void main(String[] args) { | |
for (int x = 2; x <= 6; x += 4) { | |
for (int y = 1; y <= 9; y++) { | |
for (int z = x; z <= x + 3; z++) { | |
System.out.print(String.format("%d * %d = %-2d ", z, y, y * z)); | |
} | |
System.out.println(); | |
} | |
System.out.println(); |
This file contains 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
1. Create a file: /etc/wsl.conf. | |
2. Put the following lines in the file in order to ensure the your DNS changes do not get blown away | |
[network] | |
generateResolvConf = false | |
3. In a cmd window, run wsl --shutdown | |
4. Restart WSL2 | |
5. Create a file: /etc/resolv.conf. If it exists, replace existing one with this new file. | |
6. Put the following line in the file |
This file contains 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
# make sure You have installed the infinality patches | |
export INFINALITY_FT_FILTER_PARAMS="8 17 50 17 8" | |
export INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH="0" | |
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="55" | |
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH="0" | |
export INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH="0" | |
export INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="20" | |
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="0" | |
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0" |
This file contains 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.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.*; | |
class Main { | |
public static void main(String[] args) throws IOException { | |
Path longestPath = Files.walk(Paths.get("D:\\Downloads\\basedir")) | |
.max(Comparator.comparingInt(Path::getNameCount)).orElseThrow(NullPointerException::new); |
This file contains 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 void deleteDirRecursively(File dir) { | |
File[] children = dir.listFiles(); | |
for (File child : children) { | |
if (child.isDirectory()) { | |
deleteDirRecursively(child); | |
} else { | |
child.delete(); | |
} | |
} |
This file contains 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 TestDrive { | |
public static void main(String[] args) throws InterruptedException { | |
BurgerStore mcDonalds = new McDonStore(); | |
BurgerStore burgerKing = new BurgerKingStore(); | |
Burger burger; | |
System.out.println("-Hello, one McDonalds style cheeseburger"); | |
System.out.println("-Okay! Please wait for a sec, -Calling to the McDonaldsStore. -Cheeseburger"); | |
burger = mcDonalds.orderBurger(Burger.CHEESE); |