I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis onto
the box and here's how I did it and some things to look
out for.
To install:
| cd ~ | |
| ##If you want to install OpenJDK | |
| #sudo apt-get update | |
| #sudo apt-get install openjdk-8-jre-headless -y | |
| ###Or if you want to install Oracle JDK, which seems to have slightly better performance | |
| sudo add-apt-repository ppa:webupd8team/java | |
| sudo apt-get update | |
| sudo apt-get install oracle-java8-installer |
| #include <unistd.h> | |
| #include <mach/mach.h> | |
| #include <mach/mach_vm.h> | |
| #include <mach-o/dyld.h> | |
| int | |
| main (int argc, char * argv[]) | |
| { | |
| volatile char * library; | |
| const mach_vm_size_t page_size = getpagesize (); |
| #!/bin/sh | |
| # | |
| # chkconfig: 35 99 99 | |
| # description: Node.js app server script | |
| # | |
| . /etc/rc.d/init.d/functions | |
| USER="root" |
This guide will get RethinkDB setup and running with a default configuration on OSX. There is also an option for setting RethinkDB to start at boot time on OSX, and a note on upgrading to a more recent RethinkDB version.
Install Homebrew if you don't already have it:
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |
##Setup your server (this would ideally be done with automated provisioning)
npm install -g forever##Install flightplan
npm install -g flightplannpm install flightplan --save-dev| app.post('/login', function(req, res) { | |
| console.log(res); | |
| passport.authenticate('local', function(err, user, params) { | |
| if (req.xhr) { | |
| //thanks @jkevinburton | |
| if (err) { return res.json({ error: err.message }); } | |
| // e.g. in auth.js: | |
| // if (!user.emailVerified) { return done(null, false, { message: 'Email is not verified. Please check your email for the link.' }); } | |
| if (!user && params) { return res.json({error : params.error}); } |
| /*http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/*/ | |
| /*At least requires the meta viewport tag with content 'width=device-width'*/ | |
| @media only screen and (max-width: 1080px) and (orientation : portrait) { | |
| /* PORTRAIT: | |
| Windows Surface Pro*/ | |
| } | |
| @media only screen and (max-width: 800px) and (orientation : portrait) { | |
| /* PORTRAIT: | |
| Acer Iconia Tab A100 |
| AsyncProcess = require('./async-process').AsyncProcess | |
| describe('AsyncProcess', function() { | |
| var asyncProcess; | |
| beforeEach(function() { | |
| asyncProcess = new AsyncProcess(); | |
| }); | |
| it('should process 42', function() { |