Skip to content

Instantly share code, notes, and snippets.

View fabriziogiordano's full-sized avatar
🎯
Focusing

Fabrizio Giordano fabriziogiordano

🎯
Focusing
View GitHub Profile
@fabriziogiordano
fabriziogiordano / compress_video
Last active August 22, 2024 16:08 — forked from trvswgnr/compress_video
portable shell script to compress videos with ffmpeg
#!/bin/sh
print_usage() {
echo "usage: compress_video <input_file> [half]"
echo "supported formats: mp4, webm, mkv, mov, avi, flv"
echo "[half] is an optional argument to scale the video to half the width and height"
}
get_extension() {
f="${1##*/}"
@fabriziogiordano
fabriziogiordano / token.get.main.js
Created May 15, 2024 15:36
Schwab - token flow
/*
ps aux | grep "ssh -L"|grep -v grep|awk '{print $2}'|xargs kill
ssh -L 443:127.0.0.1:443 -N -f root@linode; echo "linode: 443"
*/
import dotenv from "dotenv";
dotenv.config({ path: `${process.env.GAP_FOLDER}/.env` });
import fs from "fs";
import got from "got";
@fabriziogiordano
fabriziogiordano / personal-zucchini-detectron2-training.ipynb
Created May 11, 2023 00:36
Personal - Zucchini - Detectron2 Training.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fabriziogiordano
fabriziogiordano / html-uncompressed.html
Created November 29, 2022 07:28
astro-compress issue html uncompressed
<!DOCTYPE html>
<html lang="en">
<head>
<title>Celebration and Holiday - All celebrations and holidays</title>
<!-- Meta Tags -->
<meta charset="utf-8">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content="Givuma.com">
{
"title": "Personal",
"rules": [
{
"description": "Text Shortcut",
"manipulators": [
{
"from": {
"key_code": "s",
"modifiers": { "mandatory": ["right_command"], "optional": ["any"] }
Source https://tradinganalysis.com/four-percentile-resource/
Code to put in program
IV Percentile On Chart# beginning of code ———————- –
# IV% thinkscript code
# Display Implied Volatility Percentile as a label on a chart
declare upper ;
input length = 252 ; # bars to use in implied volatility calculation
# If IV data doesn’t exist for a particular period, set it to previous value so it won’t affect the hi/low
def ivClean = if IsNaN(imp_volatility()) then ivClean from 1 bar ago
@fabriziogiordano
fabriziogiordano / index.js
Created April 18, 2018 12:18
Extract frames from Video
const imgDiff = require('ffmpeg-image-diff');
const testFolder = './tests/';
const fs = require('fs');
const files = [];
const index_exclude = [];
(async () => {
fs.readdirSync(testFolder).forEach(file => {
{
"window.zoomLevel": 0,
"workbench.iconTheme": "vscode-icons",
"vsicons.projectDetection.disableDetect": true,
"editor.formatOnSave": true,
"editor.fontFamily": "Fira Code",
"editor.fontSize": 12,
"editor.fontLigatures": true,
@fabriziogiordano
fabriziogiordano / nuke-deps.sh
Created February 6, 2018 03:53 — forked from eldorplus/nuke-deps.sh
Script to clean watchman, remove node_modules, clean cache and restart packager for React Native troubleshooting.
#!/bin/bash
# Stop cached listeners
watchman watch-del-all
# Remove installed modules
rm -rf node_modules
# Remove yarn meta files
rm yarn*
Number.prototype[Symbol.iterator] = function*() {
for (let i = 0; i <= this; i++) {
yield i;
}
};