Skip to content

Instantly share code, notes, and snippets.

View mikkpr's full-sized avatar

Mikk Pristavka mikkpr

View GitHub Profile
@mikkpr
mikkpr / README.markdown
Last active June 16, 2017 15:12
Wordpress XML -> Voog articles

Migrating Wordpress articles to Voog

Requirements

  • Ruby (2.0 and newer)
  • gem install voog_api
  • gem install mime-types
  • gem install nokogiri

What to do?

  • Make sure you have enough free space to temporarily hold all the necessary image assets before re-uploading them to Voog
@kaspar-naaber
kaspar-naaber / edicy_to_voog_migration_tasklist.md
Last active September 19, 2016 07:44
Edicy -> Voog migration tasklist

Edicy -> Voog migration tasklist

Basic stuff

  • Let support team do the magic from clientbase side.
  • Wait until the site is running on Voog...

If site is running on Voog, proceed with the following tasks.

  • Pull template to your computer and make it a git repo (optional but reccomended).
  • Make an "initial commit" to save the current stage (if you decided to pull the template).

Phaser Cheatsheet

This is the content from the original Phaser cheatsheet, the site of which went down. I'm editing outdated information as I come across it.

Starting a new game

Reference: http://docs.phaser.io/Phaser.Game.html#Game

var game = new Phaser.Game(width, height, renderer, "parent");
//All parameters are optional but you usually want to set width and height
//Remember that the game object inherits many properties and methods!
@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)
anonymous
anonymous / gist:f4558424f5bd91a8c302
Created April 9, 2015 08:00
Update Voog content areas
// Article body
$.ajax({
type: "PUT",
contentType: "application/json",
url: '/admin/api/articles/566710',
data: JSON.stringify({ body: '' }),
dataType: "json"
});
// Content text
@ericelliott
ericelliott / essential-javascript-links.md
Last active March 22, 2025 17:28
Essential JavaScript Links
@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)
@pulges
pulges / Array_taversing.js
Last active August 29, 2015 13:56
Javascript tricks for traversing arrays
// toggle between two list values
var i = 1,
toggleList = ['one', 'two'];
console.log(toggleList[i ^= 1]); // one
console.log(toggleList[i ^= 1]); // two
console.log(toggleList[i ^= 1]); // one
// toggle through longer array
// limitation: list values should not be falsy ("", null, 0)