Skip to content

Instantly share code, notes, and snippets.

View gregxsunday's full-sized avatar

Grzegorz Niedziela gregxsunday

View GitHub Profile
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/gniedziela/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@gregxsunday
gregxsunday / .bashrc
Last active April 1, 2020 08:49
useful bashrc settings
alias python=python3
alias ipyhon=ipython3
alias python2=/usr/bin/python2
alias l="ls -al --color=auto --block-size=M"
STARTCOLOR='\e[1;32m'
ENDCOLOR="\e[0m"
export PS1="\n\[$STARTCOLOR\]\\t \\w:\\$ \[$ENDCOLOR\]"
alias i=ipython3
alias ch="(google-chrome --ignore-certificate-errors --disable-xss-auditor &> /dev/null &)"
alias grep="grep --color=auto"
@gregxsunday
gregxsunday / graphql-response.py
Created August 7, 2019 11:04
pretty print GraphQL schema query response
schema = r.json()
print("============= [SCHEMA] ===============")
print("e.g: \033[92mname\033[0m[\033[94mType\033[0m]: arg (\033[93mType\033[0m!)\n")
for types in schema['data']['__schema']['types']:
if types['kind'] == "OBJECT":
print(types['name'])
if not "__" in types['name']: