Skip to content

Instantly share code, notes, and snippets.

View hlecuanda's full-sized 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
@hlecuanda
hlecuanda / random-int
Created December 20, 2022 18:45
Get a random integer
#!/usr/bin/env python3
""" Prints a random integer to stdout
Usage:
random-int [NUMBER]
where NUMBER is any real number in the valid range for
int() or real() in python
Returns:
@hlecuanda
hlecuanda / ffmpegtips.txt
Created October 23, 2022 18:45 — forked from rabssm/ffmpegtips.txt
ffmpeg tips
# 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
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 April 28, 2022 20:46
A bookmarklet to download all images on a page, using the FileSystem API
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 October 20, 2020 21:33
Python Requests Rapidamente.ipynb
Loading
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 November 28, 2019 02:30 — forked from moneal/firebase_pre-request_script.js
Postman pre-request script to create a Firebase authentication JWT header.
/**
* 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 October 28, 2019 01:06
prezto-container control zsh function
#!/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 April 2, 2019 22:25 — forked from rdinse/Google_Colaboratory_backup.py
Simple Google Drive backup script with automatic authentication for Google Colaboratory (Python 3)
# 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 March 20, 2019 05:26
Explorando el Sistema con Python 3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hlecuanda
hlecuanda / pypi.md
Created August 18, 2018 12:29 — forked from alex/pypi.md

Most downloaded projects

SELECT
  file.project,
  COUNT(*) as total_downloads,
FROM
  TABLE_DATE_RANGE(
    [the-psf:pypi.downloads],
    TIMESTAMP("20160114"),