Skip to content

Instantly share code, notes, and snippets.

@Kiran-B
Kiran-B / detect-js-framework.js
Created July 27, 2020 04:19 — forked from rambabusaravanan/detect-js-framework.js
Detect JS Framework used in a Website
// Pase these lines into website's console ( Ctrl/Cmd + Shift + I )
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]'))
console.log('React.js');
if(!!window.angular ||
!!document.querySelector('.ng-binding, [ng-app], [data-ng-app], [ng-controller], [data-ng-controller], [ng-repeat], [data-ng-repeat]') ||
!!document.querySelector('script[src*="angular.js"], script[src*="angular.min.js"]'))
console.log('Angular.js');
@Kiran-B
Kiran-B / install_nodejs_and_yarn_homebrew.md
Created July 24, 2020 07:03 — forked from nijicha/install_nodejs_and_yarn_homebrew.md
Install NVM, Node.js, Yarn via Homebrew
# Script to download all the WWDC 2020 session videos in the 1080p resolution.
# You may have to update ffmpeg before using this script. I needed version 4.3 or higher to successfully download the videos.
#
# On a Mac,
# Install brew (https://brew.sh)
# brew install ffmpeg
#
# If you want the lower bitrate audio, do a find/replace of "audio_english_192" with "audio_english_64"
# If you want higher/lower bitrate/resolution video, do a find/replace of "hvc_1080p_5800" with any of the following:
# "hvc_2160p_11600"
# Script to download all the WWDC 2020 session videos in the 1080p resolution.
# You may have to update ffmpeg before using this script. I needed version 4.3 or higher to successfully download the videos.
#
# On a Mac,
# Install brew (https://brew.sh)
# brew install ffmpeg
#
# If you want the lower bitrate audio, do a find/replace of "audio_english_192" with "audio_english_64"
# If you want higher/lower bitrate/resolution video, do a find/replace of "hvc_1080p_5800" with any of the following:
# "hvc_2160p_11600"
@Kiran-B
Kiran-B / DeveloperColorPicker.colorPicker-macOS-Catalina.md
Last active February 17, 2024 10:56
Making Panic's Developer ColorPicker (DeveloperColorPicker.colorPicker) work in macOS BigSur & macOS Catalina

Context

Panic's Developer ColorPicker (v1.5.4) does not work in macOS Catalina or macOS BigSur. This is due to enforcement of code-signing. Until Panic releases a newer version that supports Catalina/BigSur, below is the workaround.

Prerequisite

You need a Developer Account. This could be a free account. Refer: https://9to5mac.com/2016/03/27/how-to-create-free-apple-developer-account-sideload-apps/

Get the latest version of developer-color-picker

https://panic.com/blog/developer-color-picker-1-5/

@Kiran-B
Kiran-B / gist:e1344c8d3023925297982c797e03047c
Created March 19, 2019 12:47
skopeo inspect docker://quay.io/coreos/etcd:v3.2.22
{
"Name": "quay.io/coreos/etcd",
"Tag": "v3.2.22",
"Digest": "sha256:43fbc8a457aa0cb887da63d74a48659e13947cb74b96a53ba8f47abb6172a948",
"RepoTags": [
"3.1",
"3.2",
"latest",
"test",
"v0.4.6",

The Angular Service Worker

What is a service worker?

A service worker is a special script which runs in the background in the browser and manages network requests to a given origin. It's originally installed by an app and stays resident on the user's machine/device. It's activated by the browser when a page from its origin is loaded, and has the option to respond to HTTP requests during the page loading, including the initial navigation request (for /index.html). This makes service workers very useful for true offline support in applications.

Additionally, service workers are the client-side endpoint for push notifications on the web.

Features