Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<project>
<node name="localhost" description="Rundeck server node" tags="" hostname="localhost" osArch="amd64" osFamily="unix" osName="Linux" osVersion="3.10.0-327.22.2.el7.x86_64" username="rundeck"/>
<node name="App1" description="Application Server 1" tags="" hostname="192.168.50.51" osArch="amd64" osFamily="unix" osName="Linux" osVersion="3.10.0-327.22.2.el7.x86_64" username="vagrant" />
</project>
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
config.vm.define "rundeck" do |rundeck|
rundeck.vm.box = "geerlingguy/centos7"
public function up()
{
$users = $this->table('users');
$users->addColumn('first_name', 'string', array('limit' => 30))
->addColumn('last_name', 'string', array('limit' => 30))
->addColumn('created', 'datetime')
->addColumn('updated', 'datetime', array('null' => true))
->save();
}
public function change()
{
$users = $this->table('users');
$users->addColumn('first_name', 'string', array('limit' => 30))
->addColumn('last_name', 'string', array('limit' => 30))
->addColumn('created', 'datetime')
->addColumn('updated', 'datetime', array('null' => true))
->save();
}
@glynrob
glynrob / Strike Profile
Created January 24, 2015 15:56
An example of a strike profile with function
def gen_rand_string
o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten
(0...50).map { o[rand(o.length)] }.join
end
table :Users do |t|
t.display_name :name
t.email :email
t.password type: :string, string: gen_rand_string
-----BEGIN PGP MESSAGE-----
Comment: GPGTools - https://gpgtools.org
hQEMA1+MLrRmwfKVAQf/RBYqavXP9k5zD7WjExmxSxMvxcBfT3lm9oGYznvCBSW4
3DV4Z8GUGD34DK/wmIZH/IoN5Ka7TvyPyg84Jzu/VA+GX8dw8nC5WIG7pS16LXvb
UrhMxAL3t90TUrbXTfKjTFK9fbGKrqaIG9/ueaFyiXhUeMUvynh+muZVkwplStnH
nhSwryA0QJTv2Wj0h42vRw6G1hR/v3Q2XmuRXKySed5Vj47JW+HFXuhKJt/8jRWN
hNfFOENtsAmD5RD15gUhyhFSCC4vu5jCgEbJ3cArk394/FdUes3lVBF2Df9fEtvQ
namQ5PSy6g9L8DfBRDJpW24xJAGZEpP6x+qcHbW9w4UBDAPYfPBoeNrwBAEH/jTm
VumjdpEKnEtHrA8ozgVXOho8uZhc1pQYRjU5XLmvjeETB/13EjrXWl6qinoGmk0k
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
This is a secure email
Glyn
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org
iQEcBAEBCgAGBQJUXhEZAAoJEE5sMXAeZzfRTkMH/0sebaz8xynnIV9M+9KmYzAX
This is a secure email
Glyn
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
type = cat-file -t
dump = cat-file -p
tree = log --graph --full-history --all --color --date=short --pretty=format:\"%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset\"