pandoc -f markdown -t html5 -o output.html input.md -c style.cssSteps to get Rails 4 saving its output to Syslog via Rsyslog. This assumes you are on CentOS, but should be pretty adaptable to any other distribution. Ruby 2.0+ is also required.
- Add the gems
logrageandlogstash-eventto yourGemfile. Feel free to remove fromproductionif you'd like to test it indevelopmentas well or something. - Update
production.rbwith thelogragesettings and set theloggertoSyslog::Logger. - Add the
conffiles to/etc/rsyslog.d/./etc/rsyslog.confshould have$IncludeConfig /etc/rsyslog.d/*.confenabled, so it will load any additional configs from/etc/rsyslog.conf.
| #!/usr/bin/env python2 | |
| """ | |
| Author: takeshix <takeshix@adversec.com> | |
| PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org). | |
| Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP. | |
| """ | |
| import sys,struct,socket | |
| from argparse import ArgumentParser |
| require "i18n/backend/pluralization" | |
| I18n::Backend::Simple.send(:include, I18n::Backend::Pluralization) |
One of the problems with advancing the discussion on DCI is that we lack a comparable alternative pattern that has the same goals, but favors a low ceremony approach. The closest thing we have to that is Rails concerns, but they are more like distant relatives of the DCI concepts rather than first cousins, and that makes comparisions between the two approaches not especially fruitful.
I am considering the idea of experimenting with my own paradigm that captures the intent and purity of DCI, but with the convenience of concerns. Please note that this is just the starting point of a conversation, it is NOT a promise of comercially available cold fusion or a cure for cancer. It's just a gist with an idea on it I'd like to hear your thoughts on.
What if we had a top-level topology that was split into Models, **Rol
| task :workers => :environment do | |
| module Delayed | |
| class Worker | |
| def name_with_thread_id(*a, &b) | |
| name_without_thread_id(*a, &b) + " thread:#{Thread.current.object_id}" | |
| end | |
| alias_method_chain :name, :thread_id | |
| end | |
| end | |
| Rails.logger.info "Running threaded worker env." |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| ## Prepare ################################################################### | |
| # Remove RVM | |
| rvm implode | |
| # Ensure your homebrew is working properly and up to date | |
| brew doctor | |
| brew update | |
| ## Install ################################################################### |