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
# /srv/salt/upgrade_the_app.sls | |
# Example of a complex, multi-host Orchestration state that performs status checks as it goes. | |
# Note, this is untested and is meant to serve as an example. | |
# Run via: salt-run state.orch upgrade_the_app pillar='{nodes: [nodeA, nodeB], version: 123}' | |
{% set nodes = salt.pillar.get('nodes', []) %} | |
{% set all_grains = salt.saltutil.runner('cache.grains', | |
tgt=','.join(nodes), tgt_type='list') %} | |
{# Default version if not given at the CLI. #} |
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
## Using Emacs CIDER as the Figwheel REPL tool | |
project.clj should have this line: | |
``` | |
:figwheel { :nrepl-port 7888 } | |
``` | |
At the defproject-level. | |
It enables external tools to connect to the Figwheel REPL. To connect |
Earlier today I was looking for a Saltstack mode for emacs. Couldn't find one, so I posted the question on Stack overflow. Somebody had a good suggestion about using yaml-mode because a Sublime Text implementation appeared to be taking this approach.Another person thought that Saltstack's use of jinja templates would make an emacs mode easy enough to configure. These were both helpful ideas so I wanted to implement parts of each.
After looking around, I found that someone had configured an emacs mode for a similar situation. They needed to combine HTML and Python to use Mako templates for a project not involving Saltstack. Since Edx uses Mako t
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
(defprotocol IEditName | |
(get-name [this]) | |
(set-name! [this val])) | |
(deftype PersonName [^:volatile-mutable lname] | |
IEditName | |
(get-name [this] (. this lname)) | |
(set-name! [this val] (set! lname val))) | |
(def pname (PersonName. "hoge")) |
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
require 'formula' | |
# Major releases of erlang should typically start out as separate formula in | |
# Homebrew-versions, and only be merged to master when things like couchdb and | |
# elixir are compatible. | |
class Erlang < Formula | |
homepage 'http://www.erlang.org' | |
# Download tarball from GitHub; it is served faster than the official tarball. | |
url 'https://github.com/erlang/otp/archive/OTP_R16B03-1.tar.gz' | |
sha1 'b8f6ff90d9eb766984bb63bf553c3be72674d970' |
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
require 'rbvmomi' | |
class KnifeVspherePlugin | |
def data=(cplugin_data) | |
@mac_address = cplugin_data | |
end | |
def reconfig_vm(target_vm) | |
if (!@mac_address) | |
abort ("MAC address not provided") |