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> |
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
/* Setup Rounting For All Pages */ | |
SApp.config(['$stateProvider', '$locationProvider', '$httpProvider', '$urlRouterProvider', function($stateProvider, $locationProvider, $httpProvider, $urlRouterProvider) { | |
$httpProvider.defaults.withCredentials = false; | |
$locationProvider.html5Mode(true); | |
// Redirect any unmatched url | |
$urlRouterProvider.when('', '/'); | |
$urlRouterProvider.otherwise("/"); |
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
var pathGen = function(title){ | |
// replaces all special characters and white spaces with DASH. | |
var path = title.replace( /([\s`~!@#$%^&*()_|+=?;:'",.<>\{\}\[\]\\\/])/gi, "-"); | |
path = path.replace(/([-]{2,})/gi, '-'); | |
return path; | |
}; | |
// source: http://stackoverflow.com/a/11090301/ |
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
روی پنل راست کلیک | |
Add /Remove Panel Items >> ADD>>Keyboard Layout Handler | |
چک باکس Keep System Layout غیر فعال کنید سمت چپ قسمت Keyboard Layout زبان مورد نظر وارد کنید | |
[source: http://forum.ubuntu.ir/index.php?topic=90607.0] | |
another option is: | |
sudo dpkg-reconfigure keyboard-configuration |
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
# http://askubuntu.com/questions/78613/how-do-i-enable-the-universe-repository-from-the-command-line |
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
# 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>"; |
OlderNewer