This file contains hidden or 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 yum update | |
| # Installing ZSH | |
| sudo yum -y install zsh | |
| # Check ZSH has been installed | |
| zsh --version | |
| # Install "util-linux-user" because "chsh" is not available by default | |
| # See https://superuser.com/a/1389273/599050 |
This file contains hidden or 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
| # linux | |
| UNISON_VERSION=2.48.4 | |
| sudo apt-get -y install inotify-tools ocaml-nox build-essential | |
| curl -L https://github.com/bcpierce00/unison/archive/${UNISON_VERSION}.tar.gz | tar zxv -C /tmp | |
| cd /tmp/unison-${UNISON_VERSION} | |
| sed -i -e 's/GLIBC_SUPPORT_INOTIFY 0/GLIBC_SUPPORT_INOTIFY 1/' src/fsmonitor/linux/inotify_stubs.c | |
| make UISTYLE=text NATIVE=true STATIC=true | |
| cp src/unison src/unison-fsmonitor ~/bin | |
| # You should modify your path to include ~/bin |
This file contains hidden or 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
| ### DigitalOcean Ubuntu 18.04 x64 + Rails 5 + Nginx + Unicorn + PostgreSQL9.6 + Capistrano 3 | |
| SSH into Root | |
| $ ssh root@123.123.123.123 | |
| Change Root Password | |
| $ passwd |
This file contains hidden or 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
| /** | |
| * Sort array of objects based on another array | |
| */ | |
| function mapOrder (array, order, key) { | |
| array.sort( function (a, b) { | |
| var A = a[key], B = b[key]; | |
This file contains hidden or 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
| /** | |
| * Modify the parts you need to get it working. | |
| */ | |
| var should = require('should'); | |
| var request = require('../node_modules/request'); | |
| var io = require('socket.io-client'); | |
| var serverUrl = 'http://localhost'; |
This file contains hidden or 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
| protocol Pop { | |
| func moveBackToParentViewController(currentViewController: UIViewController) | |
| } | |
| extension Pop { | |
| func moveBackToParentViewController(currentViewController: UIViewController) { | |
| let transition = CATransition() | |
| transition.duration = 0.5 | |
| transition.type = kCATransitionMoveIn |