Skip to content

Instantly share code, notes, and snippets.

View abhiomkar's full-sized avatar

Abhinay Omkar abhiomkar

View GitHub Profile
@abhiomkar
abhiomkar / .env.local
Created April 27, 2024 06:44
Vertex AI + Vercel (Use Gemini AI on Next.js App Router)
// Base64 encoded string used for "Application Default Credentials".
// Alternative to GOOGLE_APPLICATION_CREDENTIALS env which accepts JSON file path.
//
// Use following command to generate base64 encoded string for given json file.
// $ openssl base64 < ~/Downloads/gcloud-service-key.json | tr -d '\n'
//
GOOGLE_SERVICE_KEY="<base64_encoded_json_file>"
@abhiomkar
abhiomkar / useState.js
Last active May 22, 2023 09:55
React useState hook from scratch
const React = (() => {
// {
// 'FooComponent': {
// values: [1, 'apple'],
// hookIndex: 0,
// },
// ...
// }
let hooks = {};
let componentId = "";
@abhiomkar
abhiomkar / input.scss
Created November 18, 2021 17:57
Generated by SassMeister.com.
@use 'sass:color';
@use 'sass:map';
@use 'sass:selector';
@use 'sass:list';
@use 'sass:math';
@use 'sass:string';
$css-vars: (
'--md-button-container-color',
'--md-button-label-text-color',
@abhiomkar
abhiomkar / codepen.css
Created May 5, 2021 18:36
Codepen SassMeister (Code CSS)
.css-text {
white-space: pre;
padding: 8px;
font-family: monospace;
box-sizing: border-box;
font-family: Source Code Pro, monospace;
font-size: 0.82rem;
}
@abhiomkar
abhiomkar / input.scss
Created March 19, 2021 18:22
Generated by SassMeister.com.
@use 'sass:selector';
$hover-selector: '&:hover';
$focus-selector: '&.mdc-ripple-upgraded--background-focused, &:not(.mdc-ripple-upgraded):focus';
$active-selector: '&:active:active';
@mixin focus() {
#{$focus-selector} {
@content;
}
@abhiomkar
abhiomkar / input.scss
Created March 19, 2021 18:08
Generated by SassMeister.com.
@mixin focus() {
&.mdc-ripple-upgraded--background-focused,
&:not(.mdc-ripple-upgraded):focus {
@content;
}
}
@mixin active() {
&:active:active {
@content;
@abhiomkar
abhiomkar / input.scss
Created March 15, 2021 23:23
Generated by SassMeister.com.
@use 'sass:meta';
@use 'sass:map';
// -----------------------
// _gm-sys-typescale.scss
// -----------------------
$body1-font: 'Google Sans Text';
$body1-line-height: 24px;
$body1-size: 16px;
@abhiomkar
abhiomkar / input.scss
Created March 15, 2021 23:17
Generated by SassMeister.com.
@use 'sass:meta';
@use 'sass:map';
// -----------------------
// _gm-sys-typescale.scss
// -----------------------
$body1-font: 'Google Sans Text';
$body1-line-height: 24px;
$body1-size: 16px;
@abhiomkar
abhiomkar / input.scss
Last active September 23, 2020 16:34
Generated by SassMeister.com.
.input {
outline: none;
}
.hairline {
border: 1px solid #000;
}
.hairline-input-chip {
@extend .input, .hairline;
@abhiomkar
abhiomkar / input.scss
Created September 23, 2020 16:34
Generated by SassMeister.com.
.input {
outline: none;
}
.hairline {
border: 1px solid #000;
}
.hairline-input-chip {
@extend .input, .hairline;