[ css ] IE incompatible

IE incompatible

position: initial;

IE compatible

position: static;

 

Advertisements

[ HTML ] X-Frame-Options header

  • DENY : disables the loading of the page in a iframe
  • SAMEORIGIN : site in the frame is the same as the one serving the page ( ** This is probably the most commonly used directive out of the three. It is a good balance between functionality and security )
  • ALLOW-FROM https://domain.com/ : allows the page to only be loaded in a frame on the specified origin and or domain

Enable on Nginx

add_header x-frame-options "SAMEORIGIN" always;

Enable on Apache httpd.conf

header always set x-frame-options "SAMEORIGIN"

 

ref : https://www.keycdn.com/blog/x-frame-options/

[ ruby ] yaml

escape ‘ with ”

ref : https://github.com/dotmaster/toYaml/issues/1

config.conf

:key: 'whatever ''a'' xx'
config = YAML.load_file('config.conf')
config[:key] # whatever 'a' xx

 

list of strings

ref : https://stackoverflow.com/questions/23657086/yaml-multi-line-arrays

config.conf

:key:
- string1
- string2
config = YAML.load_file('config.conf')
config[:key] # ['string1', 'string2']

 

If do not want to escape, use scalar block

scalar block with \n

config.conf

:key: >
   whatever
config = YAML.load_file('config.conf')
config[:key] # whatever\n

scalar block w/o \n

ref : https://jaytaylor.com/notes/node/1457984547000.html

config.conf

:key: >-
   whatever
config = YAML.load_file('config.conf')
config[:key] # whatever\n

 

with regex

!ruby/regexp '/[0-9]/'

ref : http://yaml.org/YAML_for_ruby.html#regexps

[ sublime ] show hidden characters ( i.e. \r\n )

Preferences > Key Bindings — User

[
{ "keys": ["alt+d"], "command": "set_setting", "args": {"setting": "draw_white_space", "value": "all"} },
{ "keys": ["alt+shift+d"], "command": "set_setting", "args": {"setting": "draw_white_space", "value": "selection"} },
]

ref : https://sublimetext.userecho.com/communities/1/topics/2228-is-it-possible-to-show-all-characters-spaces-tabs-cr-lf-etc