This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| If you want to change the user use that command | |
| $ git config user.name "John Doe" | |
| $ git config user.email "[email protected]" | |
| => shortcuts for me: ((gita & gitc)) | |
| check ..... https://github.com/AhmedHelalAhmed/Helper-Bash-Scripts | |
| //============================================// | |
| change the email and user namd globally | |
| $ git config --global user.name "John Doe" | |
| $ git config --global user.email "[email protected]" | |
| //============================================// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // to get token | |
| http://localhost:8000/oauth/token | |
| // in body tab | |
| key .......................... value | |
| grant_type .................... password | |
| client_id ..................... 2 | |
| client_secret ................. client_secret in database in table.....`oauth_clients` | |
| username ...................... <username> | |
| password ...................... <password> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| our_string=raw_input("Enter a word ") | |
| length = len(our_string) | |
| if length%2 ==0: | |
| print our_string[(length/2)-1]+our_string[length/2]; | |
| else: | |
| print our_string[length/2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # first: mkdir user && cd user && cp /path/to/get_gists.py . | |
| # python3 get_gists.py user | |
| import requests | |
| import sys | |
| from subprocess import call | |
| user = sys.argv[1] | |
| r = requests.get('https://api.github.com/users/{0}/gists'.format(user)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clean -fdx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * A helper file for Laravel 5, to provide autocomplete information to your IDE | |
| * Generated for Laravel 5.5.13 on 2017-09-28. | |
| * | |
| * @author Barry vd. Heuvel <[email protected]> | |
| * @see https://github.com/barryvdh/laravel-ide-helper | |
| */ | |
| namespace { | |
| exit("This file should not be included, only analyzed by your IDE"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // commands | |
| cd | |
| touch .gitignore_global | |
| git config --global core.excludesfile ~/.gitignore_global | |
| vim .gitignore_global | |
| // for phpstorm | |
| // in project if you add it to git already | |
| git rm --cached .idea -r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
| export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
| # This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
| # ~/code/web:beta_directory$ git checkout master | |
| # Switched to branch "master" | |
| # ~/code/web:master$ git checkout beta_directory | |
| # Switched to branch "beta_directory" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GET _search | |
| { | |
| "query": | |
| { | |
| "match_all": {} | |
| } | |
| } | |
| Get / |