Skip to content

Instantly share code, notes, and snippets.

View dineshsonachalam's full-sized avatar
👋

Dinesh Sonachalam dineshsonachalam

👋
View GitHub Profile
@dineshsonachalam
dineshsonachalam / image_tagging_system.sql
Last active November 25, 2021 17:27
image_tagging_system.sql
CREATE TABLE IF NOT EXISTS app_user (
user_id SERIAL PRIMARY KEY,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL
);
CREATE TABLE IF NOT EXISTS image (
image_id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
created_by INT NOT NULL references app_user(user_id)
);
from flask import Flask
from flask import Response
import requests
app = Flask(__name__, static_url_path='/change_this_to_somthing_else_that_is_not_static')
basePath = 'https://create-react-app-example.vercel.app'
# basePath = 'https://www.intercom.com'
[{"username":"dineshsonachalam"}]
@dineshsonachalam
dineshsonachalam / markdown-autodocs-examples.md
Last active June 30, 2021 18:26
markdown-autodocs examples

markdown-autodocs examples

CODE Block

Get code from an external file or URL and insert it in your markdown.

Get code from external file

<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=./relative/path/to/code.js) -->
<!-- MARKDOWN-AUTO-DOCS:END -->
@dineshsonachalam
dineshsonachalam / code-block-url.html
Created June 27, 2021 11:38
code-block-url.html
<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=https://raw.githubusercontent.com/kubernetes/kubectl/master/docs/book/examples/nginx/nginx.yaml) -->
<!-- MARKDOWN-AUTO-DOCS:END -->
import argparse
import os
def get_cli_args():
parser = argparse.ArgumentParser()
parser.add_argument('-repo', required=True)
parser.add_argument('-access_token', required=True)
parser.add_argument('-commit_author', required=True)
parser.add_argument('-commit_user_email', required=True)
parser.add_argument('-commit_message', required=True)
<!-- AUTO-GENERATED-CONTENT:START (artifactsTable) -->
This content will be dynamically replaced with a table listing workflow artifacts.
<!-- AUTO-GENERATED-CONTENT:END -->
from LucidDynamodb.Operations import DynamoDb
import os
import logging
import uuid
from boto3.dynamodb.conditions import Key
logging.basicConfig(level=logging.INFO)
AWS_ACCESS_KEY_ID = os.getenv("AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY = os.getenv("AWS_SECRET_ACCESS_KEY")