Node.js is just JavaScript running on the server side. That's it. That's all there is to it.
- Express Docs, if you want to get started and already know JavaScript this is the place to be
Node.js is just JavaScript running on the server side. That's it. That's all there is to it.
So I have been using tmux for a while and have grown to like it and have since added many many customizations to it. Now once you start getting the hang of it, you'll naturally want to do more with the tool.
Now tmux has a concept of window-group and session and if you are like me you'll want multiple session that connects to the same window group instead of a new window group every time. Basically I just need different views into the same set of windows that I have already created, I don't want to create a new set of windows every time I fire up my terminal.
This is the default case if you simply use the tmux command as your login shell, effectively creating a new group of windows every time you start tmux.
This is less than ideal because, if you are like me, you fire up one-off terminals all the time and you don't want all those one-off jobs to stay running in the background. Plus sometimes you need information fro
| /** | |
| * so here the thing ... you go in your github page | |
| * as example I go here: https://github.com/WebReflection | |
| * you open your console | |
| * you copy and paste this shit | |
| * then you write and execute in the console | |
| * write("Hi There!"); | |
| * NOTE: Pixel Font from a 2006 project of mine :-) http://devpro.it/pixelfont/ | |
| */ | |
| function write(text, color, start) { |
note: I converted this script into the much easier to install joinopenwifi module on NPM
see https://github.com/maxogden/joinopenwifi#joinopenwifi for installation instructions
| describe('catalogyBody', function() { | |
| var chai = require('chai'); | |
| var path = require('path'); | |
| var env = require(path.join(testDir, 'lib', 'environment')); | |
| var requirejs = env.requirejs(staticDir); | |
| var sinon = requirejs('js/lib/sinon'); | |
| var fs = require('fs'); | |
| var server; | |
| var router; |
| var serialport = require('node-serialport') | |
| var sp = new serialport.SerialPort("/dev/ttyO3", { | |
| parser: serialport.parsers.raw, | |
| baud: 9600 | |
| }) | |
| sp.on('data', function(chunk) { | |
| console.log(chunk.toString('hex'), chunk.toString(), chunk) | |
| }) |
| #!/bin/bash | |
| # | |
| # Whitelist Pingdom probe-servers in iptables. | |
| # | |
| # Create a chain called "PINGDOM" and jump to it somewhere before | |
| # the final REJECT/DROP, e.g. | |
| # | |
| # # New chain for Pingdom rules | |
| # :PINGDOM - [0:0] | |
| # |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.| // Modify as-needed. | |
| $.each({ | |
| server: 'irc.freenode.net', | |
| port: '6667', | |
| room: '#grunt', | |
| nick: 'gruntly', | |
| message_without_join: true, | |
| }, function(id, val) { | |
| var elem = $('#irc_' + id); | |
| if (typeof val === 'boolean') { |
| <script src=cordova-2.0.0.js></script> | |
| <script src=powermanagement.js></script> | |
| <script> | |
| document.addEventListener("deviceready", function() { | |
| startGeolocating(); | |
| cordova.require('cordova/plugin/powermanagement').acquire( | |
| function() { console.log( 'hooray power mgmt' ); }, | |
| function() { console.log( 'oh no! power mgmt fuct' ); } | |
| ); | |
| }, true); |