Skip to content

Instantly share code, notes, and snippets.

@MadaShindeInai
MadaShindeInai / tRPCLearningPath.md
Last active September 6, 2023 12:14
tRPC: from journeyman to master

tRPC: from journeyman to master

What it tRPC?

tPRC is a way for the server and the client to interop and share data and type definitions. Was written to make the relationship between the client and the server as simple as possible similar to graphql. Screenshot 2023-09-06 at 14 13 46

The path to understanding tRPC (with T3 template in my case):

  1. tRPC intro: https://youtu.be/2LYM8gf184U
  2. tRPC overview: https://nehalist.io/trpc-review/
  3. Create T3 app and try to implement some basic stuff with CSL, SSR and SSG using tRPC react-query, gssp,
@disintegrator
disintegrator / GatsbyContentfulWithReadingTime.graphql
Last active June 19, 2022 13:43
Add a reading time estimate to all your Contentful rich text nodes in GatsbyJS
{
contentfulBlogPost {
body {
fields {
readingTime {
text
minutes
time
words
}
@kieran23101
kieran23101 / Change pane names of modules.sql
Last active September 6, 2018 10:57
This will search through all modules and move all the modules in one pane to the other useful for when a pane name is changed on a large website (USE FOR DNN) Tested on DNN 7
SELECT PaneName FROM dbo.TabModules
UPDATE dbo.TabModules
SET PaneName = 'NewPaneName'
WHERE PaneName = 'OldPaneName'
-- Update Using Module Title
SELECT PaneName FROM dbo.TabModules
UPDATE dbo.TabModules
SET PaneName = 'New pane name'
WHERE 'Module Title' = 'Your Title'
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active April 12, 2024 08:49
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.5.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
/*
// ########################################################################## */
// New cheat sheet for Bootstrap 5:
@bdukes
bdukes / NoDefaultCss.ascx
Created April 11, 2016 21:11
Replace or Remove DNN's Default CSS
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
<dnn:DnnCssExclude runat="server" Name="dnndefault" />
@learncodeacademy
learncodeacademy / webpack.config.js
Created January 8, 2016 03:55
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@eteeselink
eteeselink / delay.js
Created November 13, 2015 13:55
ES7 async/await version of setTimeout
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
async function something() {
console.log("this might take some time....");
await delay(5000);
console.log("done!")
}
something();