This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: '/categories.json', | |
type: 'get', | |
contentType: 'application/json;', | |
success: function(msg,a) { | |
$('#product_category_id').empty(); | |
options=""; | |
$.each(msg, function(){ | |
options+= '<option value="'+this.category.id+'">'+this.category.name+'</option>'; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jquery dialog - display the "OK" button in a disabled state | |
* removes the function from the button and adds the class "ui-state-disabled" | |
*/ | |
if(data.length>0){ | |
options=""; | |
$.each(data, function(i, product){ | |
if(product.product.id!=product_id){ | |
options+= '<option value="'+product.product.id+'">'+product.product.name+'</option>'; | |
}else{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/foreigner.rb b/lib/foreigner.rb | |
index 540657a..2eb55aa 100644 | |
--- a/lib/foreigner.rb | |
+++ b/lib/foreigner.rb | |
@@ -19,6 +19,14 @@ module Foreigner | |
end | |
def configured_adapter | |
+ if !ActiveRecord::Base.connected? | |
+ if Rails.application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Gemfile | |
gem 'sinatra' | |
#config.ru | |
require 'rubygems' | |
require 'bundler' | |
Bundler.require | |
require './my_sinatra_app' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HTML | |
<script type="text/html"> | |
<table> | |
<tr><th>Column One</th><th>Column Two</th></tr> | |
{{#collection App.CollectionView tagName="tbody"}} | |
<td>{{content.column_one}}</td><td>{{content.column_two}}</td> | |
{{/collection}} | |
</table> | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/capistrano' | |
set :application, "videonight" | |
set :repository, "git://github.com/RainerBlessing/Videonight.git" | |
set :scm, :git | |
# Prevents error if not parameter passed, assumes that default 'cap deploy' command | |
# and should deploy the master branch to the production server | |
set(:env, 'production') unless exists?(:env) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = require('url'); | |
var fs = require('fs'); | |
var HTTPSStub = function(){ | |
var handlers={}; | |
var get = function(optionsget, callback){ | |
var p = url.parse(optionsget.path,true); | |
console.log(p.pathname); | |
console.log(p.query); | |
var res = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These two files should help you to import passwords from mac OS X keychains to 1password. | |
Assumptions: | |
1) You have some experience with scripting/are a power-user. These scripts worked for me | |
but they haven't been extensively tested and if they don't work, you're on your own! | |
Please read this whole document before starting this process. If any of it seems | |
incomprehensible/frightening/over your head please do not use these scripts. You will | |
probably do something Very Bad and I wouldn't want that. | |
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous | |
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UNFINISHED! | |
# | |
#Install Oracle XE: http://meandmyubuntulinux.blogspot.ca/2012/05/installing-oracle-11g-r2-express.html | |
# + http://meandmyubuntulinux.blogspot.de/2012/06/trouble-shooting-oracle-11g.html | |
#mkdir /var/lock/subsys | |
#/etc/init.d/oracle-xe start | |
#create Intershop user: | |
#sqlplus sys as sysdba | |
#create user intershop identified by <password>; | |
#grant all privileges to intershop; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install sinatra | |
gem install dalli | |
gem install redis | |
gem install aboutyou-sdk |
OlderNewer