This is a Git Style Guide inspired by How to Get Your Change Into the LinuxKernel, the git man pages and various practices popular among the community.
This file contains 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
run this command: | |
sudo gedit ~/.bashrc | |
then add this line to the end of file: | |
export PATH=$PATH:/the/folder/of/your/app/bin | |
save file and exit gedit. | |
run this command: | |
source .bashrc | |
and re-open a new terminal to test your app |
This file contains 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
# just install git for windows. | |
ssh -v to see if ssh client is installed. | |
ssh-keygen | |
# it will generate two files (id_rsa => private key, id_rsa.pub => public key). | |
# add contents of id_rsa.pub to bitbucket->account->ssh-keys | |
# create a project in bitbucket.org | |
# run commands of overview page (git init, ...) | |
# done. |
This file contains 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
sudo cp ~/Desktop/my-new-fonts /usr/share/fonts/truetype/ -r | |
fc-cache -f -v |
This file contains 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 install 'nodejs' (not node, and don't use apt install nodejs, because it's not latest version). | |
# https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions | |
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
# and then npm (if it's not installed automatically): | |
# https://rtcamp.com/tutorials/nodejs/node-js-npm-install-ubuntu/ | |
# Then install bower and gulp with simple npm install command (with -g flag). | |
# For accessing bower in global space (or adding it to path) create a symbolic link: |
This file contains 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
<VirtualHost *:80> | |
DocumentRoot /opt/lampp/htdocs/path/to/project/folder | |
ServerName mynewhost.com | |
ServerAlias *.mynewhost.com | |
</VirtualHost> | |
# Also add: 127.0.0.1 mynewhost.com to hosts file. |
This file contains 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
{ | |
"result": { | |
"states": [ | |
"آذربایجان شرقی", | |
"آذربایجان غربی", | |
"اردبیل", | |
"اصفهان", | |
"البرز", | |
"ایلام", | |
"بوشهر", |
This file contains 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
# snippet for Atom editor: | |
'.source.php': | |
'Styled var_dump': | |
'prefix': 'vardumper' | |
'body': 'echo "<pre style=\'word-spacing:15px; line-height:1.5; font-size:18px;\'>";var_dump($1);echo"</pre>";' | |
# output is this: | |
# echo "<pre style='word-spacing:15px; line-height:1.5; font-size:18px;'>";var_dump($request);echo"</pre>"; |
node inspect app.js
type in console: c
(continue to end), n
(next expression), repl
(go into repl mode and do modifications or log), list(10)
to see 10 lines of code.
type debugger;
inside code (similar to breakpoint)
nodemon inspect-brk app.js
go to chrome://inspect
click to open dedicated devtools for Nodejs
This file contains 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
<script src='http://code.jquery.com/jquery-latest.min.js' type='text/javascript'></script> | |
<script src='//ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js' type='text/javascript'></script> | |
<script type="text/javascript"> | |
// Fallbacks | |
window.jQuery || document.write(unescape("%3Cscript src='js/vendor/jquery.min.js' type='text/javascript'%3E%3C/script%3E")); | |
window.angular || document.write(unescape("%3Cscript src='js/vendor/angular.min.js' type='text/javascript'%3E%3C/script%3E")); | |
</script> |