Skip to content

Instantly share code, notes, and snippets.

@visionarylab
visionarylab / submit.md
Created June 14, 2024 05:55 — forked from tanaikech/submit.md
Resumable Download of File from Google Drive using Drive API with Python

Resumable Download of File from Google Drive using Drive API with Python

This is a sample script for achieving the resumable download of a file from Google Drive using Dive API with Python.

There might be a case in that you want to achieve the resumable download of a file from Google Drive using Dive API with Python. For example, when a large file is downloaded, the downloading might be stopped in the middle of downloading. At that time, you might want to resume the download. In this post, I would like to introduce the sample script of python.

In order to achieve the partial download from Google Drive, the property of Range: bytes=500-999 is required to be included in the request header. But, unfortunately, in the current stage, MediaIoBaseDownload cannot use this property. When MediaIoBaseDownload is used, all data is downloaded.

So, in order to achieve this goal, it is required to use a workaround. In this workaround, I proposed the following flow.

@visionarylab
visionarylab / cms
Last active June 14, 2024 06:36
cms
https://www.izoukhai.com/blog/directus-vs-strapi-full-comparison
refine.dev (directus,strapi,rest,graphql,hasura,nestjs,nextjs,remix
https://github.com/directus/directus
https://strapi.io/blog/getting-started-with-strapi-workflows-using-git
https://github.com/statamic/cms
payload 3.0 with next.js, ESM across,
https://www.youtube.com/watch?v=Z8W0BpsKybs&pp=ygUTZGlyZWN0dXMgQU5EIHN0cmFwaQ%3D%3D

Note: This is all almost full YouTube ID informations. Original owner goes to AgentOak, modified version by Martin Eesmaa.

See the credits and also special thanks in below.

Last updated: June 2024

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

@visionarylab
visionarylab / streaming-responses-200.js
Created June 4, 2024 08:16 — forked from harrishancock/streaming-responses-200.js
Cloudflare Workers streaming response bodies example with unconditional 200
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
/**
* Make multiple requests,
* aggregate the responses and
* stream it back as a single response.
*/
async function fetchAndApply(request) {
@visionarylab
visionarylab / markmission.md
Created May 21, 2024 03:03 — forked from sfinktah/markmission.md
OpenAI's idea of how to create a PWA for offline/online submission of form data

Creating a Progressive Web App (PWA) to store contact details from a form and submit them when internet access is available involves a combination of technologies like HTML, CSS, JavaScript, and service workers. Below is a simplified example of how you can achieve this:

  1. HTML Form: Create an HTML form to collect contact details. You can create an index.html file.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
@visionarylab
visionarylab / yt
Last active June 21, 2024 21:55
yt
https://github.com/egbertbouman/youtube-comment-downloader
https://github.com/SuspiciousLookingOwl/youtubei
https://github.com/nlitsme/youtube_tool
https://github.com/hridaydutta123/the-youtube-scraper
https://github.com/vel-14/YouTube-Data-Analyser
https://github.com/Steven-Herrera/youtube-comment-microservice
https://github.com/ashleve/youtube_multi_video_comment_downloader
https://github.com/ahmedshahriar/youtube-comment-scraper
https://github.com/MoFahad2921/YouTubeEXT
@visionarylab
visionarylab / history+virtual list
Last active June 5, 2024 05:36
history+virtual list
https://josephvoss.com/post/git-remote-s3/
Inngest, (Paid )koyeb(support pulumi,terraform, docker), remix,next.js,astro,svelte,nuxt
DronaHQ, Appsmith, openblocks.dev,illacloud.com
makerkit, supastarter boilerplate budibase, appwrite,
https://marmelab.com/react-admin/NextJs.html, sanity refinedataprovier
https://idx.dev/#introduction
https://javascriptpatterns.vercel.app/patterns/react-patterns/provider-pattern
Nextjs PWA referrer
https://github.com/mvllow/next-pwa-template?tab=readme-ov-file#use-only-what-you-need
@visionarylab
visionarylab / shopify
Last active June 18, 2024 07:24
shopify
https://thehackernews.com/2024/04/showcasing-networkless-identity-attacks.html
https://www.reddit.com/r/UCengage/comments/1cauvbt/phenex_nt_version_and_jona_basta_overview_and/
https://docs.google.com/document/d/1nGGYdvX1FJ50P21QErAX22hhLoz6SzrOqImjormUtMA/edit#heading=h.uax6gqfudgou
https://developers.reloadly.com/airtime/quickstart
n8n
https://docs.skyvia.com/
https://github.com/anandrmedia/heroku-free-alternatives?tab=readme-ov-file
https://medium.com/@muhammadismaildev/integrating-google-one-tap-into-webflow-and-auth0-a-guide-e9ec3fccd4ad
Google identity Services' token model or
https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow#obtainingaccesstokens
refresh token
https://docs.netbird.io/selfhosted/identity-providers
https://supabase.com/docs/guides/auth/social-login/auth-google
@visionarylab
visionarylab / UWPC#
Last active February 15, 2024 01:48
C# UWP
Either use Microsoft.Windows.CsWin32 or Professional SharpHook, or super minimal A few windows niceties
https://github.com/Tum4ik/just-clipboard-manager/blob/6a6ea792ceea2e561f90a7a67b18a2d435c78b82/Tum4ik.JustClipboardManager/Services/KeyboardHookService.cs#L8
https://learn.microsoft.com/en-us/windows/uwp/launch-resume/launch-app-with-uri
##
await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-gamebar:activate/WidgetAdvSampleCS_8wekyb3d8bbwe_App_Widget2/?var=valuesssz"));
####1.0 Optimize
https://mzikmund.dev/blog/uwp-application-settings-performance