Skip to content

Instantly share code, notes, and snippets.

View ravuthz's full-sized avatar
🥴

Ravuthz ravuthz

🥴
View GitHub Profile
@ravuthz
ravuthz / react-ts-hook.tsx
Created August 1, 2020 09:30
[react-ts-hooks] React Ts Hook #react-ts #hook
import axios, { AxiosResponse } from 'axios';
import { useEffect, useState } from 'react';
const useAxiosFetch: any = (
url: string,
params: any,
headers: any,
timeout?: number
) => {
const [data, setData] = useState<AxiosResponse | null>(null);
from django.contrib.auth import login, logout
from rest_framework import viewsets, permissions, status, views
from rest_framework.authtoken.serializers import AuthTokenSerializer
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.response import Response
class LoginView(viewsets.ViewSet):
serializer_class = AuthTokenSerializer
permission_classes = [permissions.AllowAny]
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set fs = WScript.CreateObject("Scripting.FileSystemObject")
Function MakeDesktopShortcut( name, target, arguments )
Dim Shortcut,DesktopPath,StartupPath
DesktopPath = WSHShell.SpecialFolders("Desktop")
Set Shortcut = WSHShell.CreateShortcut(DesktopPath & "\" & name & ".lnk")
Shortcut.TargetPath = target
Shortcut.Arguments = arguments
Shortcut.Save

CRUD React JS tutorial

  console.log('hello world');
  body { margin: 0 }