Skip to content

Instantly share code, notes, and snippets.

View rlingineni's full-sized avatar
💭
building cool stuff

Raviteja Lingineni rlingineni

💭
building cool stuff
View GitHub Profile
@rlingineni
rlingineni / cavasHelper.ts
Created February 4, 2020 02:10
Aligning Guidelines with Fabric.js + Typescript. This is a modifed version of the code here: https://github.com/fabricjs/fabric.js/blob/master/lib/aligning_guidelines.js
import { fabric } from "fabric";
import { ILineOptions } from "fabric/fabric-impl";
/**
* Should objects be aligned by a bounding box?
* [Bug] Scaled objects sometimes can not be aligned by edges
*
*/
@rlingineni
rlingineni / cleaner.js
Last active December 20, 2021 12:48
Converts flat html files into a directory structure with index.html
/**
* Converts a flat file structure like:
* about.html, features.html, blog.html
* into
* features/index.html, about/index.html, blog/index.html
* Usage: node cleaner.js or node cleaner.js watch
*/
const fs = require("fs")
@rlingineni
rlingineni / index.js
Last active May 15, 2021 21:43
Signed Cookie Auth in AWS Lambda
"use strict";
const AWS = require('aws-sdk');
const serverless = require('serverless-http');
const Koa = require('koa');
const Router = require('koa-router');
const crypto = require('crypto');
const bodyParser = require('koa-bodyparser');
const fs = require("fs");
const app = new Koa();
@rlingineni
rlingineni / SketchSystems.spec
Created March 16, 2021 20:26
User Flow Purchase a Product
User Flow Purchase a Product
Search for Product
Select Item -> View Product Description
View Product Description
Checkout Form -> Validate Card Details
Validate Card Details
Card valid -> Complete Checkout
Card invalid -> Invalid Details
Valid Details
Card valid -> Complete Checkout
@rlingineni
rlingineni / SketchSystems.spec
Last active March 3, 2021 22:53
Abandoned Cart
Abandoned Cart
Items in Cart
Leave Website -> Cart Abandoned
Cart Abandoned
Click Email Link -> Items in Cart
After 14 Days -> Cart Expired
Cart Expired
@rlingineni
rlingineni / SketchSystems.spec
Last active March 3, 2021 18:44
User Funnel
User Funnel
Visit Website
Click Download -> Download App
Register Email -> Email Download Link
Email Download Link
Click Link -> Download App
Download App
Click Pro Mode -> Expert Screen
Expert Screen
Cancel -> Download App
@rlingineni
rlingineni / SketchSystems.spec
Created March 2, 2021 08:13
Appointment Booking
Appointment Booking
Visit Appointment Page
patient requests appointment -> Admin Calls Patient
Admin Calls Patient
Schedule Time -> Appointment Scheduled
Cancel Request -> Appointment Cancelled
Appointment Scheduled
Appointment Cancelled
@rlingineni
rlingineni / SketchSystems.spec
Last active March 1, 2021 04:59
Register User
Register User
Visit Website
Create Account -> Send Confirm Email
Login with Oauth -> Welcome Screen
Send Confirm Email
Click Link -> Welcome Screen
Welcome Screen
@rlingineni
rlingineni / react-trello-index.d.ts
Created August 2, 2020 04:25
Typings for React Trello
declare class ReactTrelloBoard<CardMetaData> extends React.Component<
ReactTrello.BoardProps<CardMetaData>
> {}
declare module ReactTrello {
/**
* react-trello uses `React.cloneElement`, so these props
* will have to be added to `defaultProps`, otherwise
* TypeScript will (understandably) freak out.
*/
@rlingineni
rlingineni / gist:54f16329ecb5206ad3bf769a762deb42
Created December 21, 2016 21:45
Hashtag Detection Xamarin.Forms
void Handle_MessageChanged(object sender, TextChangedEventArgs e)
{
Editor editor = sender as Editor;
string val = editor.Text; //Get Current Text
if (val.Length > 140)//If it is more than your character restriction
{
val = val.Remove(val.Length - 1);// Remove Last character
editor.Text = val; //Set the Old value
}