Hamburger Icon Animation

Advertisements

[ icoMoon ] icon font .ttf .svg .woff .eot

Example here is using FontAwesome, however we can use icomoon to generate the font as well.

<html>
<head>
<style>
    @font-face {
        font-family: 'FontAwesome';
        src:url('http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/fonts/fontawesome-webfont.ttf') format('truetype'),
            url('http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/fonts/fontawesome-webfont.woff') format('woff'),
            url('http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/fonts/fontawesome-webfont.svg') format('svg');
     }

     .mail:before {
        font-family: FontAwesome;
        content: "\f095";
    }
</style>

</head>
<body>
    <i class="mail"></i>
</body>
</html>

 

[ npm ] install global permission error

problem

$ npm install -g bower
npm WARN deprecated bower@1.8.2: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm ERR! tar.unpack untar error /home/pong/.npm/bower/1.8.2/package.tgz
npm ERR! Linux 4.10.0-19-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "bower"
npm ERR! node v4.8.4
npm ERR! npm v2.15.11
npm ERR! path /usr/lib/node_modules/bower
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/bower'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/bower']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/lib/node_modules/bower',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/lib/node_modules/bower',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:82:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! /home/pong/npm-debug.log

recommended ​​​​​​Option 2: Change npm’s default directory to another directory

$ mkdir ~/.npm-global
$ npm config set prefix '~/.npm-global'

put this in ~/.profile

export PATH=~/.npm-global/bin:$PATH

then update your system variables

source ~/.profile

ref : https://docs.npmjs.com/getting-started/fixing-npm-permissions

[ gem ] bundle install mysql; checking for mysql_query() in -lmysqlclient… no

problem

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:/home/pong/.rvm/gems/ruby-2.1.2@toaster/gems/mysql2-0.3.18/ext/mysql2/home/pong/.rvm/rubies/ruby-2.1.2/bin/ruby -r ./siteconf20171017-2320-19gfum4.rbextconf.rbchecking for ruby/thread.h... yeschecking for rb_thread_call_without_gvl() in ruby/thread.h... yeschecking for rb_thread_blocking_region()... yeschecking for rb_wait_for_single_fd()... yeschecking for rb_hash_dup()... yeschecking for rb_intern3()... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lm... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lz... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lsocket... nochecking for mysql_query() in -lmysqlclient... nochecking for main() in -lnsl... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lmygcc... nochecking for mysql_query() in -lmysqlclient... no*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack of necessarylibraries and/or headers.  Check the mkmf.log file for more details.  You mayneed configuration options.
Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/pong/.rvm/rubies/ruby-2.1.2/bin/ruby --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysql-config --without-mysql-config --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysqlclientlib --without-mysqlclientlib --with-mlib --without-mlib --with-mysqlclientlib --without-mysqlclientlib --with-zlib --without-zlib --with-mysqlclientlib --without-mysqlclientlib --with-socketlib --without-socketlib --with-mysqlclientlib --without-mysqlclientlib --with-nsllib --without-nsllib --with-mysqlclientlib --without-mysqlclientlib --with-mygcclib --without-mygcclib --with-mysqlclientlib --without-mysqlclientlib
To see why this extension failed to compile, please check the mkmf.log which canbe found here:
/home/pong/.rvm/gems/ruby-2.1.2@toaster/extensions/x86_64-linux/2.1.0/mysql2-0.3.18/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in/home/pong/.rvm/gems/ruby-2.1.2@toaster/gems/mysql2-0.3.18 for inspection.Results logged to/home/pong/.rvm/gems/ruby-2.1.2@toaster/extensions/x86_64-linux/2.1.0/mysql2-0.3.18/gem_make.out
An error occurred while installing mysql2 (0.3.18), and Bundler cannotcontinue.Make sure that `gem install mysql2 -v '0.3.18'` succeeds before bundling.
In Gemfile:  mysql2

solution

sudo apt-get install libmysqlclient-dev

ref: https://stackoverflow.com/questions/5795309/gem-install-mysql-fail

[ ubuntu 16.04 ] share clipboard

  • Install Guest Additions CD image
  • Settings > General > advanced tab >
    Shared Clipboard : bidirectional
    Drag and drop : bidirectional

If it does not work, try installing virtualbox-guest-dkms.

sudo apt-get install virtualbox-guest-dkms

Then reboot

ref : https://askubuntu.com/questions/533071/virtualbox-4-12-shared-clipboard-not-working-in-ubuntu14-04,

https://dsin.blogspot.com/2015/11/virtualbox-share-clipboard.html