Skip to content

Instantly share code, notes, and snippets.

View topuhit's full-sized avatar
👨‍💻

Md Tariqul Islam topuhit

👨‍💻
View GitHub Profile
@topuhit
topuhit / index.js
Created July 22, 2022 09:45 — forked from schfl0/index.js
[MongoDB API Endpoints] GET, POST, PUT, DELETE #sveltekit #svelte #mongodb #endpoints #get #post #put #delete #del #api
import { connectToDatabase } from '$lib/db';
import { ObjectId } from 'mongodb';
export async function get(request) {
try {
const completed = request.query.get('completed') === 'true' ? true : false;
const dbConnection = await connectToDatabase();
const db = dbConnection.db;
const collection = db.collection('sveltetodos');
const todos = await collection.find({ completed }).toArray();
@topuhit
topuhit / animated-navbar-using-flex-and-clip-path.markdown
Created April 25, 2022 23:58
Animated Navbar using Flex and clip-path

Animated Navbar using Flex and clip-path

An awesome responsive navbar with cool animations using flexbox and css clip-path properties and little javascript for click events.

A Pen by Hiten Sharma on CodePen.

License.

@topuhit
topuhit / Async
Last active May 21, 2018 12:31
async
var GithubApi = require('github');
var github = new GithubApi({
version: '3.0.0'
});
function getPentaCodeAvatar() {
return new Promise((resolve, reject) => {
github.search.users({ q: 'pentacode' }, (err, res) => {
if (err) {
@topuhit
topuhit / index.pug
Created March 18, 2018 14:15
Map Function - Javascript
#results1.col-sm-6.col-sm-offset-3
#results2.col-sm-6.col-sm-offset-3
#results3.col-sm-6.col-sm-offset-3