Skip to content

Instantly share code, notes, and snippets.

View sathish-se's full-sized avatar

SathishKumar sathish-se

View GitHub Profile

GraphQL introspection query via curl

cat introspection_query.json

{ 
  "query": "query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
@sathish-se
sathish-se / git_command.md
Created May 25, 2022 14:21 — forked from SofijaErkin/git_command.md
Git commands Or Commands for Git
@sathish-se
sathish-se / git.md
Created May 25, 2022 14:21 — forked from msanjaypandit/git.md
[Git Commands] A basic git commands #git #commands

1. git checkout master

  • git checkout allows you to move between branches and potentially restore tree files.
  • The command git checkout master switches you to the master branch, which is always the best place to start before making changes to your repo.

2. git pull origin master

  • Get the latest updates on the master branch,
  • This is typically done to merge upstream changes. A git pull is actually a combination of git fetch, which grabs all the latest information, and git merge, which merges the two histories together.
  • Essentially, git pull origin master allows you to do two commands at once. It’s a great time-saver!
  • Always run git pull origin master before starting work on a repository. After all, you want to be sure your repository is up to date with the remote repo where you collaborate.
@sathish-se
sathish-se / git.txt
Created May 25, 2022 14:21 — forked from plaugh15/git.txt
[Git Commands] Commands for Git #git
GIT COMMANDS
=============================================================================
git status: Shows current status of git files.
git log: Shows list of commits to git branch.
git commit -m "Comment about changes on this version": Commits changes to branch you're currently on
git branch: Lists all a Git project’s branches.
@sathish-se
sathish-se / commands.txt
Created May 25, 2022 14:20 — forked from flc/commands.txt
useful unix commands
# display file with line numbers
cat file -n
# display gzipped file with line numbers
zcat file | cat -n
# display file from the i. line to j. line (that is j minus i there)
cat file | head -n j | tail -n j-i
# remove first line of the file (efficient)
@sathish-se
sathish-se / docker-cleanup-resources.md
Created January 16, 2021 19:05 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm