Postări

Root login - ssh

Simply adding a password for root is not enough for Ubuntu 14.04 Server. You also need to edit  /etc/ssh/sshd_config , and comment out the following line: PermitRootLogin without-password Just below it, add the following line: PermitRootLogin yes Then restart SSH: service ssh restart

Raspberry PI - Ubuntu Mate Camera - setup

Setup the camera First, connect the Raspberry Pi with the camera and boot it. The camera module needs these two packages: sudo apt-get install libraspberrypi-dev sudo pip install picamera Then, open config.txt with sudo nano /boot/firmware/config.txt and add the lines start_x=1 gpu_mem=128 at the end of the file. Save, then reboot the Raspberry Pi with sudo reboot Test the installation Open Python and enter import picamera camera = picamera.PiCamera() camera.capture('image1.jpg') camera.close() If this produced an image named image1.jpg in the current directory, all is fine.

RpiCar

Imagine
Raspberry PI & Node JS I'm glad to share my first Iot project a car that runs on 2 servo motors Requisite list: -Power bank for Raspberry pi (one external for phone should do the trick with 2.1 A) - Raspberry pi (B/B+/2/3) - I'm using 3 - You can get one from here - 2 servo wheels - You can buy them from here -  L298N Dual H-Bridge Motor Controller - You can buy from here -Power bank max 12V for controller - I recommend this one How to connect everything schema: Software ... NodeJS How to install: Step 1: sudo apt update sudo apt dist-upgrade sudo rpi-upgrade Step 2: curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - sudo apt-get install -y nodejs node -v v5..... Step 3: create a folder and: npm install  rpio console express body-parser cors Step 4: go to github here ... Website Install Lighttpd and in /var/www/html copy files from here: https://github.com/alexandru360/RpiCar/tree/...

Lenovo Yoga 2 Pro - Mini HDMI adventure

If you have such a laptop with "useless" Mini HDMI you can find a solution here Short story is you have to cut 1 mm of plastic surrounding the mini HDMI end to expose more metal. And then more adventure to set up the second screen monitor not to be 200% zoom (on all displays).

GET,POST,PUT,DELETE - 404 Error - how to hack - Part 2

Another way to achieve the same thing with less config lines is this one: < system.webServer >     < handlers >       < remove   name = " ExtensionlessUrlHandler-Integrated-4.0 "  />       < remove   name = " OPTIONSVerbHandler "  />       < remove   name = " TRACEVerbHandler "  />       < add   name = " ExtensionlessUrlHandler-Integrated-4.0 "   path = " *. "   verb = " * "   type = " System.Web.Handlers.TransferRequestHandler "   preCondition = " integratedMode,runtimeVersionv4.0 "  />     </ handlers >   </ system.webServer >

GET,POST,PUT,DELETE - 404 Error - how to hack

If you bought a new pc like I did and forgot you made some config changes than you are in for a 404 / 405 Error surprise. Long story short is you need to make just a few tweeks to make it work: 1. Go here for some wuick documentation: http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-express-faq  and look for:  Q: How do I enable verbs like PUT/DELETE for my web application? 2. In your config file the one that is holding your REST api put this: < system.webServer >     < validation   validateIntegratedModeConfiguration = " false "  />     < modules >       < remove   name = " WebDAVModule "  />     </ modules >     < handlers >       < remove   name = " WebDAV "  />       < remove   name = " Extensi...

Fast POCO Class direct from SQL Management Studio

Create fast POCO class from SqlServer with this. Sweet! declare @TableName sysname = 'MyTableName' declare @Result varchar(max) = 'public class ' + @TableName + ' {' select @Result = @Result + '     public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; } ' from (     select         replace(col.name, ' ', '_') ColumnName,         column_id ColumnId,         case typ.name             when 'bigint' then 'long'             when 'binary' then 'byte[]'             when 'bit' then 'bool'             when 'char' then 'string'             when 'date' then 'DateTime'             when 'datetime' then 'DateTime'             when 'datetime2' then 'DateTime'          ...