Skip to content

Instantly share code, notes, and snippets.

View Converter.elm
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 / App.css
Last active Aug 12, 2020
Build badge in React without SVG and no dependencies
View App.css
.App {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
align-content: center;
ilyazub /
Last active May 25, 2020 — 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.


import Markdown from '@/components/markdown'

function PostBody({ content }) {
ilyazub / pyproject.toml
Created May 19, 2020
google-search-results via python poetry
View pyproject.toml
python = "^3.7"
google-search-results = "^1.8"
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
ilyazub /
Last active May 19, 2020
Extract Google Shopping prices via SerpApi
from serpapi.google_search_results import GoogleSearchResults
params = {
"engine": "google",
"q": "Coffee",
"tbm": "shop",
client = GoogleSearchResults(params)
<svg xmlns="" viewBox="0 0 35 50" fill="#fff">
  <path d="M35 24.25l-22.177-7.761 4.338 10.82 6.923 3.225H35V24.25z" opacity=".7"/>
  <path d="M10 38.642V3.5L0 0v44.4L10 50l25-14.382V24.25z"/>


bing icon preview

ilyazub /
Created Aug 9, 2019
Reuse `puppeteer` cookies in `tough-cookie` and `got`

Reuse puppeteer cookies in tough-cookie and got

This way we can send HTTP requests from the Node.js instead of UI interactions.

Set puppeteer cookies to tough-cookie's CookieJar

const cookies = await page.cookies()
  async cookie => {
    await setCookie(
ilyazub / memory_usage.log
Created Aug 16, 2017
Spritesmith memory leak
View memory_usage.log
ilyazub /
Last active Dec 19, 2016
Add missing require() calls and module.exports statements

Add missing require() calls and module.exports statements

npm run codemode:addMissingRequires

Find javascript files that are changed after creation of the new branch and run script placed in requireUndefined.js. It uses ESLint programmatic API.


Find all javascripts inside app/components, filter by the lack of module.exports and apply jscodeshift transform placed in addModuleExports.js.

ilyazub /
Last active Aug 29, 2015
Rake SSH deployment

Rake SSH deployment


Set up deployment folder

bundle exec rake deploy:setup

Update code and restart server

You can’t perform that action at this time.