Skip to content

Instantly share code, notes, and snippets.

View runswithd6s's full-sized avatar

Chad Walstrom runswithd6s

View GitHub Profile
@runswithd6s
runswithd6s / config_overrides.sls
Last active June 27, 2019 21:06
Failing salt state formula
# Salt 2017.07
{% if pillar['db_reports_host'] %}
replace-db-reports-sugar-config-overrides-file:
file.blockreplace:
- path: /vol/sugar_shared_files/config_override.php
- content: |
$sugar_config['db']['reports'] = array(
'db_host_name' => '{{ pillar['db_reports_host'] }}',
'db_user_name' => '{{ pillar['db_reports_user'] }}',
'db_password' => '{{ pillar['db_reports_password'] }}',
@runswithd6s
runswithd6s / sugar_app.py
Created June 21, 2019 21:24
Saltstack grain for SugarCRM
#!/usr/bin/env python
import json
import os
def sugar_app():
"""
Set version information about sugar, if /vol/sugar_pro/sugar_version.json is available
:return: dict
@runswithd6s
runswithd6s / *messages*
Created July 18, 2018 15:00
Fulcro in Emacs25 with CIDER
[nREPL] Starting server via /home/cwalstrom/bin/lein update-in :dependencies conj \[org.clojure/tools.nrepl\ \"0.2.13\"\ \:exclusions\ \[org.clojure/clojure\]\] -- update-in :plugins conj \[refactor-nrepl\ \"2.4.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.18.0-SNAPSHOT\"\] -- repl :headless :host ::...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: [WARNING] No nREPL middleware descriptor in metadata of [#function[clojure.core/comp/fn--5529]], see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of [#function[clojure.core/comp/fn--5529]], see clojure.tools.middleware/set-descriptor!
Exception in thread "main" java.lang.IllegalArgumentException: Key must be integer, compiling:(/tmp/form-init8008431120095512647.clj:1:73)
at clojure.lang.Compiler.load(Compiler.java:7526)
at clojure.lang.Compiler.loadFile(Compiler.java:7452)
at clojure.main$load_script.invokeStatic(main.clj:278)
at clojure.main$init_opt.invoke
@runswithd6s
runswithd6s / ssh-auth-sock-gist.el
Created April 5, 2018 14:06
SSH Authentication Sock for Emacs
;; -*- mode: lisp-interactive -*-
;;;; Set the SSH authentication sock file for processes in Emacs to find for
;;;; TRAMP and git operations...
;; What we want to happen
(setenv "SSH_AUTH_SOCK" "/run/user/1000/keyring/ssh")
;; Getting my user id
(user-real-uid)
@runswithd6s
runswithd6s / keybase.md
Created January 28, 2017 17:36
Keybase Integration

Keybase proof

I hereby claim:

  • I am runswithd6s on github.
  • I am runswithd6s (https://keybase.io/runswithd6s) on keybase.
  • I have a public key ASDxaTHsVOU1E60NwMV5CDHRhDkpmT0UeCwaDlaVDKo76Ao

To claim this, I am signing this object:

@runswithd6s
runswithd6s / etc_default_keyboard
Last active August 29, 2015 14:23
Switching keyboard layout with International Unicode and nocaps
# /etc/default/keyboard
XKBMODEL="pc105"
XKBLAYOUT="us,epo,de"
KBVARIANT="intl-unicode,basic"
XKBOPTIONS="ctrl:nocaps,grp:shifts_toggle,grp_led:caps"
@runswithd6s
runswithd6s / pagerduty-nagios-pl.spec
Last active August 29, 2015 14:08
pagerduty-nagios-pl.spec File
# Currently, there is no version tag from Github
%global commit 6fecda34c8328487f0b0b256f51bfb1697179342
%global shortcommit %(echo %{commit}| head -c7)
Summary: Submit Nagios Host and Service events to PagerDuty
Name: pagerduty-nagios-pl
Version: 0.0
Release: 1.%{shortcommit}%{?dist}
License: BSD
Group: Applications/System
@runswithd6s
runswithd6s / gd-mta::sendmail.pp
Last active August 29, 2015 14:04
Sendmail config files by location, environment, and hostgroup
# 3.2.4 (Puppet Enterprise 3.0.1)
create_resources('gd-mta::sendmail::copy_to_mail', {
access => {},
aliases => {},
authinfo => { mode => '0440' },
domaintable => {},
local-host-names => {},
mailertable => {},
relay-domains => {}
})
@runswithd6s
runswithd6s / tomcat.pp
Created July 11, 2014 18:41
Upgrading Tomcat Ideas
class profiles::tomcat (
$package_name = 'tomcat6',
$service_name = 'tomcat6',
$ensure = present
) {
package{'tomcat':
name => $package_name,
ensure => present,
}
@runswithd6s
runswithd6s / stdlib-delete-test.pp
Last active August 29, 2015 14:03
puppetlabs/stdlib and delete on undef elements
$array1 = undef
$array2 = ['a','b','c']
$array3 = [$array1, $array2]
$flat = flatten([$array3])
$pruned = delete($flat,undef)
$plist = join($pruned,',')
notice("Pruned array contains ${plist}")
# Expected Result - order not guaranteed
# "Pruned array contains a,b,c"