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
@echo off | |
setlocal enabledelayedexpansion | |
set "regKey=HKEY_CURRENT_USER\Software\EFD Software\HDTunePro" | |
set "valueName1=Test Parameters 1" | |
set "valueName6=Test Parameters 6" | |
:: Read the value of "Test Parameters 1" | |
for /f "skip=2 tokens=4*" %%A in ('reg query "%regKey%" /v "%valueName1%"') do set "value1=%%B" |
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
const fs = require('fs'); | |
const { exec, execSync } = require('child_process'); | |
const getStartTime = (fileName) => { | |
const ffprobeOutput = execSync(`ffprobe -v quiet -print_format json -show_entries format=start_time ${fileName}`).toString(); | |
const ffprobeJSON = JSON.parse(ffprobeOutput); | |
return parseFloat(ffprobeJSON.format.start_time) * 1000; | |
}; | |
const mixAudioTracks = (audioFiles) => { |
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
// ==UserScript== | |
// @name smsng-uk-student-any-mail | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @match https://shop.samsung.com/uk/multistore/ukepp/uk_student/registration | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=samsung.com | |
// @grant GM_addStyle | |
// @run-at document-start | |
// ==/UserScript== |
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
Nginx Proxy Manager | |
Proxy Host | |
[X] Block Common Exploits | |
[X] Websockets Support | |
[X] Force SSL | |
[X] HTTP/2 Support | |
[X] HSTS Enabled | |
[X] HSTS Subdomains |
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 | |
set -e | |
{ | |
docker exec --user www-data nextcloud php cron.php | |
docker exec --user www-data nextcloud php /var/www/html/occ db:add-missing-columns --no-interaction | |
docker exec --user www-data nextcloud php /var/www/html/occ db:add-missing-primary-keys --no-interaction | |
docker exec --user www-data nextcloud php /var/www/html/occ db:add-missing-indices --no-interaction | |
docker exec --user www-data nextcloud php /var/www/html/occ db:convert-filecache-bigint --no-interaction | |
docker exec --user www-data nextcloud php /var/www/html/occ maintenance:mimetype:update-db --no-interaction |
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
#include <iostream> | |
#include <chrono> | |
#include <cstdint> | |
#include <unistd.h> | |
#include <sys/sysctl.h> | |
#include <mach/mach_host.h> | |
const int64_t REPETITIONS = 5; | |
inline void flush_cache() { |
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
#include <iostream> | |
#include <chrono> | |
#include <cstdint> | |
#include <unistd.h> // for sysctl | |
const int64_t ARRAY_SIZE = 1024 * 1024 * 1024; // 1024 MB | |
const int64_t REPETITIONS = 1000; | |
inline void flush_cache() { | |
__builtin_arm_dsb(0b1111); |
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
#![feature(asm)] | |
use std::time::Instant; | |
const BUFFER_SIZE: usize = 1024 * 1024 * 128; // 128 MB | |
fn main() { | |
let mut buffer = vec![0u8; BUFFER_SIZE]; | |
let start_time = Instant::now(); | |
unsafe { write_memory_avx(&mut buffer); } |
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 | |
set -ex | |
if [ -z "$1" ]; then | |
for dir in */; do [ -e "$dir" ] || continue; ./upgrade.sh "$dir"; done | |
exit 0 | |
fi | |
cwd="$(pwd)" | |
cd "$1" | |
if [ -f Dockerfile ]; then | |
image=$(cat Dockerfile | awk 'tolower($1) == "from" { 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
const { execSync } = require('child_process'); | |
const stdout = execSync(`ffprobe -of json -show_packets -show_streams -show_format -i ${process.argv[2]}`, { maxBuffer: 1024 * 1024 * 32 }); | |
const { packets } = JSON.parse(stdout); | |
for (let i = 0; i < packets.length - 1; i++) { | |
const pts = Number(packets[i].pts); | |
const duration = Number(packets[i].duration); | |
const pts_next = Number(packets[i + 1]?.pts); | |
if (pts + duration !== pts_next) { | |
console.log(`timestamp issue on packet index: ${i + 1}, pts is expected to be ${pts + duration} but it is ${pts_next}`); | |
} |
NewerOlder