Skip to content

Instantly share code, notes, and snippets.

View Spechal's full-sized avatar

Travis Crowder Spechal

  • Keyboard Jockey
  • Kansas City
  • 19:09 (UTC -06:00)
View GitHub Profile
class test ($opts = {default => 'value'}){
file { 'some/file':
content => template('test/file')
}
}
node test {
class { 'test':
opts => { some => 'thing' }
}
class varnish (
$base_dir = '/etc/varnish/',
$vcl_file = 'default.vcl',
$backends_file = 'default',
$vcl_template = 'default',
$storage = 'malloc',
$storage_size = '1G',
$thread_pools = 2,
$thread_pool_min = 2000,
$thread_pool_max = 4000,
Route::controller('login', 'LoginController');
Route::post('login', array('before' => 'csrf', 'LoginController@postIndex'));
Error:
call_user_func_array() expects parameter 1 to be a valid callback, no array or string given
open: /laravel/bootstrap/compiled.php
$this->callAfterFilters($request, $response);
}
return $response;
}
[root@server ~]# git svn clone --no-minimize-url --no-metadata -A /home/me/authors-transform.txt "svn+ssh://jenkins@server/svn/edge/project" project.git
... checking out ...
[root@server ~]# cd project.git
[root@server project.git]# ls -alh
total 24K
drwxrwxr-x 6 root root 4.0K Jul 31 10:34 .
drwxrwxr-x 3 root root 4.0K Jul 31 10:33 ..
drwxrwxr-x 4 root root 4.0K Jul 31 10:34 branches
[root@server svn-conv]# git svn clone --no-minimize-url --no-metadata -A /home/me/authors-transform.txt -T trunk -b branches -t tags "svn+ssh://jenkins@server/svn/edge/Internal - EDGE - PDFs" Internal-EDGE-PDFs.git
Initialized empty Git repository in /root/svn-conv/Internal-EDGE-PDFs.git/.git/
jenkins@server's password:
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/Internal - EDGE - PDFs'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
[root@server svn-conv]# cd Internal-EDGE-PDFs.git/
[root@server Internal-EDGE-PDFs.git]# ls alh
ls: cannot access alh: No such file or directory
[root@server Internal-EDGE-PDFs.git]# ls -alh
$ HOMEBREW_MAKE_JOBS=1 brew install -v squid 2>&1
==> Downloading http://www.squid-cache.org/Versions/v3/3.3/squid-3.3.10.tar.gz
Already downloaded: /Library/Caches/Homebrew/squid-3.3.10.tar.gz
tar xf /Library/Caches/Homebrew/squid-3.3.10.tar.gz
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/squid/3.3.10 --localstatedir=/usr/local/var --enable-ssl --enable-ssl-crtd --disable-eui --enable-ipfw-transparent
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... cfgaux/install-sh -c -d
checking for gawk... no
checking for mawk... no

ChefDK, Test Kitchen Driven NTP Cookbook

This gist uses TK+Berkshelf to drive creating a vagrant virts and converging a simple recipe to install and configure NTPd. This is a simple cookbook that has one recipe, one template (for ntp.conf) and one attribute file. It works on Ubuntu 12.04 and CentOS 6.4 (and derviatives) and the attribute file is used to support both distros.

This should work on Mac (where I developed it) and any chef-supported Linux that you can get Vagrant onto (Ubuntu/CentOS).

Because I use ChefDK and Test Kitchen, I can largely ignore setting up Vagrant and Berkshelf and can get right to work on writing recipe code.

NOTE: Modern (7/6/2014) Recipe Generation

@Spechal
Spechal / 1_kubernetes_on_macOS.md
Created August 6, 2018 20:57 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@Spechal
Spechal / osx_install.sh
Created August 17, 2018 15:58 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@Spechal
Spechal / 1. Install python3.6 & pip3.md
Created October 23, 2018 00:46 — forked from alyssaq/1. Install python3.7 & pip3.md
Python3.6 setup on Mac 10.13 (High Sierra)
  1. Install Python 3.6.x from https://www.python.org/downloads/ or via homebrew.
$ brew install python3   # Installed at /usr/local/Cellar/python3

Check that python3 has been installed by running it at the terminal:

$ python3
>>> Python 3.6.5
  1. Download get-pip.py from https://bootstrap.pypa.io/get-pip.py and install (this should already be installed if python was installed from python.org or homebrew):