Skip to content

Instantly share code, notes, and snippets.

View benoror's full-sized avatar
🌀
In a quantum state between coding and procrastinating

Ben Orozco benoror

🌀
In a quantum state between coding and procrastinating
View GitHub Profile
Realie Brainstorm
- Gist + esteroids
- Collaborative Real-Time IDE in the cloud
- A lot like Gist + GDocs (GIT repos based, forking, embeding, etc), but for whole GIT projects, and real-time!
- Github API or GIT based?
- Many collaborators may contribute a project.
+ Authorization
+ It may be a must forking/cloning it before contributing a project.
- "Commit this file" or "Commit All" buttons
Rails (or Node.js) Web App for syncing data folders between Google Docs and Dropbox. No desktop client needed.
- OAuth (a must!)
- Dropbox API:
+ https://www.dropbox.com/developers/releases (OAuth)
+ http://github.com/riscfuture/dropbox (OAuth)
- Google Docs GData API:
+ http://code.google.com/apis/gdata/articles/gdata_on_rails.html (OAuth)
+ http://cookingandcoding.com/2010/04/28/gdocs4ruby-access-google-docs-api-with-ruby/
- "Google Docs" folder, be able to rename it
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- {{{ Variable definitions
@benoror
benoror / Capfile
Created March 3, 2011 03:26
File: benoror@macmini:~/simpleapp/Capfile
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
#For an unknown reason Capistrano can't load Thinking-Sphinx Recipes
#...so commenting out next line
#Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks
@benoror
benoror / deploy.rb
Created March 3, 2011 03:28
File: benoror@macmini:~/simpleapp/config/deploy.rb
default_run_options[:pty] = true
set :user, 'benoror'
set :domain, 'simpleapp.com'
set :application, 'simpleapp'
# the rest should be good
set :repository, "#{user}@#{domain}:#{application}.git"
set :deploy_to, "/home/#{user}/#{domain}"
set :deploy_via, :remote_cache
@benoror
benoror / user.rb
Created May 20, 2011 01:38
devise_invitable: Confirm after set password
class User < ActiveRecord::Base
devise :invitable, :database_authenticatable, :registerable, :recoverable,
:rememberable, :confirmable, :validatable, :encryptable
# ...
# devise confirm! method overriden
def confirm!
welcome_message
super
@benoror
benoror / metropoli_city_validator.rb
Created June 2, 2011 03:34
City Validator for Metropoli (github.com/innku/metropoli)
# lib/validators/metropoli_city_validator.rb
class MetropoliCityValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
record.errors[:base] << 'Ciudad no valida' if Metropoli::CityModel.with_values(value).empty?
end
end
Yes Startup User Insync.lnk C:\Users\benoror\AppData\Roaming\Insync\App\Insync.exe
Yes Startup User EvernoteTray.lnk C:\Program Files (x86)\Evernote\Evernote\EvernoteTray.exe
Yes Startup User Dropbox.lnk C:\Users\benoror\AppData\Roaming\Dropbox\bin\Dropbox.exe
Yes Startup Common Network Server.lnk C:\Program Files (x86)\WIBUKEY\Server\WkSvMgr.exe
Yes HKLM:Run MSC "c:\Program Files\Microsoft Security Client\msseces.exe" -hide -runkey
Yes HKLM:Run LogMeIn GUI "C:\Program Files (x86)\LogMeIn\x64\LogMeInSystray.exe"
Yes HKLM:Run ClipX C:\Program Files (x86)\ClipX\clipx.exe
Yes HKCU:RunOnce FlashPlayerUpdate C:\Windows\SysWOW64\Macromed\Flash\FlashUtil10o_Plugin.exe -update plugin
Yes HKCU:Run SpybotSD TeaTimer C:\Program Files (x86)\Spybot - Search & Destroy\TeaTimer.exe
Yes HKCU:Run GoogleDriveSync "C:\Program Files (x86)\Google\Drive\googledrivesync.exe" /autostart
@benoror
benoror / node-pate-example.js
Created January 23, 2015 17:36
node-pate example
var pate = require('node-pate');
pate.parse('{{ count/@type }} count: {{ count }}', '<data><row><count type="Bretzel">42</count></row></data>', '/*/*', function (err, data) {
console.log(data);
});
@benoror
benoror / node-pate-example2
Created January 24, 2015 00:42
node-pate-example2
var pate = require('node-pate');
var formatter = require('./format_lib.js');
var options = {
tpl: '{{ bread/@name }} price: $[[ formatMoney({{ bread/@price }}) ]] ([[ moneyToWords({{ bread/@price }}) ]])',
xml: '<data><row><bread name="Bretzel" price="42.56" /></row></data>',
xpath: '/*/*',
format_lib: formatter
};