Skip to content

Instantly share code, notes, and snippets.

View ABHISHEK-KEDAR-21's full-sized avatar
⚙️
Still Coding

ABHISHEK KEDAR ABHISHEK-KEDAR-21

⚙️
Still Coding
View GitHub Profile
@ABHISHEK-KEDAR-21
ABHISHEK-KEDAR-21 / MyReadings.txt
Last active April 22, 2020 09:45
Lets read something..
Working Out Loud Revisited - https://medium.com/@stangarfield/working-out-loud-revisited-3c0c6c6b567f
@ABHISHEK-KEDAR-21
ABHISHEK-KEDAR-21 / chrome-no-cors.md
Last active October 8, 2020 13:14 — forked from jmonterroso/chrome-no-cors.md
Open Chrome without CORS restriction

For OSX, open Terminal and run:

$ open -a Google\ Chrome --args --disable-web-security For Linux run:

$ google-chrome --disable-web-security

Also if you're trying to access local files for dev purposes like AJAX or JSON, you can use this flag too.

-–allow-file-access-from-files

http://diveintohtml5.info/index.html
Good site for HTML5 stuff
@ABHISHEK-KEDAR-21
ABHISHEK-KEDAR-21 / git_ssl_self_signed.md
Last active June 3, 2020 11:06 — forked from peschee/git_ssl_self_signed.md
Disable SSL verification in git repositories with self-signed certificates

Sometimes, we have to access git repositories over SSL and the server only provides a self-signed certificate 🙈. Although there are ways to increase the trust level for the self-signed certificate (https://confluence.atlassian.com/fishkb/unable-to-clone-git-repository-due-to-self-signed-certificate-376838977.html, https://confluence.atlassian.com/bitbucketserverkb/resolving-ssl-self-signed-certificate-errors-806029899.html), my recommendation is to just ignore SSL verification alltogether.

Prepend GIT_SSL_NO_VERIFY=true before every git command run to skip SSL verification. This is particularly useful if you haven't checked out the repository yet.

Run git config http.sslVerify false to disable SSL verification if you're working with a checked out repository already.

export GIT_SSL_NO_VERIFY=1 This also works

@ABHISHEK-KEDAR-21
ABHISHEK-KEDAR-21 / import-tar-gz.sh
Created June 11, 2020 09:29 — forked from infusion/import-tar-gz.sh
Import a tar.gz file to MySQL
tar xzOf dump.sql.tar.gz | mysql -u $user -p $database
git config --global credential.helper 'cache --timeout=3600'
git config --global --unset credential.helper
git config --global credential.helper store
git config --global user.name "username"
git config --global user.password "password"
@ABHISHEK-KEDAR-21
ABHISHEK-KEDAR-21 / .bash_aliases
Last active June 12, 2020 04:46 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@ABHISHEK-KEDAR-21
ABHISHEK-KEDAR-21 / git branches with owner
Last active June 30, 2020 05:03
git all brances with owner
git for-each-ref --format='%(committerdate) %09 %(authorname) %09 %(refname)' --sort=authorname
Customized:
git for-each-ref --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p) %(align:25,left)%(color:yellow)%(authorname)%(end) %(color:reset)%(refname:strip=3)' --sort=authorname refs/remotes
By Author Email: (Which makes more sense)
git for-each-ref --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p) %(align:25,left)%(color:yellow)%(authoremail)%(end) %(color:reset)%(refname:strip=3)' --sort=authoremail refs/remotes
kubectl exec -it gamma-wra-er-frappe-0 --namespace wrun --container frappe -- bash
kubectl exec -it gamma-wra-er-frappe-0 -n wrun -c frappe -- bash
kubectl exec -it <pod> --namespace <namespace> --container <container> -- bash
@ABHISHEK-KEDAR-21
ABHISHEK-KEDAR-21 / git_branch.md
Last active July 24, 2020 16:23
Show your branch name on your terminal

Add these lines in your ~/.bashrc file

# Show git branch name
force_color_prompt=yes
color_prompt=yes
parse_git_branch() {
 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '