Skip to content

Instantly share code, notes, and snippets.

@sbauch
sbauch / boot nav stick
Created August 4, 2012 22:20
botostrap navbar sticky
<script> $("section[id]").each(function(idx, el){
var position = $(this).position();
$(this).scrollspy({
min: position.top + 40,
max: position.top + $(this).height(),
onEnter: function(element, position) {
if(console) console.log('entering ' + element.id);
$("div#navbar_to_change").addClass("navbar-fixed-top");
// if ( !primaryNav.hasClass("lock") ) {
// var navLi = $("ul#primary_nav a[href*='#"+element.id+"']").parent();
<script>
if(window.opener) {
window.opener.location.reload(true);
window.close()
}
</script>
require 'yaml'
d = Dir["./**/*.yml"]
d.each do |file|
begin
puts "checking : #{file}"
f = YAML.load_file(file)
rescue Exception
puts "failed to read #{file}: #{$!}"
end
development:
adapter: postgresql
database: samplrs_development
pool: 5
timeout: 5000
username: Sam
password:
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".