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
version: "3.8" | |
services: | |
pihole: | |
image: pihole/pihole:2024.02.2 | |
environment: | |
PIHOLE_DNS_: 1.1.1.3;1.0.0.3 | |
TZ: Europe/Zagreb | |
WEBPASSWORD: admin | |
volumes: |
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
#!/bin/bash | |
GO_VERSION=1.22.0 # https://go.dev/dl/ | |
system=$(uname | tr '[:upper:]' '[:lower:]') | |
arch | grep -i arm &> /dev/null | |
if [[ $? -eq 0 ]]; then | |
arch=$(arch) | |
if [[ "$arch" == "armv7l" ]]; then | |
arch=armv6l |
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
# Stream camera and microphone feed. | |
vlc v4l2:///dev/video0 --input-slave alsa://hw:0,0 | |
# Save 5s of camera and microphone feed to file. | |
timeout 5s cvlc v4l2:///dev/video0 --input-slave alsa://hw:0,0 --sout=file/avi:video.avi |
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.util.Random; | |
public class Main { | |
private static final int NUMBER_OF_COMPONENTS = 30; | |
private static final double MIN_COMPONENT_VALUE = -1; | |
private static final double MAX_COMPONENT_VALUE = 1; | |
private static final int POPULATION_SIZE = 30; | |
private static final int TOURNAMENT_SIZE = 10; | |
private static final double MUTATION_PROBABILITY = 0.1; |