#nano javascript syntax highlighting
The existing syntax highlighting is located in /usr/share/nano/
To add a new language
sudo nano /usr/share/nano/javascript.nanorc
Put the following in the contents:
| For nginx, | |
| location ~* \.(eot|ttf|woff)$ { | |
| add_header Access-Control-Allow-Origin *; | |
| } | |
| Or better way inside virtual host location use, | |
| Inside location use | |
| if ($request_filename ~* ^.?/([^/]?)$) |
#nano javascript syntax highlighting
The existing syntax highlighting is located in /usr/share/nano/
To add a new language
sudo nano /usr/share/nano/javascript.nanorc
Put the following in the contents:
| # Doxyfile 1.8.9 | |
| #--------------------------------------------------------------------------- | |
| # Project related configuration options | |
| #--------------------------------------------------------------------------- | |
| DOXYFILE_ENCODING = UTF-8 | |
| PROJECT_NAME = "Cameron & Wilding Tool" | |
| PROJECT_NUMBER = | |
| PROJECT_BRIEF = "Drupal 7 Architecture tool" | |
| PROJECT_LOGO = /Users/itarato/Desktop/logo.png |
| @namespace url(http://www.w3.org/1999/xhtml); | |
| @namespace svg url(http://www.w3.org/2000/svg); | |
| @-moz-document regexp("^https?://((raw[2-9]*|gist|guides|help|status|developer)\.)?github\.com.*") { | |
| /*********************************************** | |
| * Github Dark Theme v1.8.7 (3/22/2014) | |
| * https://github.com/StylishThemes/GitHub-Dark | |
| * http://userstyles.org/styles/37035 | |
| * License: http://sam.zoy.org/wtfpl/ | |
| ***********************************************/ | |
| body { |
| @namespace url(http://www.w3.org/1999/xhtml); | |
| @-moz-document domain('reddit.com') { | |
| body{ | |
| background:#1a1a1a; | |
| color:#ddd | |
| } | |
| .comment .usertext .md p>a:visited,.md a,.res.res-nightmode .tagline a,a,h2 a:visited{ | |
| color:#3498db; |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
| #!/bin/sh | |
| # | |
| # nginx - this script starts and stops the nginx daemin | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
| # proxy and IMAP/POP3 proxy server | |
| # processname: nginx | |
| # config: /usr/local/nginx/conf/nginx.conf | |
| # pidfile: /usr/local/nginx/logs/nginx.pid |
| // for demo: http://jsbin.com/jeqesisa/7/edit | |
| // for detailed comments, see my SO answer here http://stackoverflow.com/questions/8853396/logical-operator-in-a-handlebars-js-if-conditional/21915381#21915381 | |
| /* a helper to execute an IF statement with any expression | |
| USAGE: | |
| -- Yes you NEED to properly escape the string literals, or just alternate single and double quotes | |
| -- to access any global function or property you should use window.functionName() instead of just functionName() | |
| -- this example assumes you passed this context to your handlebars template( {name: 'Sam', age: '20' } ), notice age is a string, just for so I can demo parseInt later | |
| <p> | |
| {{#xif " this.name == 'Sam' && this.age === '12' " }} |
| git fetch --all | |
| git reset --hard origin/master | |
| git pull origin master |
IE9, IE10, and IE11 don't properly scale SVG files added with img tags when viewBox, width and height attributes are specified. View this codepen on the different browsers.
Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.
As per this answer on Stackoverflow, the issue can be resolved by removing just the width and height attributes.