Skip to content

Instantly share code, notes, and snippets.

@DaveCS1
DaveCS1 / record.html
Created November 20, 2023 00:13
Record Screen with WebRTC
<!DOCTYPE html>
<html>
<head>
<title>Screen Recording with WebRTC</title>
</head>
<body>
<h1>Screen Recording Example</h1>
<button id="startBtn">Start Recording</button>
<button id="stopBtn" disabled>Stop Recording</button>
<button id="downloadBtn" disabled>Download Video</button>
@DaveCS1
DaveCS1 / ffmpeg-mp4-to-animated-webp.md
Created December 18, 2021 06:58 — forked from witmin/ffmpeg-mp4-to-animated-webp.md
Convert MP4 file to animated WebP in ffmpeg

Convert MP4 file to animated WEBP file in ffmpeg CLI

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

brew install ffmpeg

Validate the installation:

using System;
using System.IO;
using System.Threading.Tasks;
using System.Net.Http;
namespace Example
{
public interface IImageDownloader
{
Task DownloadImageAsync(string directoryPath, string fileName, Uri uri);
{
"title": "Takeout API",
"discoveryVersion": "v1",
"ownerName": "Google",
"version_module": true,
"resources": {
"exports": {
"methods": {
"get": {
"flatPath": "v2/{service}/exports/{exportId}",
@DaveCS1
DaveCS1 / Network.cs
Created April 24, 2020 22:51
Provides access to various networking information.
#region License
// -----------------------------------------------------------------------------------------------------------
//
// File: Network.cs
//
// Copyright (c) 2019 - 2019 VisualPlus <https://darkbyte7.github.io/VisualPlus/>
// All Rights Reserved.
//
// -------------------------------------------------------------------------------------------------------------
@DaveCS1
DaveCS1 / phone_extract.txt
Created March 15, 2020 11:29 — forked from maguay/phone_extract.txt
Regex to find phone phone numbers in all standard and international formats
(?:(?:\+?([1-9]|[0-9][0-9]|[0-9][0-9][0-9])\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([0-9][1-9]|[0-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?
/a tweaked version of the second regex in the question here to allow for all country codes and leading zeros in area codes: https://stackoverflow.com/questions/3868753/find-phone-numbers-in-python-script
@DaveCS1
DaveCS1 / city_names.txt
Created March 13, 2020 19:16 — forked from norcal82/city_names.txt
plain text of major us city names
//http://jordonmeyer.com/text-list-of-us-cities/
Aberdeen
Abilene
Akron
Albany
Albuquerque
Alexandria
Allentown
Amarillo
@DaveCS1
DaveCS1 / YoutubeClientExtensions.cs
Created December 3, 2019 22:48 — forked from Themodem/YoutubeClientExtensions.cs
Extension for YoutubeExplode to get the first page of channel playlists in a pretty horrific way
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using YoutubeExplode;
using YoutubeExplode.Models;
@DaveCS1
DaveCS1 / gist:4eca50d50ba87693d4867465e53833f6
Last active May 5, 2019 21:46
py scratchpad for weekend simple test - not intended for public use
https://stackoverflow.com/questions/3042757/downloading-a-picture-via-urllib-and-python
This gist: use https://docs.python.org/2/library/urllib.html
import urllib
urllib.urlretrieve("http://www.gunnerkrigg.com//comics/00000001.jpg", "00000001.jpg")