- ✅ Full integration with NornicDB's memory bank
- ✅ Graph functions enable multi-hop reasoning
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
- Add remote_syslog to your Gemfile
- Add
papertrail.raketolib/tasks - Add
remote_syslog.ymltoconfig/ - Add
before_restart.rbtodeploy/ - Set the
PAPERTRAIL_PORTENV var to the one provided by Papertrail for your system
Inspiration from Scott W. Bradley
This file contains hidden or 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 'net/http' | |
| # WARNING do not use this; it works but is very limited | |
| def resolve url | |
| res = Net::HTTP.get_response URI(url) | |
| if res.code == '301' then res['location'] | |
| else url.to_s | |
| end | |
| end |
This file contains hidden or 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 "etc" | |
| require "thread" | |
| Enumerator.class_eval do | |
| # Process an enumerator using a simple thread pool | |
| # | |
| # `of:` is pool size, defaults to detecting number of CPUs | |
| # | |
| # Caveat: Enumerator#map may yield results out of order. Work is processed in | |
| # order, but apparently #map concatenates the results however it likes. This |
This file contains hidden or 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
| /* Build this with: | |
| * gcc desktopsearch.m -o desktopsearch -ObjC -framework Cocoa | |
| */ | |
| #include <Cocoa/Cocoa.h> | |
| int main(int argc, char** argv) { | |
| NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
| if (argc == 2) { |
This file contains hidden or 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
| # minimal rails3 app | |
| require 'action_controller' | |
| Router = ActionDispatch::Routing::RouteSet.new | |
| Router.draw do | |
| root :to => 'site#index' | |
| end | |
| class SiteController < ActionController::Metal |
This file contains hidden or 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
| if ENV['RAILS_ENV'] && !defined?(RAILS_ENV) | |
| Object.const_set("RAILS_ENV", ENV['RAILS_ENV']) | |
| end | |
| # Require any additional compass plugins here. | |
| require 'grid-coordinates' | |
| require 'compass-fancybox-plugin' | |
| require 'susy' | |
| project_type = :rails |
