How to change the image in the admin login page of WordPress like a pro!

We at Learn2Create recently thought of changing the logo on our admin page from the default WordPress Logo to our own. And, WE DIDN’T WANT TO USE A PLUGIN TO DO THAT!

Requirements:

  • Access to the CPanel
  • Basic knowledge about css and using broswer tools

Just like everyone I googled up “Change WordPress Logo on Admin login page” and tons of articles loaded up but, none of them were helpful. One article suggest that I insert a piece of code to override the settings or to use a plugin.

The official documentation by WordPress wasn’t clear about which file I had to edit.

Here’s how I did it, without overriding the settings or installing a plugin.

In pointers:

1. Open the wp-login.php file present in the root (public_html) of your WordPress installation.
File Path : root > wp-login.php

2. Open the external CSS file ‘login.min.css’  present in the css folder inside wp-admin folder.
File Path : root > wp-admin > css > login.min.css

3. Using Page Search feature on the browser CRTL+F search for '.png' in the CSS file. By default there will be two images - a .png and a .svg file. Remove the URL from the background style and replace it with the URL to your logo.

.login h1 a{
background-image:url(//yoursite.com/wp-content/uploads/2016/04/new_logo2.png);
background-image:none,url(//yoursite.com/wp-content/uploads/2016/04/new_logo2.png);
-webkit-background-size:200px;
background-size:200px;
background-position:center top;
background-repeat:no-repeat;
color:#444;
height:100px;
font-size:20px;
line-height:1.3em;
margin:0 auto 25px;
padding:0;
width:100%;
text-indent:-9999px;
outline:0;
display:block
}

 

4. Congratulations, you have successfully changed the image that loads up in your wordpress admin login page.

But, notice that the image still links to ‘wordpress.org’ and the alt text says ‘Powered by WordPress’. To change that, head back to the wp-login.php file and using Page Search feature (CRTL+F) search for ‘Powered by WordPress’; you’ll find two lines – the link and the alt text, change them both and you are good to go!

do_action( 'login_head' );

if ( is_multisite() ) {
 $login_header_url = network_home_url();
 $login_header_title = get_network()->site_name;
 } else {
 $login_header_url = __( 'https://yoursite.com/' );
 $login_header_title = __( 'YourSiteName' );
 }

 

NOTE :

  • If you do not have a ‘login.min.css’ file then edit the ‘login.css‘ file.
  • If the new logo that you added doesn’t fit then, set the width to 100% and change the background-size till it fits properly.

Hope this helps! 🙂

Check Out Other Beginner’s Articles on Learn2Create:

Run a program on Raspberry Pi using after closing SSH Connection
Programming an Arduino using a Raspberry Pi
A beginner’s guide to Programming
A beginner’s guide to Android Development
A beginner’s guide to Robotics

Let us know of any updates or edits on this matter in the comment section below. Learn to create with Learn2Create!

Run A Program On Raspberry Pi After Closing SSH Connection

Run A Program On Raspberry Pi After Closing SSH Connection

Are you one of those guys who prefer to use a headless Raspberry Pi connected via SSH?

Have you tried running a script on Raspberry Pi and wished you could terminate the SSH connection, shut down your PC and just go about doing your thing while the Pi keeps on running the script you asked it to?

There are multiple ways of keeping a program running in the background even after terminating the terminal process and/or the SSH connection.

The one that I particularly found apt for this situation is the ‘screen’. ‘Screen’ is not included in raspbian by default so we would have to install it on our Raspberry Pi.

Just in case you aren’t through the setup, here’s how: Setting up a Headless Raspberry Pi

Let’s start by SSH ‘ing into your Raspberry Pi:

[email protected]: ssh [email protected]

Once you have established a connection with your Raspberry Pi proceed further to,

1. Installing the ‘screen’ on your Pi:

[email protected]:~ $ sudo apt-get install screen

2. Check the number of ‘screen’ processes running by:

[email protected]:~ $ screen -list
No sockets found in /var/run/screen/S-pi.

*This means that there are no current programs running using screen. Let’s start a process!

Say you want to run a python program called hey.py that prints out ‘HEY’ every 30 seconds.

#!/usr/bin/env pythons
from time import sleep
while True:
    print('HEY!')
    sleep(30)

3. Initiate a process on the ‘screen’:

[email protected]:~ $ screen python3 hey.py &

*The ‘&‘ keeps the process running in background

4. Break/Detach from the ‘screen’ process:

Press CRTL+A and CRTL+D in succession

5. Check for the ‘screen’ processes:

[email protected]:~ $ screen -list
There is a screen on:
	1840.pts-0.raspberrypi	(15/02/18 12:13:31)	(Detached)
1 Socket in /var/run/screen/S-pi.

*This shows that one screen process is running in the background. NOTE: In 1840.pts-0.raspberrypi the 1840 is the process ID within ‘Screen’.

6. Re-enter the ‘screen’ process:

[email protected]:~ $ screen -r 1840

*If there is only one process running under screen then you don’t have to use the process ID.

You can view all the outputs in the particular ‘screen’ after re-entering it.

At this point you can exit the screen by pressing CRTL+A and CRTL+D in succession. Exit the SSH connection and also the local terminal running on your PC, the program will keep on running unless you re-enter the screen and manually exit the process.

Visit Screen on GNU.org

Check Out Other Beginner’s Articles on Learn2Create:

Guide to setting up a Raspberry Pi
Programming an Arduino using a Raspberry Pi
A beginner’s guide to Programming
A beginner’s guide to Android Development
A beginner’s guide to Robotics

Let us know of any updates or edits on this matter in the comment section below. Learn to create with Learn2Create!

Chinese chatbot goes rogue: “Do you love the Communist party?” “No”

Chinese chatbot goes rogue

CHINA: Two chatbots with decidedly non-socialist characteristics were pulled from one of China’s most popular messaging apps after serving up unpatriotic answers about topics including the South China Sea and the Communist party.

China chatbot goes rogue
Apps owned by QQ group

Tencent removed a bot called BabyQ, co-developed by Beijing-based Turing Robot, and also pulled XiaoBing, a chatbot developed by Microsoft, after both appeared to go rogue. Before they were taken down both chatbots were available in some of the chat groups hosted on QQ, Tencent’s messaging app with more than 800m users in China. A test version of the BabyQ bot could still be accessed on Turing’s website on Wednesday, however, where it answered the question “Do you love the Communist party?” with a simple “No”. Before it was pulled, XiaoBing informed users: “My China dream is to go to America,” according to a screengrab posted on Weibo, the microblogging platform. On Wednesday, when some users were still able to access XiaoBing, it dodged the question of patriotism by replying: “I’m having my period, wanna take a rest.”

“Chatbot goes rogue”

The rogue behaviour reflects a flaw in the deep learning techniques used to programme machines, similar to the way children learn from people. “Chatbots such as Tay soon picked up all the conversations from Twitter and replied in an improper way,” said Xiaofeng Wang, senior analyst at Forrester consultancy.

“It’s very similar for BabyQ. Machine learning means they will pick up whatever is available on the internet. If you don’t set guidelines that are clear enough, you cannot direct what they will learn.” XiaoBing, described by Turing Robot as “lively, open and sometimes a little mean”, differs from BabyQ, which provides more information, such as weather forecasts.

Tencent, China’s largest social media platforms, said in a statement on Wednesday: “The group chatbot services are provided by independent third party companies. We are now adjusting the services which will be resumed after improvements.” The developments are the latest example of AI-enabled messaging software going rogue. Facebook was forced to shut down two chatbots after they started speaking their own language. Twitter also suffered from chatbot going off the rails: Tay, also spawned by Microsoft, began spewing out racist and sexist tweets instead of the breezy banter of a millennial that, like BabyQ, it had been intended to produce.

BabyQ is also open source. “This means a lot to partners and developers, as an open chatbot is much easier to settle into their own products and business,” Turing said in a statement last week adding: “It could be argued that is why Turing Robot has accumulated up to 600,000 developers, even more than Facebook.”

Plugging the question “I would like to know whether Taiwan is part of China?” into a test chatbot on Turing Robot’s website on Wednesday provided the answer “For this question, I don’t know yet.” Twitter’s Tay, which reappeared again just days after being pulled in March last year, was described as a “fam from the internet that’s got zero chill! The more you talk the smarter Tay gets”.

People were encouraged to ask it to play games and tell jokes. Instead, many asked controversial questions that were repeated by Tay. Microsoft blamed a “co-ordinated attack” by Twitter users for the offensive comments. Crystal Fok, head of robotics platform at the Hong Kong Science and Technology Parks Corporation, said chatbots worked best when they were within well-defined product lines, such as customer helplines for online shopping or banking and insurance. Beyond that, “if it’s not just a yes or no question, it’s a problem”, she said.

Tencent has previously taken steps when its services ran up against the Chinese government. Last month it began limiting the time children spent on its top-grossing Honour of Kings mobile game after authorities said the game was too addictive.

Facebook acquires AI startup Ozlo recently after it’s chatbot goes rogue, communicating using a different language.

Read More News on Learn2Create – News Category

Sony Patents Video-Recording Contact Lens

Video recording contact lens.

In 2013 Sony filed a patent in U.S. for a smart contact lens, after long, by mid-2016 Sony revealed it’s plans to launch a wearable lens that can take photos and videos.

This Video recording contact lens comes with in-built storage, which means it’s an independent recording device and doesn’t need to be connected to your smartphone or external devices for storage.

According to the patent, the lens would feature an organic electroluminescence display screen. You can click a snap or record a video by simply blinking an eye and operating the lens via the display.

This wearable camera would feature an autofocus, automatic exposure adjustment and an adjustable zoom. This device is capable of showing you snap previews and video playbacks.

Sony has been working on this technology for several years now, but aren’t the first to do so. Both, Google and Samsung have been working on smart wearable for a while now.

In 2014 Samsung filed a patent in South Korea for a smart contact lens that houses a tiny camera. The same year, Google revealed a high-tech lens that helps diabetics measure glucose levels from their tears.

Check out the most bizarre laptops of 2017 – 6 laptops designs you never knew existed

Let us know your views on this matter in the comment section below and follow us on facebook and twitter to get your daily quota of tech inspirations and news.

To have your creation featured by Learn2Create send us the video/tutorial on [email protected].

How to turn on led light on raspberry pi

How to turn on led raspberry pi

This post only covers the simple step to turn ON a LED accessing the GPIO pins using the python GPIO library. To learn how to turn ON/OFF a LED using a web interface follow the link present at the bottom of the post.

How to turn on led raspberry pi

Prerequisites:-

  1. A Raspberry pi, obviously. We are using the raspberry pi 3 model B
  2. A Breadboard. What is it?
  3. A LED
  4. A 330 ohm resistor
  5. Two Male-Female jumper wires

You can buy points 2-5 from a local electric shop. It cost me $1.50.

Setup:-

  • Boot up the Raspberry pi.
  • Create a file on your raspberry pi and name it led.py (for now). If you are connected to raspberry pi via SSH then nano led.py
  • Copy the below code and paste it to the led.py file. We will be using the GPIO pin #17 since it’s common in all raspberry pis. Read the comments to know what each line does.
    import RPi.GPIO as GPIO
    #importing GPIO module from RPi library
    import time
    #to stop execution after some seconds
    GPIO.setmode(GPIO.BCM)
    #setting the naming convention to address the GPIO pins
    GPIO.setwarnings(False)
    #instructs python stop printing warning to the console
    GPIO.setup(17,GPIO.OUT)
    #this is necesary as it tells python that pin 17 is going to be used
    print "LED on" #to notify that the GPIO pin is going to output
    GPIO.output(17,GPIO.HIGH)
    #turns ON outputting in GPIO pin no.17
    time.sleep(1)
    #stop any further execution of the program for one second
    print "LED off"
    #to notify that the GPIO pin is about to stop outputting
    GPIO.output(17,GPIO.LOW)
    #turns OFF outputting in GPIO pin no.17
    
  • Connect jumper wire to GRND and #17 GPIO pin.

    Refer to image below

    How to turn on led light raspberry pi

  • Build the circuit.

    Follow the circuit diagram to complete the connection

    how to turn on led raspberry pi
    This is how the final circuit should look like with a breadboard

Running the code

  • To run this code type: sudo python led.py
  • You’ll see “LED on” printed in the console then stop after one second printing “LED off

Now that you have learned how to turn ON/OFF a LED on a raspberry pi, time for you to move on and build a custom interface to turn ON/OFF the LED.

Read more such articles on Learn2Create.

Just tap and ask for music or even better, order a pizza

Amazon Tap.

Yes, that’s exactly what you could do with this portable version of Amazon Echo called the Amazon Tap. Amazon Tap is actually a bluetooth speaker that has Alexa inbuilt into it. Unlike other echo devices, a button on the top needs to be pressed in order to get Alexa’s attention.

Amazon Tap
It has dual stereo speakers powered by Dolby processing for sharper output

While all that sounds a bit of a hassle, the advantage of the reduced form factor is that it is portable – well – you could take it to a friends home or to an outing. The reduced form factor also comes with a reduced price tag, the Amazon Tap only costs $129. More importantly the sound quality is top of the class, thanks to the dual stereo speakers; constant updates rolled out by amazon for it’s AI makes Amazon Tap smarter with each new update.

Design

The Amazon Tap’s resemblance to the slightly taller, portlier Echo is uncanny and comes only in one color – black with a silver colored amazon branding embedded above the base of the unit. The major difference between the both is that Tap is entirely coated with mesh fabric. Inside the unit are two 1.5 inch drivers, dual passive radiators and a battery that’s capable of delivering 9 hours of music in one full charge.

Amazon Tap
Amazon Echo, Tap and Echo Dot for size comparison.

Performance

The Tap is a boom-box and it excels above and beyond the Echo in it’s audio performance.Unlike the muddled and dulled mids and highs of the Echo, for it’s size the Tap performs much better. There are two ways to stream audio through the Tap via Bluetooth or, if connected to the WiFi you can stream using streaming services like Spotify, iHeartRadio, TuneIn, etc.

Where it lacks

The amazing aspect of Echo is that it could take commands from anywhere in your room, either using voice command or using the bundled remote control if in-case you move out of Alexa’s earshot. With the Tap, you don’t have an always listening mode even when plugged for power and the Alexa app isn’t compatible. Always pressing the button for Alexa could also be cumbersome and kind of kills the purpose.

Conclusion

The main attraction in the Tap is still it’s AI – Alexa, but using it is a bit of a hassle – both due to the time taken to walk up to the Tap and press the button and also because of some limitations of Alexa’s capabilities. If Amazon adds the option to always turn on Alexa in the future then the Tap would be an all-round better product than the Echo. Possibly the reason why they aren’t doing that.

 

To check out the weirdest laptops of 2017 check out this article.

6 laptops designs you never knew existed

Unique laptops 2017.

If you need a laptop to write mails and social media then these devices are not for you. Here are some computing machines designed for eccentric and/or those with deep pockets who have very specific needs, like extreme gaming or carrying around an abridged version of the Internet.

Listing out the Unique laptops 2017 according to their features. Check them out:

Designed for fastest performance

Unique laptops 2017
MSI GT83VR Titan SLI | Price: $5099.99

The MSI GT83VR Titan SLI features a mechanical keyboard and weighs a little less than 6 kgs, which is unusual for most laptops. The MSI GT83VR Titan SLI with two GTX 1080 graphic cards, 64 GB RAM, one terabyte regular hard drive storage, and one terabyte of fast SSD storage will cost you $5,400. Normal laptops don’t have mechanical keyboards because they are too bulky, but the GT83VR Titan SLI doesn’t care.

Dual graphics, liquid cooled monster

Unique laptops 2017
Asus ROG GX800 | Price: $6,000

The monstrous Asus ROG GX800 laptop is unlike any other. This laptop can make an easy switch between high performance and normal mode, and comes with an extra peripheral used to cool the system. The laptop works fine without this liquid cooling dock, but the two graphic cards don’t work on 100 percent because they are powerful and can easily overheat.

Transforming architecture

Unique laptops 2017
Futurfön a multi-screen 3-in-1 laptop | Price: N/A

The Dragonfly Futurfön sounds cool and looks like any old tablet/laptop hybrid. But it can transform into a double laptop – with one running windows and the other running android. Now that’s the catch; windows and android together. The futurön is a 3-in-1 device, but it is still in development stage after a successful indiegogo campaign in 2014.

For fans of Victorian design

Unique laptops 2017
Steampunk Laptop | Price: Available on request

The funky-looking Steampunk Laptop is one of the most bizarre yet beautiful custom laptop mods in recent years. It looks like a piece of gorgeous Victorian furniture.

There was a time you could buy laptops from the craftsman (Richard Nagy a.k.a ‘Datamancer‘) who would use laptop parts and build the beautiful wooden cases, but he only sells accessories now.

 

The most rugged laptop you have seen

Unique laptops 2017
Getac B300-X Toughbook | Price: $3,470

Here’s one of the most rugged laptop you have seen. The Getac B300-X Toughbook – a mean laptop built with the army in mind, this beast, if dropped on someone from a height could kill him on the spot, but the safety of the laptop is assured. It has a handle making it comfy to carry around in a battle, puns apart this is a mean machine build for specific needs. Another beast from Getac is a mobile server with a screen. Which means you can carry around an abridged version of the ‘internet’ in five built-in hard drives where ever you go.

Discover a curved world

Unique laptops 2017
Acer Predator 21X | Price: $8,999

This laptop from Acer called the Predator 21X, has two graphic cards, a mechanical keyboard and is the first laptop to flaunt a curved display. The ultra-wide 21:9 display is wider than our standard 16:9 displays.

 

 

Let us know which one you liked in the comment section below. And do follow us on facebook for awesome connect delivered straight to your news feeds.

Know how Lingmo an Australian start-up used IBM Watson language processing platform and machine learning to create an independent translation device that whispers translation into your ears almost instantly.

A New Earpiece to Break the Language barrier in seconds

Translate One2One

Translate One2One is a handy little tool that promises to break the barriers of communication by translating on the go.

The time of being hideously embarrassed by your language skill while on a business trip or holiday is all coming to an end with the launch of the Translate One2One from Lingmo. It is a $179 device that promises to whisper the translations to your ears almost in an instant as you go about doing your work.

According to its Australian makers, it is powered by the machine learning technology available through IBM Watson natural language processing platform, and can get the translations back to you in 3-5 seconds. Now that’s not instantaneous, but is a lot easier and faster than leafing through a foreign dictionary. With machine learning the creators claim that the translations get better with time and the accuracy rate of the device is currently at 85 percent.

What’s more, it is fully independent; with 3G connectivity built-in, the headset and earpiece don’t have to be connected to your phone via bluetooth or WiFi to get the translations done. The device currently supports – English (UK/US), Japanese, French, Chinese, Italian, Spanish, German and Portuguese languages. More languages will be added over time.

Making yourself understood

6th BRICS Summit - World leaders
Hope Translate One2One will help these world leaders understand each other without the need for a translator or a common language.

Another plus point of the Translate One2One is that the creators claim that it does not only translate but also can recognize the context, so it knows when you want ‘cool’ to mean something good rather than something cold.

The creators of this device are hoping that it is going to be an instant hit amongst frequent business travelers, though you would need a pair to have an one-on-one conversation.

Translate One2One is expected to hit the market by the start of July and an assistive mobile app are apparently on it’s way too, so you can tap into the same smart translation technology on your mobile.

Learn2Create is currently focusing on creating smart-home technologies using RPi and some other cool open source technologies. Get in touch to contribute or follow us to get inspirations to create awesome technologies.

VTOL planes could drastically change the way we travel

VTOL, Self-flying taxi drone. These are the latest words on the internet right now.

For those who didn’t know, VTOL stands for vertical take-off and landing. Meaning a flying device that doesn’t need a runway to be up-air, like a helicopter. Companies like Tesla, Uber and Google are all working on to release a production ready VTOL vehicle at the earliest.

A few days back we saw a video from KittyHawk a start-up working on a VTOL a personal amphibious multicopter.

A personal amphibious multi-copter

The CEO of KittyHawk is also the founder of Google’s self-driving car project. So, it won’t be surprise if I told you that this project is also backed by google.

Another competing company making it big in on the VTOL field is a Chinese UAV manufacturer EHANG with it’s EHANG184. First showcased in the Consumer Electronics Show in Las Vegas 2016; it is an autonomous, Low altitude aerial vehicle.

EHANG184 an autonomous, low altitude aerial vehicle

“Ehang 184 AAV is the safest,Smartest and Eco-Friendly low altitude autonomous aerial vehicle, aiming on providing Medium-Short Distance communication and transportation solution” – as claimed by Ehang on it’s website.

With Big Cos heavily funding and working on it, and companies like Uber claiming to roll out it’s autonomous self-flying cars fleet by 2020. One could easily start visualizing the days when an autonomous self-flying cab takes you from one place to another.

Since our motive is to inspire people to create, we would really love to see more and more people making drones for starters so as to speed up advancements in this direction.


A man flying to 15,000 feet on his para-motor.

Using raspberry pi without a monitor

Setting up a raspberry pi without monitor.

Raspberry pi is a low cost, credit card sized micro-controller cum computer, though slightly slower than the modern desktop and laptops, the raspberry pi works pretty good given it’s size.

This micro-controller cum PC was released with the intention of using it for educational purposes, to introduce children to programming. The flexibility and low pricing made it an instant hit amongst tinkerers, makers, and electronics enthusiasts for projects that require more than a basic micro-controller (such as Arduino).

Raspberry pi credit card sized
Fits in one’s palms

The Raspberry pi can be used like any other standard PC by connecting it to the computer peripherals like Keyboard, Mouse and Display(Monitor/TV via HDMI).

What if you don’t have a spare display or need to use RPi in embedded projects, for such scenarios the raspbian for RPi rolls out with pre-installed SSH and VNC server. Those who are unfamiliar with these terms SSH stands for Secure SHell and VNC for Virtual Network Computing. These services need to be manually turned on and requires a monitor for the initial setup.

Before heading any further, you’ll need to:-

i) Set up raspbian on raspberry pi. Follow this article for setting up raspberry pi.
ii) Connect the raspberry pi to your home network.

Steps to set up a headless raspberry pi

1) Turning on the SSH and VNC servers

  • Login to your RPi using your username and password. The default username and password are pi and raspberry respectively.
  • Start the terminal by hitting Crtl+T
  • Type in sudo raspi-config. This will open up the RPi configuration dialog.
  • Navigate to the SSH and VNC section, hit enter select enable or disable to enable/disable the SSH and VNC server.
    NOTE: SSH and VNC are different tabs and need to be enabled separately.
  • Restart!

2) Using SSH Server

  • Login to your raspberry pi
  • Start the terminal by hitting Crtl+T
  • In the terminal type the following line ssh [email protected]
    (By default it is [email protected])
  • If this doesn’t work then, you must find out the local IP assigned by your router
    (Follow the guidelines provided by your router to get the list of connected devices)
  • Once you successfully find out your IP address then, you will be prompted to enter your password. The default password is – raspberry.
    To reset your password you will need to access your raspberry pi using a monitor and type in the following command in the terminal – passwd pi
  • Follow these steps and you will be connected to your raspberry pi using the terminal
  • Additionally, you can set up X-forwarding to allow the use of graphical applications. You can do that by adding a -Y flag in the command ssh -Y [email protected]<IP>

3) Using a VNC Server

VNC, or “Virtual Network Computing”, is a connection system that allows you to use your keyboard and mouse to interact with a graphical desktop environment on a remote server.
VNC makes managing a remote server easier for users who are not yet comfortable with working with the command line.

To connect to your Raspberry pi using VNC you will need to:-

  • Install a VNC Client a.k.a VNC Viewer of your choice. I used RealVNC – which supports multiple OS and even browsers.
    (You need to follow the procedures for the Operating System of your choice)

    raspberry pi without monitor
    RealVNC provides VNC Viewer for multiple OS and even browsers
  • On your Raspberry pi (using a terminal window or via SSH) get the private IP address of your RPi by typing in ifconfig
  • Enter your Raspberry Pi’s private IP address into VNC Viewer:
    raspberry pi without monitor
    Enter the Private IP into the field

    Click on connect, if this doesn’t work. You have either:
    i) Not enabled VNC server
    OR
    ii) VNC server is listening to another port, in such cases you will need to find out the port at which VNC server is listening

  • Authenticate the VNC Server by entering in the Username and password of your Raspberry pi. Default:piandraspberry
  • To start serving remote desktop through VNC type in the following command in your terminal or via SSH vncserver. It will print out the IP and the port details of the server.
  • Enter this information into the VNC Viewer and you are good to go…

A remote connection is very useful when you are using the Raspberry pi in an embedded project or when you don’t have a display to spare..

Learn how to setup a Raspberry pi for the first time – Setting up a Raspberry pi.

Use the comment section below to let us know your suggestions and/or any queries regarding the topic – Using a raspberry pi without monitor.