Skip to content

Instantly share code, notes, and snippets.

Ilya Zub ilyazub

Block or report user

Report or block ilyazub

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ilyazub / upgrade_jasmine_specs.rb
Created Feb 14, 2014
Rake task for upgrading Jasmine specs from 1.3 to 2.0.
View upgrade_jasmine_specs.rb
desc "Upgrade Jasmine specs to 2.0 syntax"
namespace :jasmine do
task :upgrade_specs do
Dir.glob('spec/javascripts/units/**/*') do |filename|
specs =
specs = specs.gsub('.andReturn', '.and.returnValue')
specs = specs.gsub('.andCallFake', '.and.callFake')
specs = specs.gsub('.andCallThrough', '.and.callThrough')
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

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 / memory_usage.log
Created Aug 16, 2017
Spritesmith memory leak
View memory_usage.log
ilyazub / represent_matcher.rb
Last active May 17, 2019
RSpec matcher for grape-entity
View represent_matcher.rb
# Alternative:
RSpec::Matchers.define :represent do |expected|
match do |actual|
exposes? && aliases? && has_presenter? && has_runtime_exposure?
chain :as do |as_alias|
@as_alias = as_alias
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(
<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 / 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)
ilyazub /
Last active May 24, 2020
Excel 2003 XML Spreadsheet example

Excel 2003 XML Spreadsheet example




Solved errors

Problem During Load because of wrong ss:ExpandedRowCount.

You can’t perform that action at this time.