Skip to content

Instantly share code, notes, and snippets.

View jerkovicl's full-sized avatar

Luka Jerković jerkovicl

View GitHub Profile
@timheuer
timheuer / profiles.json
Created May 21, 2019 20:44
custom-scheme
{
"name": "TimCustom",
"foreground": "#EEEEEC",
"background": "#555753",
"black": "#555753",
"red": "#3465A4",
"green": "#4E9A06",
"yellow": "#C4A000",
"blue": "#3465A4",
"purple": "#75507B",
@ow
ow / Chromium flags for PWAs.md
Last active January 27, 2021 23:42
Chromium flags for PWAs

Upcoming flags to enable link capturing and other PWA features. Enable these flags by copying and pasting the following, then searching for the below chrome://flags/

Enable full desktop integration:
chrome://flags/#enable-desktop-pwas

Capture URLs in their scope, such as twitter URLs for the Twitter PWA:
chrome://flags/#enable-desktop-pwas-link-capturing chrome://flags/#enable-desktop-pwas-stay-in-window

Get a pop-up that offers to allow the PWA to open certain URLs:

@frenck
frenck / pow.yaml
Created January 22, 2019 22:35
Sonoff POW R2 Washing Machine Sensor Example
esphomeyaml:
name: pow
platform: ESP8266
board: esp01_1m
board_flash_mode: dout
wifi:
ssid: 'Demo'
password: 'Livestream'
@darrenmothersele
darrenmothersele / docker.sh
Created December 2, 2018 11:49
Serving Angular CLI project over HTTPS / generate SSL cert / configure Angular CLI / optionally use NGINX via Docker
#!/bin/bash
docker run --name fc \
-v $PWD/ssl:/etc/nginx/certs \
-v $PWD/ssl/nginx-default.conf:/etc/nginx/conf.d/default.conf:ro \
-v $PWD/dist/___PROJECT_NAME___:/usr/share/nginx/html:ro -p 8080:443 -d nginx
function changeInput(inputName, value) {
ng.probe($0).componentInstance[inputName] = value;
ng.probe($0).injector.get(ng.coreTokens.ApplicationRef).tick();
}
function subscribeOutput(outputName, cb) {
const subscription = ng.probe($0).componentInstance[outputName].subscribe((value) => {
console.log(`${outputName} => ${value}`);
});
@james-jhang
james-jhang / ffmpeg_screen_vidoe.md
Last active February 12, 2024 15:03
Record screen by ffmpeg.

Record Chrome screen by ffmpeg.

Commands

The command below can record screen video by ffmpeg on Windows.

ffmpeg -y -rtbufsize 100M -f gdigrab -framerate 30 -probesize 10M -draw_mouse 1 -i title="Task Manager" -c:v libx264 -r 30 -preset ultrafast -tune zerolatency -crf 25 -pix_fmt yuv420p "video output.mp4"
@vdbelt
vdbelt / cloudflare-purge-cache-service-worker.js
Created August 21, 2018 11:43
A CloudFlare service worker that proxies purge cache requests. Example: https://example.com/__purge_cache?zone=XX
addEventListener('fetch', event => {
event.respondWith(purgeCache(event.request))
})
async function purgeCache(request) {
const url = new URL(request.url)

Time Travel Debugging

Time Travel refers to the ability to record a tab and later replay it ([WebReplay][wrr]). The technology is useful for local development, where you might want to:

  • pause and step forwards or backwards
  • pause and rewind to a prior state
  • rewind to the time a console message was logged
  • rewind to the time an element had a certain style or layout
  • rewind to the time a network asset loaded
@thocell
thocell / Video_Audio_Downloader.js
Last active February 4, 2024 05:35
The Tampermonkey userscript to download video and audio from Youtube, Twitter, Vimeo, Facebook, Dailymotion, 1tv, VK, youku, bilibili and 5000 more sites for free. Fast and easy to use.
// ==UserScript==
// @name Distill Video & Audio Downloader from 5000+ sites including Youtube, Support 1080P, 2K, 4k & 8K
// @namespace https://distillvideo.com/
// @version 2.1.1
// @date 2018-06-17
// @description Browser extension to download video and audio from Youtube, Twitter, Vimeo, Facebook, Dailymotion, 1tv, VK, youku, bilibili and 5000 more sites for free. Fast and easy to use.
// @author DistillVideo.com
// @copyright 2018, DistillVideo.com
// @homepage https://distillvideo.com/page/extensions
// @downloadURL https://distillvideo.com/js/ditillvideo.user.js
@joaomoreno
joaomoreno / README.md
Last active February 1, 2024 22:19
VS Code Insiders Updater for Linux

VS Code Insiders Updater for Linux

This script will download and replace ~/Applications/VSCode-linux-x64 with the latest VS Code Insiders.

gif

Install

  1. Install jq: https://stedolan.github.io/jq/download/
  2. Place update-code somewhere in your PATH