The simplest implementation might look like this:
class ArrayUtils def self.multiplos(num, step) step.step(num * step, step).to_a end end
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration. | |
| You should not put any user code in this function besides modifying the variable | |
| values." | |
| (setq-default |
| (ns clara.compatibility | |
| (:require [clara.rules.accumulators :as acc] | |
| [clara.tools.tracing :as tracing] | |
| [clara.tools.inspect] | |
| [clara.rules :refer :all])) | |
| (defrecord Compatible [items]) | |
| (defrecord Incompatible [items]) | |
| (defrecord Protein []) |
| ;; (server-start) | |
| emacsclient --eval '(with-current-buffer "*scratch*" (insert "do you see me?"))' |
The simplest implementation might look like this:
class ArrayUtils def self.multiplos(num, step) step.step(num * step, step).to_a end end
| The simplest implementation might look like this: | |
| <!-- language: lang-ruby --> | |
| class ArrayUtils | |
| def self.multiplos(num, step) | |
| step.step(num * step, step).to_a | |
| end | |
| end |
| // custom error handling logic | |
| const retryThreeTimes = obs => | |
| obs.retry(3).catch(_ => Rx.Observable.of('ERROR!')); | |
| const examplePromise = val => | |
| new Promise(resolve => resolve(`Complete: ${val}`)); | |
| //faking request | |
| const subscribe = Rx.Observable.of('some_url') | |
| .mergeMap(url => examplePromise(url)) | |
| // could reuse error handling logic in multiple places with let |
Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]
| [click-loop-json] | |
| full_text=Click me! | |
| command=ruby -r json -n -e '$_ = JSON.parse($_)' -e '$_["full_text"] = "Click %s at (%d,%d)" % $_.slice("button", "x", "y").values' -e 'puts JSON.dump($_)' -e 'STDOUT.flush' | |
| interval=persist | |
| format=json |
| # [ib] | |
| # command=/home/nikita/.rbenv/shims/ruby /home/nikita/Projects/nikita-dotfiles/bin/ibb | |
| # interval=10 | |
| # format=json | |
| # frozen_string_literal: true | |
| require "bundler/setup" | |
| require_relative "../lib/ibb | |
| require 'json' |
| #!/usr/bin/expect | |
| set timeout 30 | |
| proc abort {} { exit 2 } | |
| spawn nc -C mail.example.org 25 | |
| expect default abort "220 " | |
| send "HELO example.com\r" | |
| expect default abort "\n250 " | |
| send "MAIL FROM:bar@example.org\r" |