Skip to content

Instantly share code, notes, and snippets.

Avatar
😡
Mirroring gitlab on ActiveGithub.NET 2019 Ultimate Enterprise EULA Live

H-Lo hlecuanda

😡
Mirroring gitlab on ActiveGithub.NET 2019 Ultimate Enterprise EULA Live
View GitHub Profile
View ffmpegtips.txt
# Interpolate video frames for a higher frame rate
ffmpeg -i source.mp4 -filter:v minterpolate -r 25 result.mp4
ffmpeg -i source.mp4 -vf minterpolate=50,tblend=all_mode=average,framestep=2 result.mp4
# Crop a video to the bottom right quarter
ffmpeg -i in.mp4 -filter:v "crop=in_w/2:in_h/2:in_w/2:in_h/2" -c:a copy out.mp4
# Resize a video to half size
ffmpeg -i input.mkv -filter_complex "scale=in_w/2:in_h/2" output.mkv
View Late-show-fiona-hill-stephen-colbert-20220303.vtt
WEBVTT
Kind: captions
Language: es
00:00:05.871 --> 00:00:07.673 align:start position:0% line:91%
<i> ( APLAUSOS )</i>
&gt;&gt; Stephen: HOLA A TODOS,
00:00:07.706 --> 00:00:11.244 line:85%
BIENVENIDOS DE NUEVO A "THE LATE SHOW".
@hlecuanda
hlecuanda / downloa-all-images-bookmarklet.js
Last active Apr 28, 2022
A bookmarklet to download all images on a page, using the FileSystem API
View downloa-all-images-bookmarklet.js
javascript:(function(){
const run = async () => {
const dirHandle = await window.showDirectoryPicker();
const imgs = document.querySelectorAll("img");
let i = 0;
imgs.forEach(async (img) => {
const url = img.src;
const name = `img-${i}.png`;
@hlecuanda
hlecuanda / python-requests-rapidamente.ipynb
Created Oct 20, 2020
Python Requests Rapidamente.ipynb
View python-requests-rapidamente.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hlecuanda
hlecuanda / firebase_pre-request_script.js
Created Nov 28, 2019 — forked from moneal/firebase_pre-request_script.js
Postman pre-request script to create a Firebase authentication JWT header.
View firebase_pre-request_script.js
/**
* This script expects the global variables 'refresh_token' and 'firebase_api_key' to be set. 'firebase_api_key' can be found
* in the Firebase console under project settings then 'Web API Key'.
* 'refresh_token' as to be gathered from watching the network requests to https://securetoken.googleapis.com/v1/token from
* your Firebase app, look for the formdata values
*
* If all the data is found it makes a request to get a new token and sets a 'auth_jwt' environment variable and updates the
* global 'refresh_token'.
*
* Requests that need authentication should have a header with a key of 'Authentication' and value of '{{auth_jwt}}'
@hlecuanda
hlecuanda / prezto-container.zsh
Last active Oct 28, 2019
prezto-container control zsh function
View prezto-container.zsh
#!/usr/bin/env zsh
local opts withvals
zmodload zsh/zutil || { <<< 'Requires zsh/zutil module to be available'; false; return }
[ -z $commands[docker] ] && { <<< 'Requires Docker'; false; return }
zparseopts -D -E -M -a opts -A withvals - \
h=hlp -help=h \
i: -image=i \
@hlecuanda
hlecuanda / Google_Colaboratory_backup.py
Created Apr 2, 2019 — forked from rdinse/Google_Colaboratory_backup.py
Simple Google Drive backup script with automatic authentication for Google Colaboratory (Python 3)
View Google_Colaboratory_backup.py
# Simple Google Drive backup script with automatic authentication
# for Google Colaboratory (Python 3)
# Instructions:
# 1. Run this cell and authenticate via the link and text box.
# 2. Copy the JSON output below this cell into the `mycreds_file_contents`
# variable. Authentication will occur automatically from now on.
# 3. Create a new folder in Google Drive and copy the ID of this folder
# from the URL bar to the `folder_id` variable.
# 4. Specify the directory to be backed up in `dir_to_backup`.
@hlecuanda
hlecuanda / explorando-el-sistema-con-python-3.ipynb
Last active Mar 20, 2019
Explorando el Sistema con Python 3
View explorando-el-sistema-con-python-3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pypi.md

Most downloaded projects

SELECT
  file.project,
  COUNT(*) as total_downloads,
FROM
  TABLE_DATE_RANGE(
    [the-psf:pypi.downloads],
    TIMESTAMP("20160114"),
@hlecuanda
hlecuanda / Cached-leftpad-custom-function.gs
Created May 31, 2018
Cached custom function for G Suite / Google Sheets in Apps Script
View Cached-leftpad-custom-function.gs
kch = CacheService.getDocumentCache(); // set up the cache service as a global object
function lp(num){
return ("0000" + num).slice(-2) // elegant
Utilities.sleep(500);
}
/**
* A function to left pad an integert with 0 if less than two digits