Skip to content

Instantly share code, notes, and snippets.

View abuxton's full-sized avatar
💭
discombobulated as always

adam buxton abuxton

💭
discombobulated as always
View GitHub Profile

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

Step 1: Getting Clojure (1.3)

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@abuxton
abuxton / gist:4219eae36774f4b33789
Created November 29, 2015 12:35
url I keep losing
http://rosettacode.org/wiki/Multiline_shebang#Perl_6
@abuxton
abuxton / web-servers.md
Created January 29, 2017 11:45 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
manifests/service/pe/mountpoints.pp
class my_profile::service::pe::mountpoints{
if !defined(File['/opt/software']){
file{ '/opt/software/':
ensure => directory,
}
}
ini_setting { 'Create the software mountpoint':
ensure => present,
setting => 'path',
@abuxton
abuxton / deployment-tool-ansible-puppet-chef-salt.md
Created September 14, 2017 16:32 — forked from jaceklaskowski/deployment-tool-ansible-puppet-chef-salt.md
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution

@abuxton
abuxton / example.pp
Created November 2, 2017 12:23
using PQL with Package discovery in Puppet DSL
##
# example of how to use puppet package inventory to manage a package on a puppetized host.
# once puppet package inventory is populated puppet query langauge used puppetdb_query()
# version comparison is used to manage resource decleration
# querying a canary or example host can be used to drive patching this way
##
$cowsay_query = "package_inventory{ certname = '$fqdn' and package_name = 'cowsay' }"
### Monitoring and scaling
Puppet provide a module for exposing the Puppet metrics in an easy consumable command line client regardless of the infrastructure topology https://forge.puppet.com/puppetlabs/puppet_metrics_collector there is a companion module to provide visualisation of this data https://forge.puppet.com/puppetlabs/puppet_metrics_dashboard
What this exposes is the common metrics end points for Puppet https://puppet.com/docs/pe/2018.1/available_graphite_metrics.html#reference-3813
This is a companion and extension of the PuppetDB dashboard https://puppet.com/docs/puppetdb/5.1/maintain_and_tune.html#monitor-the-performance-dashboard and experimental developer dashboard https://puppet.com/docs/puppetserver/5.1/puppet_server_metrics.html#accessing-the-developer-dashboard
What this looks like in regards system health is as follows;
* Run times will spike by orders of magnitude.
* Timeouts when retrieving catalogs. Monitor server metrics:
@abuxton
abuxton / GitHub-Forking.md
Created July 24, 2019 10:13 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

nokogiri install help as i never remeber
https://nokogiri.org/tutorials/installing_nokogiri.html#macos
gem update --system
xcode-select --install
brew install libxml2
```sh
brew install libxml2
# If installing directly