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
def loop_with_delay(f, delay_in_secs=60): | |
"""Infinite loop with introduced delay between invocations. | |
Equivalent to the following construct: | |
while True: | |
f() | |
time.sleep(delay_in_secs) | |
""" | |
def wrapped(): | |
f() |
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
def parseRequest(req : String) : Map[String, Any] = { | |
Map("x" -> parseX(req), | |
"y" -> parseY(req)) | |
} | |
def parseX(req : String) : Option[X] = { | |
... | |
} | |
def parseY(req : String) : Option[Y] = { |
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
camila.node> (handshake "u@u" "bob") | |
{:status ok} | |
{:name bob@Ulisess-MacBook-Pro, :challenge 3065769371, :flags 32764, :version1 5, :version0 0} | |
<< <== […] >> | |
camila.node> |
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
;;; erlang quickfixes | |
(defvar quickfix-undefined-fn-re | |
"^function \\(\\w+\\)/\\([0-9]+\\) undefined$" | |
"Regexp to test whether the flymake error is about an undefined function.") | |
(defvar quickfix-erlang-fn-skeleton | |
"%s(%s) ->" | |
"Skeleton for defining an erlang function.") | |
(defun quickfix-get-flymake-issue-at-point () |
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
(defvar quickfix-mode-hook nil) | |
(defvar quickfix-mode-map | |
(let ((map (make-keymap))) | |
(define-key map (kbd "C-c C-f") 'quickfix-at-point) | |
map) | |
"Keymap from quickfix minor mode") | |
(defvar quickfix-mode-handlers | |
(make-hash-table :test 'equal) |
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
(defun handler (issue-at-point) | |
;; aca va la magia para arreglar el problema) | |
;; quickfix-when-text-matches es una funcion que te matchea una regexp | |
;; con el error reportado por flymake | |
(defvar predicate | |
(quickfix-when-text-matches quickfix-undefined-fn-re "define")) | |
;; aca se registra el handler | |
(quickfix-add-handler undefined-fn-predicate 'handler) |
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
;;; erlang quickfixes | |
(defvar quickfix-undefined-fn-re | |
"^function \\(\\w+\\)/\\([0-9]+\\) undefined$" | |
"Regexp to test whether the flymake error is about an undefined function.") | |
(defvar quickfix-erlang-fn-skeleton | |
"%s(%s) ->" | |
"Skeleton for defining an erlang function.") | |
(defun quickfix-get-undefined-function-name-and-arity-at-point (issue-at-point) |
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
Could not find artifact riemann:riemann:jar:0.1.6-SNAPSHOT in clojars (https://clojars.org/repo/) | |
This could be due to a typo in :dependencies or network issues. | |
Could not resolve dependencies |
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
from __future__ import with_statement | |
from fabric.api import local, parallel, env | |
import time | |
env.hosts = ["localhost", "localhost", "localhost"] | |
@parallel | |
def foo(): |
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
from __future__ import with_statement | |
from fabric.api import run, parallel, env | |
import time | |
env.hosts = ["localhost", "localhost", "localhost", "localhost", "localhost", "localhost"] | |
@parallel | |
def foo(): |
OlderNewer