Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://developer.chrome.com/multidevice/android/customtabs |
Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.
Like this? Check React Native vs Flutter: https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff98684979
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WAIT! Do consider that `wait` may not be needed. This article describes | |
# that reasoning. Please read it and make informed decisions. | |
# https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/ | |
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations? | |
describe 'Modal' do | |
should 'display login errors' do | |
visit root_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use client' | |
import React, { useRef, useState, useEffect } from 'react'; | |
import { useWavesurfer } from '@wavesurfer/react'; | |
import * as Tone from 'tone'; | |
export default function Page() { | |
const containerRef = useRef<HTMLDivElement>(null); | |
const audioRef = useRef<HTMLAudioElement | null>(null); | |
const [playing, setPlaying] = useState(false); | |
const pitchShift = useRef<Tone.PitchShift | null>(null); |
Demo.mp4
Inspired by Shiki Magic Move
This code uses Google's diff-match-patch library to animate code transformations in Manim.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /a counter=0 | |
for %%f in (*.jpg) do ( | |
C:\libwebp\bin\cwebp.exe -q 80 %%f -o %%~nf.webp | |
set /A counter=counter+1 | |
) | |
echo ************************************ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://habr.com/post/213515/ | |
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB, | |
IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBTransaction, | |
baseName = "baseName", | |
storeName = "storeName"; | |
function logerr(err){ | |
console.log(err); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This process can be used to export a huge DB table. I've used it to export a 24GB table, | |
## containing 146 million records, into chunks of 25 million records, each chunk taking up aprox 500mb each. | |
## | |
## Of course, USERNAME, DATABASENAME and TABLENAME need to be replaced with actual values. | |
## First thing when it's run, it'll ask for that user's password. | |
## | |
## COMMAND BREAKDOWN: | |
## mysqldump - u [username] -p [databasename] [tablename] | |
## --no-create-info # don't include CREATE and DROP statements in the dump | |
## --where="" # filter the dumped rows |
NewerOlder