Skip to content

Instantly share code, notes, and snippets.

View Plotist's full-sized avatar
:shipit:

Oleg Vodolazsky Plotist

:shipit:
View GitHub Profile
@ken-miyashita
ken-miyashita / SharedAuthStorage.ts
Created January 10, 2022 01:39
Simplified SharedAuthStorage.ts for blog
const CHROME_STORAGE_KEY_PREFIX = 'AmplifyStorage-';
/**
* Enumerate all relevant key-value items in chrome.storage.local.
* @param operator - operator to apply on items
*/
function enumerateItems(operator) {
chrome.storage.local.get(null, (items) => {
const chromeStorageKeys = Object.keys(items).filter((key) => key.startsWith(CHROME_STORAGE_KEY_PREFIX));
chrome.storage.local.get(chromeStorageKeys, (items => {
@fernandoaleman
fernandoaleman / mysql2-m1.md
Last active July 18, 2025 02:15
How to install mysql2 gem on m1 Mac

Problem

Installing mysql2 gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.

Solution

Make sure mysql-client, openssl and zstd are installed on Mac via Homebrew.

Replace mysql-client with whichever mysql package you are using

@mithicher
mithicher / alpinejs-datepicker.html
Last active September 24, 2022 15:21
Datepicker with Alpine.js and Tailwind CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>CodePen - Datepicker with TailwindCSS and AlpineJS</title>
<link
href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css"
rel="stylesheet"
/>
<script
@netsensei
netsensei / dell-xps-9380.md
Last active June 19, 2024 13:49
Installing Fedora 30/31 on Dell XPS 13 9380

Installing Fedora 30/31 on a Dell XPS 13 9380 series in dual boot mode

This guide describes how to install Fedora 30/31 next to Windows 10 on a Dell XPS 13 9380 series in dual boot.

  • Keep the stock Windows 10 installation that came with the laptop.
  • Install Fedora 30 alongside Windows on the hard disk.
  • Install GRUB as the bootloader allowing you to choose which OS to boot from.

Authored: September 2019

@hopsoft
hopsoft / action_controller_parameters.rb
Created January 19, 2018 19:04
Manually & Recursively Filter Rails Params
module ActionControllerParameters
def filtered
filter_hash self.to_unsafe_hash
end
private
def filterer
@filterer ||= ActionDispatch::Http::ParameterFilter.new(Rails.application.config.filter_parameters)
end

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@subfuzion
subfuzion / curl.md
Last active October 11, 2025 00:58
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.