How do I run an R script from within RStudio's built-in R console?
I'm assuming it's like Python's import statement, but I'd like a quick answer, since I'm in the middle of an introduction class right now. This was the closest I got, but it didn't seem to match the...
View ArticleAnswer by Nathan Basanese for How do I run an R script from within RStudio's...
Short Answer using source() function Once you download, install, and open the RStudio, you'll see a part in the lower left with blue greater than symbols >. In the part of RStudio's GUI with the...
View ArticleHow do I separate stages of multi-machine cluster provisioning?
Let's say I have 4 Vagrant boxes. 3 are variations of the same configuration, say, Consul, and one has a completely different configuration, say a database. I need to run a provisioning step with...
View ArticleAnswer by Nathan Basanese for How do I script a "yes" response for installing...
You might not have the ability to install Expect on the target server. This is often the case when one writes, say, a Jenkins job. If so, I would consider something like the answer to the following on...
View ArticleHow do we register a PCF Service Broker as reachable from two spaces in the...
How do I register a Pivotal Cloud Foundry Service Broker to make it accessible from multiple spaces within the same Organization, if I have Org-level permissions? We tried to register a PCF Service...
View ArticleIn the HashiCorp Vault docs, "Lease IDs" are mentioned several times. How do...
In the Vault Web UI, under "Access", it shows the ability to look up leases by "Lease ID": If you know the id of a lease, enter it above to lookup details of the lease. How do I get "the id of a...
View ArticleAnswer by Nathan Basanese for How to implement Hasicorp vault 3 node cluster?
The Vault Deployment guide has more on this. https://learn.hashicorp.com/vault/operations/ops-deployment-guide#help-and-reference Combine it with this guide:...
View ArticleAnswer by Nathan Basanese for How do I require login authentication to access...
8500 is the default port for Consul, not Vault. Are you sure it's not Consul? For reference, here are the default UIs for Consul and Vault, respectively: Consul (Port 8500) Vault (Port 8200) Please add...
View ArticleAnswer by Nathan Basanese for Jinja2 for word templating
https://pypi.org/project/docxtpl/ is also a good alternative. It extends python-docx, and allows you to just drop in Jinja2 tags wherever you want in an existing .docx document, rather than templating...
View ArticleAnswer by Nathan Basanese for Remove Chrome extension via code
Let's say you really, really need to do this from the command line, and only the command line, or from another system far far away entirely. Somehow that situation keeps coming up for people... can't...
View ArticleAnswer by Nathan Basanese for virtualenv looking in the wrong place for...
I compiled my own Python 3, then installed virtualenvwrapper. But after I switched from compiling my own Python to using the deadsnakes PPA I ran into the issue described in the question above. Seems...
View ArticleAnswer by Nathan Basanese for Steps to be followed to run vault as a service(...
First, get a Consul Backend in place. Add this file to /etc/vault.d/vault.hcl: storage "consul" { address = "127.0.0.1:8500" path = "vault/" } listener "tcp" { address = "127.0.0.1:8200" tls_disable =...
View ArticleAnswer by Nathan Basanese for Redis connection based on latency
Can we assume that you're using Redis 3+? If so, CLUSTER NODES is your friend. For a horrible bash example, on a Redis server with Puppet's facter installed, INITMASTER1ID=$(redis-cli -h $(facter...
View ArticleChange to logging.basicConfig(level=logging.DEBUG) while executing Python...
// , The one line answer to "how do I set my logging level to debug?" is usually something like the following: logging.basicConfig(level=logging.DEBUG) However, one may be tempted to change it later,...
View ArticleAnswer by Nathan Basanese for Change to...
logging.disable(logging.INFO) → disable messages at logging.INFO and lower, until... logging.disable(logging.NOTSET) → resume normal logging Link:...
View ArticleAnswer by Nathan Basanese for virtualenv error: "'.../bin/easy_install' not...
This issue is related to having an outdated version of Pip, I think. I got a similar error on CEntOS 6.3. I suggest at least attempting to bootstrap a virtual environment. If it doesn't work, all you...
View ArticleIf I cut a network cable and split a ReDiS cluster's masters from that...
More specifically, let us say that I trip on a network cable and split a ReDiS cluster's masters from that cluster's ReDiS slaves. If the number of masters doubles, can I just make my client only...
View ArticleMultiline comment in Elixir
Most languages allow block comments, and multiline commands. For example, a multiline comment in HTML looks like the following: <!-- Warning, brave programmer: Here be dragons. --> In Elixir,...
View ArticleJavaScript console.log causes error: "Synchronous XMLHttpRequest on the main...
I have been adding logs to the console to check the status of different variables without using the Firefox debugger. However, in many places in which I add a console.log in my main.js file, I receive...
View ArticleHow can I make multiple replacements on the same file using one saltstack state?
Here's my target file: Sonatype Nexus # ============== # This is the most basic configuration of Nexus. # Jetty section application-port=8081 application-host=0.0.0.0...
View Article