Skip to content

Instantly share code, notes, and snippets.

View ilyazub's full-sized avatar
🇺🇦

ilyazub

🇺🇦
View GitHub Profile
@ilyazub
ilyazub / Cargo.toml
Last active November 28, 2022 13:49
Render HTML with loaded JavaScript to stdout using Wry
[package]
name = "wry_render_html_to_stdout"
authors = [ "Illia <ilya@serpapi.com>" ]
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
wry = "0.22.5"
@ilyazub
ilyazub / no_war.md
Last active March 10, 2022 19:27
GitHub please stop the Russian war in Ukraine

GitHub, please stop the Russian war in Ukraine

The script creates issues in all repositories of GitHub executives with an ask to close GitHub for Russia and its developers.

Demo usage

no_war_letter_to_github.mp4

Prerequisites

@ilyazub
ilyazub / deploy-ghost-theme-via-api.md
Last active December 23, 2021 16:05 — forked from ErisDS/README.md
Deployment tools for Ghost themes
@ilyazub
ilyazub / ghost-org-invalid-amp.md
Last active December 21, 2021 18:12
Ghost.org invalid AMP example
!important no !important
original_mobile overridden_mobile
Difference

difference_mobile

@ilyazub
ilyazub / main.py
Last active May 3, 2021 14:19
Scrape Google News with Pagination using Python Generators
from bs4 import BeautifulSoup
import requests, urllib.parse
def paginate(url, previous_url=None):
# Break from infinite recursion
if url == previous_url: return
headers = {
"User-Agent":
@ilyazub
ilyazub / Converter.elm
Last active October 6, 2020 09:55
Elm practice
-- https://ellie-app.com/3P9hcDhdsc5a1
module Main exposing (Model, Msg(..), init, main, update, view, viewConverter)
import Browser
import Html exposing (Attribute, Html, div, input, span, text)
import Html.Attributes exposing (..)
import Html.Events exposing (onInput)
@ilyazub
ilyazub / App.css
Last active August 12, 2020 08:58
Build badge in React without SVG and no dependencies
.App {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
align-content: center;
}
@ilyazub
ilyazub / README.md
Last active January 20, 2022 06:16 — forked from ibrahima/CodeBlock.jsx
Syntax highlighting for react-markdown and Next.js

Syntax highlighting for react-markdown and Next.js

This gist is based on @ibrahima's version that doesn't support Next.js.

Example

import Markdown from '@/components/markdown'

function PostBody({ content }) {
@ilyazub
ilyazub / pyproject.toml
Last active January 4, 2021 15:49
google-search-results via python poetry
[tool.poetry.dependencies]
python = "^3.8"
google-search-results = "^2.0.0"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
@ilyazub
ilyazub / scrape_google_shopping.py
Last active January 4, 2021 15:49
Extract Google Shopping prices via SerpApi
# https://pypi.org/project/google-search-results
from serpapi import GoogleSearch
import os
params = {
"engine": "google",
"q": "Coffee",
"tbm": "shop",
"api_key": os.getenv("API_KEY")
}