What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-31 10:13:01
delete a github repository using curl
winpty curl -X DELETE -H 'Authorization: token [GENERATED_TOKEN]' https://api.github.com/repos/[USER]/[REPO_NAME] # follow steps here to generate token: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-c... Add solution -
Javascript 2021-08-30 23:49:01
apollo client authentication
import { ApolloClient, createHttpLink, InMemoryCache } from '@apollo/client'; import { setContext } from '@apollo/client/link/context'; const httpLink = createHttpLink({ uri: '/graphql', }); const authLink = setContext((_, { headers }) => { // ge... Add solution -
Other 2021-08-30 14:21:02
graphql request npm
import { GraphQLClient, gql } from 'graphql-request' async function main() { const endpoint = 'https://api.graph.cool/simple/v1/cixos23120m0n0173veiiwrjr' const graphQLClient = new GraphQLClient(endpoint, { headers: { authorization: 'Beare... Add solution -
Shell/Bash 2021-08-30 02:18:02
how to delete docker images older than x days from docker hub using a shell script serverfault
#!/bin/bash #Script will delete all images in all repositories of your docker hub account which are older than 'X' days set -e # set your username, password and no. of 'X' days value in below lines. #UNAME="YOUR_USERNAME" #UPASS="YOUR_PASS... Add solution -
Other 2021-08-29 17:58:02
authorization type in api
Authorization : It's a process of granting or denying access to resources. Mostly it happens after Authentatication. Most of the projects I worked on use Bearer token with JWT in Authorizaiton header. I have endpoint that I can use to generate this token... Add solution -
Python 2021-08-28 21:52:02
python send line notify
"""line_notify.py For sending a LINE Notify message (with or without image) Reference: https://engineering.linecorp.com/en/blog/using-line-notify-to-send-messages-to-line-from-the-command-line/ """ import requests ... Add solution -
Shell/Bash 2021-08-28 10:14:02
installing helm and tiller on minikube
#installing helm curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > install-helm.sh bash install-helm.sh #Create the Tiller service account kubectl create serviceaccount tiller --namespace kube-system #Bind the Tiller service ... Add solution -
Other 2021-08-28 05:49:01
using http tool
$ http http://127.0.0.1:4000/hello/ "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNTg3Mjc5NDIxLCJqdGkiOiIzYWMwNDgzOTY3NjE0ZDgxYmFjMjBiMTBjMDlkMmYwOCIsInVzZXJfaWQiOjF9.qtNrUpyPQI8W2K2T22NhcgVZGFTy... Add solution
Best helpers
Ranking is empty