- Documentation
- Installation
- Ubuntu:
sudo apt update && sudo apt install apache2-utils
- Windows:
- Download apache binaries
- Extract the content of zip
- Copy the /bin/ab.exe to a folder of your choice
- Ubuntu:
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 path from 'path'; | |
import {fileURLToPath} from 'url'; | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = path.dirname(__filename); | |
console.log('file-name 👉️', __filename); | |
console.log('directory-name 👉️', __dirname); |
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
function createCssClassName(str: string) { | |
return str | |
.toLowerCase() | |
.replace(/^(-?[0-9]|--)|[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g, "") | |
.trim() | |
.replace(/\s+/g, "-"); | |
} |
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 { createSocket } from 'dgram' | |
const PORT = process.env.UDP_LISTENER_PORT || 41234 | |
const socket = createSocket('udp4') | |
const message = Buffer.from('MST_TV_SERVER') | |
socket.bind(() => { | |
socket.setBroadcast(true) |
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
# flash recovery | |
heimdall flash --RECOVERY twrp-3.5.2_9-0-star2lte.img | |
# flash modem | |
heimdall flash --RADIO modem.bin --CP_DEBUG modem_debug.bin | |
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/sh | |
# The script automatically switches the DNS servers between Pi-hole and Cloudflare based on Pi-hole DNS Server status. | |
TARGET=192.168.0.7 # Pi-hole | |
FALLBACK_A=1.1.1.1 # Cloudflare | |
FALLBACK_B=1.0.0.1 # Cloudflare | |
function set_fallback_dns() { | |
echo $(date) |
https://dev.to/dip15739/dark-mode-with-only-1-css-property-17fl
html[theme='dark-mode'] {
filter: invert(1) hue-rotate(180deg);
}
html[theme='dark-mode'] img,
picture,
video{
filter: invert(1) hue-rotate(180deg);
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
limit_req_zone $binary_remote_addr zone=myWebsiteFrontLimit:10m rate=10r/s; | |
server { | |
root /var/www/my-angular-app/dist/my-angular-app; | |
index index.html; | |
server_name www.my-website.ro my-website.ro; | |
location / { |
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
// https://github.com/odyniec/tinyAgo-js/ | |
function ago(val) { | |
val = 0 | (Date.now() - val) / 1000; | |
var unit, length = { second: 60, minute: 60, hour: 24, day: 7, week: 4.35, | |
month: 12, year: 10000 }, result; | |
for (unit in length) { | |
result = val % length[unit]; | |
if (!(val = 0 | val / length[unit])) |
of it.
/ "Root" Everything on the system.
/bin Essential binaries (Sometimes a link to /usr/bin).
/boot Boot loader files.
/dev Device files.
NewerOlder