Skip to content

Instantly share code, notes, and snippets.

@jatinkumar725
jatinkumar725 / UserManagement.js
Last active November 26, 2024 20:57
Post request in Fetch method
// Handling Adding the new User to the Server
const handleAddUser = async () => {
try {
const response = await fetch(
"https://user-dummy-api.onrender.com/users",
{
method: "POST",
body: JSON.stringify(userDetails.addModal),
headers: {
"Content-Type": "application/json"
@Madmals
Madmals / post_on_githubGist.js
Last active November 22, 2024 22:33
FETCH POST METHOD ON GITHUB GIST
content = {
"description": "TITLE ",
"public": false,
"files":
{
"post1.md": {
"content": "THIS IS WHERE CONTENT WILL BE PUT"
}
}
@donrestarone
donrestarone / login.js
Created March 5, 2020 02:31
sample login and logout with fetch and cookie based authentication
export const login = (email, password) => {
return new Promise((resolve, reject) => {
let endpoint = `http://api.your-domain-here.ngrok.io/api/core/v1/sessions`;
fetch(endpoint, {
method: "POST",
credentials: "include",
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
},
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@astrellon
astrellon / vimlogo.sh
Created October 6, 2019 01:12
Coloured vim logo in ascii art.
#!/bin/sh
darkgreen='\e[2m\e[32m'
green='\e[m\e[1m\e[32m'
yellow='\e[0m\e[33m'
white='\e[0m\e[37m'
grey='\e[2m\e[37m'
echo "$green /\ "
echo "$white __________ $green/$yellow^^$green\ $white __________ "
echo " /..........\\\\$yellow^^^^$green\ $white/..........\ "
@gtzilla
gtzilla / babel.config.js
Created September 14, 2019 12:42
An example of the new babel.config.js.
'use strict'
/**
babel.config.js with useful plugins.
*/
module.exports = function(api) {
api.cache(true);
api.assertVersion("^7.4.5");
const presets = [
[
@bnovoa
bnovoa / index.html
Created August 13, 2019 03:20 — forked from gaearon/index.html
Multiple React components on a single HTML page
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@rstacruz
rstacruz / README.md
Last active October 17, 2024 15:36
Setting up Babel and TypeScript

Install Babel 7 and TypeScript

yarn add --dev \
  @babel/core \
  @babel/cli \
  @babel/preset-env \
  @babel/preset-typescript \
  typescript
@bnovoa
bnovoa / GIT.md
Created September 8, 2018 17:00 — forked from dasdo/GIT.md
Lista de Comandos en GIT

Configuración Básica

Configurar Nombre que salen en los commits

	git config --global user.name "dasdo"

Configurar Email

	git config --global user.email [email protected]
@gaearon
gaearon / index.html
Last active March 10, 2025 04:43
Multiple React components on a single HTML page
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>