三千止境的个人博客

记录有趣的人事物,分享可重用的技术

Lorem ipsum dolor sit amet, consectetur adipisicing elit

博客列表

    • JavaScript programs should be stored in and delivered as .js files

    • script tags should be placed as late in the body as possible, There is no need to use the language or type attributes

    • The unit of indentation is four spaces

    • Avoid long lines

    • Be generous with comments

    Read More »

  • just follow the steps:

    • In VirtualBox > Preferences > Network, set up a host-only network

    • Activate the 2nd adapter and set it with Host-only Adapter and the only Name attribute we just created like 'vboxnet0'

    • In C:\WINDOWS\system32\drivers\etc, you may need to use this configuration for convenience

    196.168.56.1    localhost
    

    note: if you are using gruntjs, you may need to change the 'hostname' to '0.0.0.0'

    see more: justinmarsan

  • just follow the steps:

    $ hdiutil convert -format UDRW -o destination_file.img source_file.iso
    
    $ diskutil list
    
    $ diskutil partitionDisk /dev/disk2 1 "Free Space" "unused" "100%"
    
    $ dd if=destination_file.img.dmg of=/dev/disk2 bs=1m
    

    note: 'disk2' is your USB, you may need to use 'sudo dd'

    see more: bootable usb

  • simply using the function below(not suggested):

    (function() {
        if (!-[1,]) {
            var tags = ['article', 'aside', 'details', 'figcaption', 'figure', 'footer', 'header', 'hgroup', 'menu', 'nav', 'section', 'summary', 'time', 'mark', 'audio', 'video'];
    
            for (var i = 0, len = tags.length; i < len; i++) {
                document.createElement(tags[i]);
            }
        }
    })();
    

    see also: html5shiv