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 / 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 / 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 / PHP mail script basic html template
Created March 12, 2014 00:13
PHP mail script with headers and html mail template.
<?php
// multiple recipients
$to = 'aidan@example.com' . ', '; // note the comma
$to .= 'wez@example.com';
// subject
$subject = 'Birthday Reminders for August';
// message
$message = '
@pntrivedy
pntrivedy / Media Queries for Standard Devices
Created December 26, 2013 02:48
Media Queries for Standard Devices from http://css-tricks.com/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@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 / 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 / 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 / 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
},
.....
/*
Theme Name: Replace with your Theme's name.
Theme URI: Your Theme's URI
Description: A brief description.
Version: 1.0
Author: You
Author URI: Your website address.
*/