Skip to content

Instantly share code, notes, and snippets.

View pntrivedy's full-sized avatar
🏠
Probably managing theitoons.com

Prerak Trivedi pntrivedy

🏠
Probably managing theitoons.com
View GitHub Profile
@pntrivedy
pntrivedy / app.js
Last active April 8, 2016 07:37
Angular js state authentication
//config.js
for every state you want to check if user has logged in or not set requireLogin to true.
...,
data : {
requireLogin : true
},
.....
@pntrivedy
pntrivedy / app.coffee
Last active April 28, 2016 17:19
Framerjs screen switch function
#source : https://github.com/ServusJon/PrototypeWithFramerjs
screenSwitch = (current,next) ->
next.animate
properties:
x: 0
curve: "ease-out"
time: 0.15
animationHideScreen = new Animation
layer: current
properties:
@pntrivedy
pntrivedy / gist:9444f790f85d1bb10269271630b66880
Last active December 20, 2016 14:31 — forked from zxcvbnm4709/gist:2656197
include jQuery in Chrome Console
var script = document.createElement("script");
script.setAttribute("src", "//code.jquery.com/jquery-latest.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@pntrivedy
pntrivedy / meta-tags.md
Created February 27, 2017 19:54 — forked from whitingx/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@pntrivedy
pntrivedy / json
Created April 18, 2017 16:16
Chrome extension manifest.json
{
// Required
"manifest_version": 2,
"name": "My Extension",
"version": "versionString",
// Recommended
"default_locale": "en",
"description": "A plain text description",
"icons": {...},
@pntrivedy
pntrivedy / fetchDataWithDate.tsx
Created November 4, 2023 11:41
Get data from supabase from current date to specific days, weeks, months in future.
import supbase, dayjs and apiService
function
----
const result = await apiService.fetchDataWithDate("TABLE NAME", {
field: "d", // options: d for days, w for week, M for month
value: 7, // number value. Given example will fetch rows within 7 days from current date
});
----
@pntrivedy
pntrivedy / filament-badge-color.md
Last active August 5, 2024 11:46
filament badge colors
label('Type')->searchable()->sortable() ->badge() ->color(function (string $state): string { return match ($state) { 'credit' => 'warning', // value => color-name }; })