Skip to content

Instantly share code, notes, and snippets.

View bharathjinka09's full-sized avatar
🏠
Working from home

JINKA RANGA BHARATH bharathjinka09

🏠
Working from home
View GitHub Profile
@bharathjinka09
bharathjinka09 / drf-api-swagger-doc.md
Created February 1, 2022 07:37 — forked from dotja/drf-api-swagger-doc.md
Django REST Framework API documentation using Swagger

API Documentation with DRF and Swagger

Overview:

  • We need to create a schema. The schema outlines all the endpoints and actions of our API.

  • We need to create the documentation that is a more human-readable form of the schema.

Steps:

@dotja
dotja / drf-api-swagger-doc.md
Last active May 4, 2024 20:22
Django REST Framework API documentation using Swagger

API Documentation with DRF and Swagger

Overview:

  • We need to create a schema. The schema outlines all the endpoints and actions of our API.

  • We need to create the documentation that is a more human-readable form of the schema.

Steps:

@bradtraversy
bradtraversy / typescript-crash.ts
Last active May 22, 2024 08:33
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
@arundhaj
arundhaj / app.py
Last active June 27, 2022 12:03
Documenting Flask REST APIs with Swagger Specification and Swagger UI
from apispec import APISpec
from apispec.ext.marshmallow import MarshmallowPlugin
from apispec_webframeworks.flask import FlaskPlugin
from flask import Flask, jsonify, render_template, send_from_directory
from marshmallow import Schema, fields
from werkzeug.utils import secure_filename
app = Flask(__name__, template_folder='swagger/templates')
@bharathjinka09
bharathjinka09 / util.js
Created May 27, 2021 04:34 — forked from gitdagray/util.js
Javascript Utility Functions
// Youtube tutorial here: https://youtu.be/LDgPTw6tePk
// These functions are designed to be exported, but you could create a class instead. See tutorial video.
// #1 proper case
export const properCase = (string) => {
return `${string[0].toUpperCase()}${string.slice(1).toLowerCase()}`;
};
@gitdagray
gitdagray / util.js
Last active February 8, 2024 14:15
Javascript Utility Functions
// Youtube tutorial here: https://youtu.be/LDgPTw6tePk
// These functions are designed to be exported, but you could create a class instead. See tutorial video.
// #1 proper case
export const properCase = (string) => {
return `${string[0].toUpperCase()}${string.slice(1).toLowerCase()}`;
};
@kentcdodds
kentcdodds / diff.js
Created April 29, 2021 17:23
A git diff for EpicReact workshops
const {spawnSync} = require('child_process')
const inquirer = require('inquirer')
const glob = require('glob')
async function go() {
const files = glob
.sync('src/+(exercise|final)/*.+(js|ts|tsx)', {
ignore: ['*.d.ts'],
})
.map(f => f.replace(/^src\//, ''))
@oliverjumpertz
oliverjumpertz / dialog.html
Created December 24, 2020 21:04
HTML native dialog
<dialog open>
<form method="dialog">
<p>Do you want to confirm your action?</p>
<div class="right">
<input class="btn" type="submit" value="Ok" />
<input class ="btn" type="submit" value="Cancel" />
</div>
</form>
</dialog>
@bharathjinka09
bharathjinka09 / index.html
Created December 19, 2020 12:54
Simple CRUD with Vue.js
<div id="app">
<h4 class="head"> Application</h4>
<div class="container">
<!-- <div class="img-container">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAA1VBMVEX///9BuIM1SV4lsncQMUxCvoU0PVtBu4Q1R10+t4E1RV05tn80QVw0Q1w0P1s0tX3x+vef2b54y6Tp9/G24s3i9OxPvozD59bb8ObP7N6s3seGz65cwpSV1Lc/oHxIvIlwyJ87e283UWI8g3I6bWs+mHlBr4E5Zmg8iXR/zalAqX84W2VZwZI+nnuc17tBsoI+kXc3VmMlO1TH09Pl7ex3jZNIZXANNU2fsLMeRFYTO1A6dG0Aq2kOIEhsgooCKkixwMHX4OA0Mlkil25adH2JnKFegISv2nx/AAAHGElEQVR4nO2ba1vUOhRGyww4FxhmRAVUUMQLCio3ARG8HfH8/590HvGAVHabld3dNpkn67M2TTMm27XfZFkikUgkEolEIpFIJBKJRCKRSCQSiUQikVCwet5F/Pg86+TrsdfQx1/dj/z8g73e+WrxOG/mZwhzL4YdJ7OHHhM8nHU/cPhiDr3d/OOSgSZd9IyZ3TvuF+qfeszwtO9+4OIue7nupGykR2P0kLnnI/cbHXzEE/x44H7c6DlbwvGj8rHYZ5rpdcBHPyn9mDeYnLif1u/04Ls5BnvIfqe9l4vuGQ6/wBl+Af+sF1+yGXYfukbbgJvNDljE2e9ogt/BNtPfgdvMhnO4e3ARt8lms4NmSD7WnW24hPfc463DRTwjm803MMFvZJs5g0u4Tj7peIAeNrPgfrHOJzDeJ/CcBfZKgzGZYHafnRi912CKBz+dw/0ES7jwmv1Gx/fRDLNltohzm2Sz+eAY7APZZjbZb3SwzCaYrcLN5h05MS4cg12Qk+Id3GZKCtI
@bradtraversy
bradtraversy / state_capitals.json
Created April 27, 2019 12:24
JSON array of states and capitals
[
{
"abbr": "AL",
"name": "Alabama",
"capital": "Montgomery",
"lat": "32.361538",
"long": "-86.279118"
},
{
"abbr": "AK",