Skip to content

Instantly share code, notes, and snippets.

@shriharip
shriharip / index.html
Created April 24, 2024 15:27
tailwind responsive nav (https://langcss.com/demo)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Nav</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
function toggleNavbar(collapseID) {
@shriharip
shriharip / index.js
Created September 13, 2023 16:29
Uppy companion example
const fs = require('node:fs')
const path = require('node:path')
const crypto = require('node:crypto')
const companion = require('@uppy/companion')
require('dotenv').config({ path: path.join(__dirname, '.env') })
const app = require('express')()
const DATA_DIR = path.join(__dirname, 'tmp')
@shriharip
shriharip / schema.prisma
Created August 29, 2023 16:46
wordpress db in prisma schema
datasource db {
provider = "mysql"
url = "mysql://exampleuser:examplepass@localhost:2234/exampledb"
}
model WpComment {
comment_ID Int @id
commentAgent String @map("comment_agent")
commentApproved String @map("comment_approved")
commentAuthorEmail String @map("comment_author_email")
@shriharip
shriharip / main.dart
Created November 17, 2021 13:06
listview flutter with out rebuilding the complete list (with null safety)
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
@shriharip
shriharip / config.h
Created February 12, 2021 18:59
dactyl manuform config
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
@shriharip
shriharip / keymap.c
Created February 12, 2021 18:55
dactyl manuform keymap
#include QMK_KEYBOARD_H
#define _BASE 0
#define _RAISE 1
#define _LOWER 2
#define _SHORTC 3
// Fillers to make layering more clear
@shriharip
shriharip / helloworld.md
Last active February 6, 2021 11:24
testing gist.io

Hi, this is a test to see how gist.io works

Hello World!

Writing in markdown is nice!

@shriharip
shriharip / firebase_env.txt
Last active October 16, 2020 06:57
Firebase environment set with json data
firebase functions:config:set env="$(cat env.json)"
firebase functions:config:unset env && firebase functions:config:set env="$(cat env.json)"
example env.json
{
"web": {
"id": "value",
@shriharip
shriharip / mainFiles.md
Created January 8, 2020 12:10
Flutter issue: Blank Screen.

main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:path_provider/path_provider.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'minlandsby.dart';
import 'package:hive/hive.dart';

void main() async {