Skip to content

Instantly share code, notes, and snippets.

View Stopa's full-sized avatar
🔒
Only you can see this

Stepan Bolotnikov Stopa

🔒
Only you can see this
View GitHub Profile
@JohnBunka
JohnBunka / embed-pdf-google-viewer.php
Created August 16, 2013 21:10
Embed PDFs with Google PDF viewer
<iframe src="http://docs.google.com/gview?url=http://example.com/mypdf.pdf&embedded=true" style="width:100%; height:1000px;" frameborder="0"></iframe>
@tanelj
tanelj / voog_migrator.rb
Last active March 18, 2019 14:51
Small script to migrate content between websites that are build with Voog CMS (www.voog.com). Read more about Voog API www.voog.com/developers/api
#!/usr/bin/env ruby
# voog_migrator.rb
#
# Small script to migrate content between websites that are build with Voog CMS.
# This tool is using Ruby client of the Voog API: https://github.com/Voog/voog.rb.
#
# Read more about Voog API http://www.voog.com/developers/api.
# This tools allows to analyze source and target host (default action when running this script without any parameters)
@tanelj
tanelj / voog_page_content_copy.rb
Last active May 10, 2022 10:16
Small script to migrate content and/or elements between Voog CMS (www.voog.com) pages. Read more about Voog API www.voog.com/developers/api. Depends on https://gist.github.com/tanelj/a64d58185551976874d5
#!/usr/bin/env ruby
# Script to copy Voog (www.voog.com) page content areas and/or elements between pages.
# It uses functions from Voog migrator script https://gist.github.com/tanelj/a64d58185551976874d5, that should be in same folder.
require_relative 'voog_migrator'
def copy_articles!(mappings)
mappings.each do |k, v|
source_page = @migrator.source.page_by_path(k)
target_page = @migrator.target.page_by_path(v)
@verrev
verrev / poverty.js
Last active February 27, 2020 12:23
praad.ee poverty filter | put this in the link part of a boomark and click the bookmark on praad.ee
javascript:(() =>{
s = document.createElement("script");
s.type = "text/javascript";
s.innerHTML = `(maxPrice =>
[...document.getElementsByClassName("meal")].forEach(offer => {
const foods = document.evaluate(
"div[2]/div/div[2]",
offer,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,