Skip to content

Instantly share code, notes, and snippets.

@sickmz
sickmz / gist:193cffeb1cc19c8fe7bebd9845f1c64d
Created December 11, 2023 23:14
powershell video encoder with ffmpeg: convert iPhone MOV to MP4 with nvidia hardware acceleration (h264_nvenc)
# path input
$inputPath = "C:\Users\matteo\Desktop\transcode"
# path output
$outputPath = "C:\Users\matteo\Desktop\transcode\output"
if (-not (Test-Path -Path $outputPath -PathType Container)) {
New-Item -ItemType Directory -Path $outputPath | Out-Null
}
@sickmz
sickmz / yahoofinance.gs
Last active September 3, 2023 12:48
Fetch the price (EU format) of an asset from Yahoo Finance and saved to Google Sheet
/**
* Fetches the price of a financial instrument from Yahoo Finance.
*
* @param {string} ticker The symbol/ticker of the financial instrument (e.g. "BTC-EUR" or "VWCE.MI").
* @return {string} The price of the financial instrument.
* @customfunction
*/
function YAHOOFINANCE(ticker) {
const url = `https://finance.yahoo.com/quote/${ticker}?p=${ticker}`;
const res = UrlFetchApp.fetch(url, { muteHttpExceptions: true });
# loadkeys it
# ls /sys/firmware/efi/efivars
# timedatectl set-ntp true
| /dev/sda1 | EFI | At least 260 MiB |
|-----------|-----------------|-------------------------|
| /dev/sda2 | Swap | More than 512 MiB |
|-----------|-----------------|-------------------------|
| /dev/sda3 | x86-64 root (/) | Remainder of the device |
"Darwin Kernel Version 16.5.0: Thu Feb 23 23:22:54 PST 2017; root:xnu-3789.52.2~7/RELEASE_ARM64_T7000";
OFFSET_ZONE_MAP = 0xfffffff007558478;
OFFSET_KERNEL_MAP = 0xfffffff0075b4050;
OFFSET_KERNEL_TASK = 0xfffffff0075b4048;
OFFSET_REALHOST = 0xfffffff00753aba0;
OFFSET_BZERO = 0xfffffff00708df80;
OFFSET_BCOPY = 0xfffffff00708ddc0;
OFFSET_COPYIN = 0xfffffff00718d3a8;
OFFSET_COPYOUT = 0xfffffff00718d59c;
@sickmz
sickmz / install-telegram-cli.sh
Created November 22, 2017 03:58
fast install telegram-cli on Ubuntu/Debian
#!/bin/bash
git clone --recursive https://github.com/vysheng/tg.git /home/user/tg && cd /home/parallels/tg
sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make
./configure
make
cp tg-server.pub bin
cd bin
./telegram-cli -k tg-server.pub
exit