Author: Ari Lerner.
AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:
- Module support
- DOM manipulation
- Animations
- Templating
Author: Ari Lerner.
AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:
| require 'yaml' | |
| require 'erb' | |
| require 'ostruct' | |
| class Settings < OpenStruct | |
| # Settings.new(:google_analytics) | |
| def initialize(config_file_base_name) | |
| super(YAML.load(ERB.new(File.read(Rails.root.join("config", "#{config_file_base_name}.yml"))).result)[Rails.env]) | |
| end |
| //= require jquery | |
| //= require best_in_place | |
| //= require jquery.purr | |
| //= require active_admin/base | |
| $(document).ready(function() { | |
| $(".best_in_place").best_in_place() | |
| $('.best_in_place').bind("ajax:success", function () {$(this).closest('tr').effect('highlight'); }); | |
| $(document).on('best_in_place:error', function(event, request, error) { |
| //....add this in app/assets/javascript/active_admin.js | |
| $(function(){ | |
| // CONFIGURE PANELS COLLAPSER | |
| $(".panel[data-panel]").each(function(){ | |
| var $this = $(this); | |
| var $a = $("<a href='javascript:void(null)'>").on("click",function(event){ | |
| $(this).closest(".panel").find(".panel_contents").each(function(){ | |
| $(this).slideToggle(); | |
| }); | |
| $(this).closest("h3").each(function(){ |
If you just want to fix the issue quickly, scroll down to the "solution" section below.
If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:
$ npm update npm -g
| mongod --dbpath ~/code/Involvio/mongo --setParameter textSearchEnabled=true |
| # rbtrace -p PID -e 'Thread.new{require "objspace"; ObjectSpace.trace_object_allocations_start; GC.start(); ObjectSpace.dump_all(output: File.open("heap_#{Time.now.to_i}.json", "w"))}.join' | |
| # Gather three snapshots | |
| # Remove common objects in snapshot 1 from snapshot 2 | |
| # Remove missing objects in snapshot 3 from snapshot 2 | |
| #!/usr/bin/env ruby | |
| require 'set' | |
| require 'json' | |
| if ARGV.length != 3 |