February 2012
3 posts
7 tags
Pomodoro App
Hi everyone!
I’ve just pushed my simple application for working with pomodoro.
based on backbonejs, jquerymobile, sinatra, rack-offline.
http://pomodoro-app.heroku.com/
5 tags
Enable localStorage for cucumber features
We have already made fork for capybara-webkit and now we can test localStorage features using cucumber/capybara-webkit.
But for enabling properly this feature you should use the next following snippet in the env.rb:
Capybara.default_host = "lvh.me"
Capybara.app_host = "http://lvh.me:3003"
Capybara.server_port = 3003
Before('@html5') do
if [:webkit, :webkit_debug].include?...
need help →
January 2012
8 posts
1 tag
Linux replace in multiple files
find . -name \*.haml -exec sed -i "s/OldWord/NewWord/" {} \;
2 tags
html5 please →
5 tags
capybara-webkit is hanging on requests like...
Hi, everyone!
if someone will have issue with hanging browser on steps like
visit "http://localhost/#/posts/new"
You can replace this steps with the next following code and it works for me in capybara-webkit 0.8.0
def visit_script url
page.execute_script("window.location = '#{url}'")
end
7 tags
poltergeist
Some days ago I’ve got task to test our offline application with cucumber scenarios.
It was very difficult to do it because in our project we are using capybara-webkit and unfortunately it doesn’t support html5 a lot of features in this webkit server implementation. After digging into forks of capybara-webkit I found one fork with html5 support features via custom...
6 tags
backbone-queues
Hi everyone!
I have just published very small library for backbone.
May be it will helps someone.
https://github.com/oivoodoo/backbone-queues
6 tags
html5 offline application
2 days ago I’ve lost my internet connection at home. But I had very important emails for me on the gmail. But I thought I have offline application for gmail developed by google.
I’ve installed this chrome app just for checking possible implementation for offline apps. because on my current work we are working on the creation with the same functionnality application. Offline gmail is...
Ruby Quicktips: Prevent rdoc and ri installation... →
rubyquicktips:
When installing a gem the process that often takes the longest is generating the ri and RDoc documentation.
If you want to prevent this from happening every time a gem gets installed (either manually or through Bundler), create (or open) a .gemrc file in ~/.gemrc or /etc/gemrc and add the…
What a Year →
December 2011
5 posts
1 tag
internet collapsed for me
Hi everyone!
I have just thought about internet collapsing for me. Everyday I am reading only several blogs and sites like planetrubyonrails.com / tumblr / gmail / github and that’s it. I have no idea what I can find interesting in our days in internet. But it’s enough now.
3 tags
mutex js gist
var Mutex = function() { this.queues = []; this.locked = false;};Mutex.prototype = { push: function(callback) { var self = this; this.queues.push(callback); if (!this.locked) { this.locked = true; var f = this.queues.pop(); try { f(function() { self.locked = false; }); } catch(ex) { self.locked = false; } } }};
view raw...
5 tags
backbone js snippets
Hi, everyone.
Not far a long time ago I’ve started to work on one project where we was using backbone for creating offline website version. It means we have a goal to create possibility to delay our requests to the server and works without postbacks.
We took example with backbone localstorage from backbone docs...
Acquired →
Creating an API →
November 2011
1 post
How to install passenger gem to the Ubuntu...
Not far a long time I had the problem with installation of passenger gem. I love this gem because it’s very quickly to use it. You can use very simple commands to start and stop server just as example:
$ cd ~/your_project
$ gem install passenger --no-ri --no-rdoc
$ passenger start -d ; // run as daemon
$ passenger stop
$ touch tmp/restart.txt // quickly restart, I think this gem better than...
October 2011
4 posts
How to test rails helpers in console
body{ font-size:14px; }
# How to test application helpers via terminal.# For example you are using devise.# Type in terminal the next following lines. class << self def current_user User.find_by_name("your username") endend include ApplicationHelper # if you want to see how your helper is rendering# content_tag you need to make include module include...
How to count files in folder
body{ font-size:14px; }
ls -1 | wc -l
view raw
gistfile1.sh
This Gist brought to you by GitHub.
Start to learn html5 canvas for #game dev
body{ font-size:14px; }
window.oivoodoo = window.oivoodoo || {};window.oivoodoo.tower = window.oivoodoo.tower || {};window.oivoodoo.tower.utils = window.oivoodoo.tower.utils || {}; var namespace = window.oivoodoo.tower; namespace.Statuses = { START: 0, STOP: 1, PAUSE: 2}; namespace.utils.guid = function() { function S4() { return...
Script for learning english words with translation...
body{ font-size:14px; }
#!/usr/bin/env ruby # Script for learning english by twitter eng_trainer bot. require 'rubygems'require 'net/http'require 'uri'require 'json' fork do loop do response = Net::HTTP.get_response(URI.parse('http://api.twitter.com/1/statuses/user_timeline.json?user_id=177973554&count=1')) json = JSON.parse response.body...
June 2011
1 post
5 tags
Rails 3: working with subdomains(cucumber, rspec)
Hi, everyone!
Not far a long time I’ve started to work with Rails 3. In one my user story I should add subdomains to my application something like gmail account domains. And create relations for resources by account. I’ve added simple account model with friendly_id gem for creating slugs and column name. We had a lot of tests are written using cucumber and rspec. Rspec worked great...
May 2011
2 posts
4 tags
EventMachine and Passenger →
April 2011
3 posts
SSH Tunneling in Ruby →
3 tags
My home website based on nodejs →
Sources you can find at http://github.com/oivoodoo/home/
March 2011
2 posts
3 tags
Small snippet for C# for getting PublicKey of...
using(var writer = new StreamWriter(new FileStream("data.txt", FileMode.CreateNew, FileAccess.Write)))
{
foreach (var b in Assembly.GetAssembly(typeof(Program)).GetName().GetPublicKey())
{
writer.Write(String.Format("{0:x2}", b));
}
}
3 tags
Convert separate javascript snippets to one file...
In my development environment I am using vim as ide for rails, nodejs. In the github I found nodejs snippets for snipmate vim plugin. But snippets doesn’t work with my current config for snipmate. My snippets is placed for each language as one file but downloaded snippets in separate files. I love ruby and write for 5 minutes one small script:
ruby -e 'File.open("javascript.snippets",...
February 2011
9 posts
Give Yourself Constraints →
shelbeeann asked: i hate you 15 fun game. but im so addicted to it.
node.js + npm + github →
sambervalley:
Blagovest’s NPM Search by Blagovest Dachev is a convenient (and fast) way to browse npm.
6 tags
New html5 game project(mario like game).
Today I created another one game project. Not far a long time I decided for me: “I just wanna to create mario like game. :)”. For game engines I choose http://craftyjs.com/. Because it’s very flexible and smallest engine for arcade games what I’ve seen before. New repository with the first commit: https://github.com/oivoodoo/canvas-mario .
6 tags
5 tags
Html5 Tetris chrome web store game
Today, I published my second small game to chrome web store.
https://chrome.google.com/webstore/detail/eeehcmbhicglclggakomjhhlmemhjbde
It’s just a tetris but all sources you can find at http://github.com/oivoodoo/cakejs-tetris/. I implement client side using cakejs html5 engine and server side for saving high scores using NodeJS.
In this page http://oivoodoo.no.de/: you can find page...
4 tags
Game engine for html5 →
5 tags
Cross domain requests jQuery $.getJSON and nodejs....
Hi, everyone.
In my current project for google chrome webstore I am using nodejs as server for saving high scores of the game. And in the client side - jQuery for receiving high scores. But I found one problem connecting with jsonp format.
When I tried to send request to the nodejs url(http://oivoodoo.no.de/json) for getting the json data with scores I saw issue(in chrome) connecting with cross...
3 tags
Ruby 1.9 tips and tricks →
January 2011
1 post
3 tags
How to create setup for Word Addin →
Deploying a VSTO Word 2007 add-in to All Users (Visual Studio 2008 SP1)
December 2010
8 posts
Year In Review →
A Scam I Say! →
2 tags
Javascript code snippet for removing item from...
/*
Snippet for removing value from javascript array.
*/
Array.prototype.remove = function() {
var what, a = arguments, L = a.length, ax;
while(L && this.length){
what = a[--L];
while((ax= this.indexOf(what))!= -1){
this.splice(ax, 1);
}
}
return this;
}
1 tag
1 tag
Anonymous asked: Hi,
Thank you very much for sharing this info. I had the same problem after implementing a custom membership provider and login page & web part, I was receiving ‘Exception … ArgumentException … encodedValue’ error message when signining out. By following the approach you've suggested, create a custom sign out page with the above code, it works.
Watch
Thank you very much for sharing this info. I had the same problem after implementing a custom membership provider and login page & web part, I was receiving ‘Exception … ArgumentException … encodedValue’ error message when signining out. By following the approach you've suggested, create a custom sign out page with the above code, it works.
5 tags
My chrome extension game →
5 tags
November 2010
4 posts
3 tags
Simple sprite animation using javascript (jQuery).
Today I wrote some parts of code just for showing how to create simple animation using css sprites technics and jQuery.
This is example of animation:
Styles for our container and dog animation div.
.dog_container {position:relative; width:150px;}
.dog {height: 30px; width: 35px;position:absolute;}
.dog1 {background: urL(dog.png) no-repeat 0px 0px;}
.dog2 {background: urL(dog.png) no-repeat...
3 tags
I have created my first flash banner :) In the actionscript for navigation by clicking to button I used ‘this.root.loaderInfo.parameters.navigation_url’.
button.addEventListener(MouseEvent.CLICK, clicked);
function clicked(event:MouseEvent):void {
navigateToUrl(this.root.loaderInfo.parameters.navigation_url);
}
3 tags
jQuery usefull serializer form.
Hi, everyone!
Sometimes we have a task for creating form to submit via AJAX. But not all programmers know about the little piece of code for serializing the form with data for submitting.
; (function ($) {
// Example of usage: http://tobiascohen.com/files/stackoverflow/jquery-form-serializeObject.html
// This function is using for serializing form data to json.
$.fn.serializeObject =...