Skip to content

Instantly share code, notes, and snippets.

View lifeart's full-sized avatar
🐹
Working from home

Alex Kanunnikov lifeart

🐹
Working from home
View GitHub Profile
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active April 24, 2024 18:36
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@Rich-Harris
Rich-Harris / service-workers.md
Last active April 21, 2024 16:24
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@michiel
michiel / cors-nginx.conf
Created July 5, 2011 10:41
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@JamesMessinger
JamesMessinger / IndexedDB101.js
Last active April 4, 2024 02:00
Very Simple IndexedDB Example
// 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;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@spajak
spajak / mpeg2mkv-steps.ps1
Last active February 29, 2024 20:35
Convert/rip DVD to MKV. Encode to MPEG-4 & merge into MKV - all without GUI, only command line tools
# My steps to:
# Convert DVD Video to MPEG-4 in MKV without GUI, using only CLI (Command Line Interface) tools.
# No need for MeGUI, Avisynth, Handbrake etc..
# ------------------------------------------------------------------------------
# Tools needed: `mediainfo`, `ffmpeg` & `ffprobe`, `x264`, `mkvmerge`, `mplayer` (optional).
# Google for them. Use latest versions. Windows tip: avoid Cygwin and get
# the official builds, x64, when possible.
# Before start use `mediainfo` & `ffprobe` and note down informations about the source material:
@listochkin
listochkin / ember.js-videos.md
Last active January 12, 2024 14:32
Ember.js Video Collection
  1. Официальные видео:
  2. Toran Billups записал очень хорошие базовые видео:
  3. Архитектура:
@pzuraq
pzuraq / autotracking.js
Last active December 13, 2023 22:57
Autotracking Simplified
// The global revision clock. Every time state changes, the clock increments.
let $REVISION = 0;
// The current dependency tracker. Whenever we compute a cache, we create a Set
// to track any dependencies that are used while computing. If no cache is
// computing, then the tracker is null.
let CURRENT_TRACKER = null;
// Storage represents a root value in the system - the actual state of our app.
class Storage {
@goncalossilva
goncalossilva / gifenc.sh
Last active December 12, 2023 22:31
Encode mp4, webm and gif using ffmpeg (2.6 or above). Audio is discarded on all of these!
#!/bin/sh
# sh gifenc.sh input.mp4 output.gif
# Optionally accepts width / height (one or both).
palette="/tmp/palette.png"
filters="fps=15"
if [ -n "$3" ]; then
if [ -n "$4" ]; then
filters="$filters,scale=$3:$4"
@maxfierke
maxfierke / cancelable-fetch.js
Last active April 21, 2022 18:15
cancelableFetch Yieldable ember-concurrency
import { Yieldable } from 'ember-concurrency';
import fetch from 'fetch'; // i.e. ember-fetch. could also use native fetch too.
class FetchYieldable extends Yieldable {
constructor(url, opts = {}) {
super(...arguments);
this.url = url;
this.opts = opts;
}