Skip to content

Instantly share code, notes, and snippets.

Aleksey Gureiev alg

Block or report user

Report or block alg

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
View README.markdown

This is a very rough script to export your octopress files to Ghost. You will still need to check your data but it will give you a head start. Feel free to fork and optimize the script for your purpose.

The following should be considered:

  1. You need to execute the script in the source/_posts directory
  2. You need to manually copy all the images to /var/www/ghost/content/images
  3. Images with external URLs are not handled
  4. Blockquotes have their issues
  5. Lists are not exported correctly
alg / gist:2964374
Created Jun 21, 2012
Exposing an interface between windows in Titanium
View gist:2964374
//error when the a table row is clicked in nearme_window.js
[WARN] Exception in event callback. {
line = 59;
message = "'undefined' is not a function (evaluating 'pub_win.update_pub_details('blah')')";
name = TypeError;
sourceId = 233027648;
module.exports = (function() {
alg / 0_instructions.txt
Created May 31, 2011 — forked from eric1234/0_instructions.txt
Using Sprockets 2 in Rails 3.0.x with CoffeeScript & SASS
View 0_instructions.txt
Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript
powered JS and SASS powered CSS with YUI compression all via the magic of rack.
This stuff will be native in Rails 3.1 and the layout of the files on the
filesystem will be different but this guide will get you working with it
while we wait for all that to finalize.
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist.
View rails-3-mongo-devise.rb
# This Rails template will generate a Rails 3 (MASTER) application, with MongoDB as ORM and Devise for authentication.
# You will require ruby 1.9.2-HEAD to run generated app.
file 'Gemfile', <<-GEMS
source ''
gem "rails", :git => "git://"
gem "mongoid", "2.0.0.beta4"
gem "bson_ext", "0.20.1"
gem "inherited_resources"
gem "devise", :git => "git://"
View rspec-syntax-cheat-sheet.rb
# RSpec 2.0 syntax Cheet Sheet by
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
View global_rest_controller.rb
class GlobalRESTController < ApplicationController
def index
@objects = model_class.all
respond_to do |format|
format.xml { render :xml => @objects }
You can’t perform that action at this time.