- NVD3 (http://nvd3.org/)
- Initial evaluation: seems the most mature. Apparently, has bad documentation, and is hard to use without going to its source code.
- dimple (http://dimplejs.org/)
- Initial evaluation: its main goal is to offer a simple API to create charts
- C3.js (http://c3js.org/)
- Initial evaluation: highly customizable charting API.
- xCharts (http://tenxer.github.io/xcharts/)
- Initial evaluation: "designed to be dynamic, fluid, and open to integrations and customization" seems to have a rather complex API though
- Vega (http://trifacta.github.io/vega/)
- Initial evaluation: intends to generate data visualizations from a JSON document. Charts can be generated server-side. Has an online editor http://trifacta.github.io/vega/editor/
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
class CustomSearch < Spree::Core::Search::Base | |
protected | |
def add_search_scopes(base_scope) | |
statement = nil | |
search.each do |property_name, property_values| | |
property = Spree::Property.find_by_name(property_name.gsub("_any", "")) | |
next unless property | |
substatement = product_property[:property_id].eq(property.id).and(product_property[:value].eq(property_values.first)) |
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
puts current_url | |
require 'pry'; binding.pry |
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
# main_app/lib/tasks/load_model.rake | |
namespace :db do | |
namespace :mongoid do | |
# include models from engine | |
task :load_models do | |
Scraper::Engine.config.paths['app/models'].to_a.each do |path| | |
preload = ::Mongoid.preload_models | |
if preload.resizable? | |
files = preload.map { |model| "#{path}/#{model}.rb" } |
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
echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge |
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
version of V8 used by current NodeJS | |
node -p process.versions.v8 | |
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
* start android virtual device | |
android avd | |
* list all SDKs | |
android list sdk -a | |
* install 3rd SDK from that list | |
android update sdk -a -u -t 3 | |
* Linux-based systems support VM acceleration through the KVM software package, check availability of KVM |
https://virtuslab.com/blog/scalamock-macros-strike-back/
- Cannot mock class without parameterless constructor
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
chrome://serviceworker-internals/ | |
chrome://appcache-internals/ |
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
## Disk management | |
# how big is your apt cache: | |
du -sh /var/cache/apt/archives | |
# remove old kernels (if no longer required) | |
sudo apt-get autoremove --purge | |
# list all directories and sort by size | |
du -m --max-depth 1 | sort -rn |
OlderNewer