brew install redis
Set up launchctl to auto start redis
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)
| require 'csv' | |
| CSV.open('name.csv', "wb") do |csv| | |
| csv << data.first.keys | |
| data.each do |row| | |
| csv << row.values | |
| end | |
| end |
| - describe NameOfClass | |
| -- describe 'constantants' | |
| -- describe '.method_a' | |
| -- describe '#method_b' | |
| --- let!(:a) | |
| --- let(:b) | |
| --- before | |
| --- after | |
| --- subject | |
| --- shared_examples |
| new Promise(function(resolve, reject) { | |
| console.log(1) | |
| resolve() | |
| }) | |
| .then(() => console.log(2)) | |
| .then(() => { | |
| return new Promise(function(resolve, reject) { | |
| reject(new Error('Polling failure')); | |
| }) | |
| .then(() => console.log(21)) |
| class GRPC::BadStatus | |
| def self.descendants | |
| ObjectSpace.each_object(Class).select { |klass| klass < self } | |
| end | |
| end | |
| GRPC::BadStatus.descendants |
| RSpec::Matchers.define :be_url do |expected| | |
| match do |actual| | |
| actual =~ URI::regexp | |
| end | |
| end |
| { | |
| "font_size": 10, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ], | |
| "rulers": | |
| [ | |
| 120 | |
| ], |
| check host website.com with address 0.25.118.0 | |
| if failed | |
| port 443 | |
| protocol https | |
| request "/search?word=black" | |
| status = 200 | |
| then exec "/bin/bash -c '/var/www/lib_agregator/import_elastic.sh'" |
| class WriteTemporaryFile | |
| class Remover | |
| def initialize(tmpfile) | |
| @pid = Process.pid | |
| @tmpfile = tmpfile | |
| end | |
| def call(*args) | |
| return if @pid != Process.pid |
Thoughts about module Callable.
Lets assume that we have a service:
class SomeService
include Callable
def initialize(parameter)
@parameter = parameter
end