idpt0000

Icon

Google Reverse Image Search Tips

Seems that Google doesn’t provide an official API for reverse image search. Here is a little tip to make use of this powerful feature.

You may make use the following URL pattern, just replace <url> with the encoded image url :

https://www.google.com/searchbyimage?image_url=
<url>

For example :

https://www.google.com/searchbyimage?image_url=https%3A%2F%2Fd3ar0cfl4379w2.cloudfront.net%2Fjousun-uploads%2Flarge%2Fproduct%2FVGT1033.jpg

You can then get the search result in your browser or consume it with a scrapper.

Here is a javascript bookmarklet example that making an image search over an Instagram page. Drag this to your bookmark bar. Goto any IG page and run it :

And the underlying js code :

javascript:(function()%7Bvar%20re%20%3D%20%2F(https%3A%5C%2F%5C%2F%5CS*)%20(%5Cd%7B3%2C4%7Dw)%24%2F%3Bimg_src%20%3D%20document.evaluate('%2F%2Fimg%5B%40srcset%5D%2F%40srcset'%2C%20document%2C%20null%2C%20XPathResult.FIRST_ORDERED_NODE_TYPE%2C%20null%20).singleNodeValue.value%3Bwindow.open('https%3A%2F%2Fwww.google.com%2Fsearchbyimage%3Fimage_url%3D'%2BencodeURIComponent(re.exec(img_src)%5B1%5D))%7D)()

Filed under: 軟件開發

Another tips

 

Start to learn Flask + Vuejs for a new hobby project.  Just to list out the great resource below :

  • First, let’s head to one of the best tutorial online from dev.to, about how to integrate flask with vuejs.
  • When I follow the steps, I hit an error during creating the virtual environment (under python).
    Error: Command '['/some/directories/bin/python3.4', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

    After some research, it’s quite common on debian / ubuntu.  If you hit the same, try the solution listed in this post.    Watch out for the venv version.

  • Next, go to the flask CRUD tutorial from Alicia Gilbert on Medium.
  • For moving the flask app to apache2, try this tutorial from Codementor.
  • For sqlalchemy, try this tutorial from Towards data science.

Filed under: 軟件開發,

New tips : Remote Coding using Sublime Text 3

I am trying to pick another program editor that works across platform – Mac/Win/Linux.  Sublime Text seems to be a great choice.  It’s free and speedy on Mac – at least vs. Atom.

To allow it works with remote server seamlessly, remember to setup the RemoteSubl.

The setup needs a bit time – on both server & local.  But it’s straight forward.  The download side is – you still need the terminal (local) everytime you work on remote file :

# connection with port forward 
ssh -p 22 hostname-R 52698:localhost:52698

# edit 
rmate test.py

So, it’s done ~

Filed under: 軟件開發,

Start a new project …

There are loads of damn skills required to go for a new project for everything from scratch :

  • Infrastructure : Networking / Server / Security / Tasks / Database
  • Programming : Logical processing / Work-flow
  • UI / UX

Or go for a framework / bootstrapping / container approach.

It’s a tradeoff between learning everything vs. time to delivery …

Filed under: 自言自語

Let’s burn some calories

be92de0afcdde2471ffa041ae809fc72

Filed under: 衣食往行

Server Choice

XAMPP is out there for a while.  However, for new project, I decided to try out the new tool AMPPS.  This new tool provided additional support for Python and MongoDB.  Let’s start the new experiment . . .

ampps-enduser

Filed under: Web 2.0

I just starred Joshua Wong found guilty of unlawful assembly in Hong Kong on Inoreader buff.ly/29X8jc5

from Buffer
via IFTTT

Filed under: Uncategorized, ,

I just starred Why Isn’t Jamie Dimon Telling Clients to Raise Wages Too? on Inoreader http://buff.ly/2aaBICh

from Buffer
via IFTTT

Filed under: Uncategorized, ,

Kodak’s Downfall Wasn’t About Technology http://buff.ly/29K8Elm – Which banknwill be the next Kodak ? #digital http://buff.ly/29K8Elm

from Buffer
via IFTTT

Filed under: Uncategorized, ,

Watch Design

Watch Design

Filed under: Uncategorized

Blog Stats

  • 33,343 hits

RSS 極力推介

  • An error has occurred; the feed is probably down. Try again later.
Design a site like this with WordPress.com
Get started