Skip to content

Instantly share code, notes, and snippets.

View jikkujose's full-sized avatar

Jikku Jose jikkujose

View GitHub Profile
@jikkujose
jikkujose / private_opera.js
Last active September 16, 2020 17:13
Apple Script JAX snippet to create an application to start Opera in private mode by default in macOS
try {
opera = Application("Opera")
privateWindow = opera.Window({ mode: "incognito" })
opera.windows.push(privateWindow)
} catch {
console.log("Error")
}
/*
@jikkujose
jikkujose / totp.rb
Created August 5, 2021 13:02
Generate TOTP codes from command line
require "rotp"
key = STDIN.tty? ? ARGV[0] : $stdin.read
if key.nil?
puts "Error: No key found in stdin or as flag"
exit
end
puts ROTP::TOTP.new(key.strip, issuer: "Unnamed Service").now
@jikkujose
jikkujose / index.html
Created November 15, 2021 06:51
Minimum PWA that satisfies Lighthouse tests
<!DOCTYPE html>
<html lang="en">
<!--
Steps to acheive perfect Lighthouse score
- [ ] Add service worker as separate file (sw.js)
- [ ] Uncomment registering of service worker (sw.js)
- [ ] Add `start_url` corresponding to where you host
- [ ] Add <link rel="canonical" href="link-to-show-up-in-search"/>
-->