- CentOS-6.2-x86_64-netinstall.iso
- Name: vagrant-centos
- Operating System: Linux
| var exec = require('child_process').exec; | |
| function wew(cb){ | |
| exec("iwlist wlan2 scan|grep -Po '(?<=Address: )\\S+|(?<=Signal level=)\\S+|(?<=ESSID:\")[^\"]+'", test(cb)); | |
| } | |
| function test(cb) { | |
| return function (error, stdout, stderr) { | |
| var out = stdout.replace(/^\s+/mg, ''); | |
| out = out.split('\n'); |
| <script src="http://localhost:3000/socket.io/socket.io.js"></script> | |
| <script> | |
| var news = io.connect('http://localhost:3000/').of('/news'); | |
| news.emit("raul", new Array("1","2","3","4","5","6","7","8","9","10") ); | |
| news.on('get_random_number_from_raul', function(data) { | |
| console.log('random', data); | |
| }); |
| Friend.findOne({ | |
| userId: req.signedCookies.userid | |
| }, function (err, signedInUser) { | |
| function doCheck(err, currentUser) { | |
| if (err) { | |
| res.send(err); | |
| } else { | |
| console.log('doCheck'); | |
| //for(var x = 0; x < users.length; x++) { | |
| //var currentUser = users[x]; |
| module ApplicationHelper | |
| def combine_highlight(selected_text, surrounding_text) | |
| if surrounding_text.include? selected_text | |
| split_text = surrounding_text.split(selected_text) | |
| content_tag(:p, (split_text[0] || '').html_safe + content_tag(:span, selected_text, class:"selected") + (split_text[1] || '').html_safe) | |
| else | |
| content_tag(:p, surrounding_text, class:"selected") | |
| end | |
| end |
| module ApplicationHelper | |
| def combine_highlight(selected_text, surrounding_text) | |
| if surrounding_text.include? selected_text | |
| split_text_array = surrounding_text.split(selected_text) | |
| if split_text_array[0].blank? | |
| if split_text_array[1].blank? | |
| content_tag(:p, content_tag(:span, selected_text, class:"selected")) | |
| else |
| var repl = require('repl') | |
| , rl; | |
| rl = repl.start({ | |
| prompt: '>>> ' | |
| , input: process.stdin | |
| , output: process.stdout | |
| }); | |
| rl.on('close', function () { |