Skip to content

Instantly share code, notes, and snippets.

View miclovich's full-sized avatar
😇
Working, what else?

Victor miclovich

😇
Working, what else?
View GitHub Profile
"""
slidingPuzzle.py
Emily Johnston
4/26/2014
A command-line, single-player sliding puzzle game of customizable size and difficulty.
"""
import sys
from random import choice

Massive file upload using JQueryUpload + Nginx + Rails + Sidekiq

The goal: Upload several files (virtually big files) to a Rails application without compromising the user experience.

Architecture

jQuery File Upload + Nginx + Rails (Carrierwave) + Sidekiq

  1. jQuery File Upload (http://blueimp.github.io/jQuery-File-Upload/)

become active record migration expert (Rails 4.0.2)

workflow:

create model

$ rails g model NameOfModel
    invoke  active_record
    create    db/migrate/YYYYMMDDHHMMSS_create_name_of_models.rb
@miclovich
miclovich / gist:cd6b3c543111f8162ffc
Created February 21, 2015 23:56
Rails workflow
VISION for an MVP (minimum viable product) // User story
==========================================
Create a competition [Iteration I]
--------------------
- football games
- picking winners
e.g Duke vs Carolina
var http = require('http');
var url = require('url');
var parse = require('url').parse;
var join = require('path').join;
var fs = require('fs');
var qs = require('querystring');
var root = __dirname;
var items = [];
var loaded_page = false;
<p>
Scientific American is the world's leading source and
authority for science and technology information for
science-interested citizens, delivering understandable,
credible and provocative content to an audience of more
than 5 million people worldwide.
</p>
# Backs up all the photos from Google Picasa Web Albums.
#
# The script downloads the original version of the photos, and is not limited to
# 1600x1200 thumbnails.
#
# Author:: Victor Costan
# Copyright:: Copyright (C) 2010 Victor Costan
# License:: MIT
require 'yaml'

Rails 3.0.pre on App Engine

You can Rails 3 on App Engine, but it won’t be especially useful until bundler 10. You should try these instead:

Install the Development Environment

The gems for the development environment include a pre-release appengine-tools gem that provides a pre-release version of jruby-rack.

nl:
errors:
messages:
not_found: "niet gevonden"
already_confirmed: "is reeds bevestigd"
not_locked: "is niet gesloten"
devise:
failure:
unauthenticated: 'Je dient in te loggen of je in te schrijven.'
sv:
errors:
messages:
not_found: "hittaes inte"
already_confirmed: "är redan bekräftad"
not_locked: "är inte låst"
devise:
failure: