Skip to content

Instantly share code, notes, and snippets.

View guruguruman's full-sized avatar

Tomoyuki Kato guruguruman

  • Tokyo, Japan
View GitHub Profile
@guruguruman
guruguruman / text-detection.php
Last active January 8, 2019 06:59
Google Cloud Vision API - Text detection
<?php
function fetchImageText($filePath = null, $apiKey = null)
{
if (empty($filePath) || empty($apiKey)) {
return;
}
$json = json_encode(array(
"requests" => array(
<style>
.container {
display: flex;
flex-direction: row-reverse;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: stretch;
overflow-x: scroll;
@guruguruman
guruguruman / smartproxy.ts
Created June 7, 2024 01:08
Using Smartproxy API in TypeScript
export interface SerpScrapingResult {
query: string;
title: string;
position: number;
url: string;
}
function createRequestParams(apiKey: string, query: string): RequestInit {
return {
method: 'POST',