Skip to content

Instantly share code, notes, and snippets.

View Phelms215's full-sized avatar

Patrick Helms Phelms215

View GitHub Profile
<?PHP
//
// Function Name: index
// Description: Display the system's dashboard
//
public function JSON() {
$key = $this->input->get("key");
$this->control->load_custom("Chef", array($this->config->item('chef_server'),
$this->config->item('chef_port'),
updateList = node["UPDATES"]
updateList.each do |(key,x)|
puts x['Name']
updateTime = Time.at( x["Time"].to_i / 1000 )
t1 = Time.now
now = Time.at(t1.to_i)
puts updateTime
if !File.exist?('C://chef//cache//WUInstall.ps1')
cookbook_file "WUInstall.ps1" do
source "WUInstall.ps1"
backup false
inherits true
action :create_if_missing # Not always working - throws error randomly if file exists
path 'C:\\Windows\\SoftwareDistribution\\WUInstall.ps1'
end #end cookbook_file
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/yajl-ruby-1.2.1/lib/yajl.rb:37:in `parse': lexical error: invalid char
in json text. (Yajl::ParseError)
ÿ_{ (right here) ------^
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/yajl-ruby-1.2.1/lib/yajl.rb:37:in `parse'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8-x86-mingw32/lib/chef/json_compat.rb:56:in `from_json'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8-x86-mingw32/lib/chef/config_fetcher.rb:20:in `fetch_json'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8-x86-mingw32/lib/chef/application/client.rb:261:in `reconfigure'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8-x86-mingw32/lib/chef/application.rb:65:in `run'
from C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.8-x86-mingw32/bin/chef-client:26:in `<top (required)>'
from C:/opscode/chef/bin/chef-client:23:in `load'
{"run_list":["recipe[getting-started]"]}
chef-client --json-attributes C:\chef\firstboot.json --environment Preview --server Https://notreallytheurl:443
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: chef-dereg
# Required-Start: $local_fs $network
# Required-Stop:
# Default-Start: 0
# Default-Stop:
# Short-Description: chef-dereg
140910 13:59:37 mysqld_safe Starting mysqld daemon with databases from /mnt/data/geo
140910 13:59:37 mysqld_safe WSREP: Running position recovery with --log_error='/mnt/data/geo/wsrep_recovery.UUnScz' --pid-file='/mnt/data/geo/ip-10-200-200-20-recover.pid'
140910 13:59:41 mysqld_safe WSREP: Recovered position 793fe80a-b316-11e2-0800-0198ce0bf65f:74027509
140910 13:59:41 [Note] WSREP: wsrep_start_position var submitted: '793fe80a-b316-11e2-0800-0198ce0bf65f:74027509'
140910 13:59:41 [Note] WSREP: Read nil XID from storage engines, skipping position init
140910 13:59:41 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/libgalera_smm.so'
140910 13:59:41 [Note] WSREP: wsrep_load(): Galera 2.11(r318911d) by Codership Oy <info@codership.com> loaded successfully.
140910 13:59:41 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1
140910 13:59:41 [Note] WSREP: Reusing existing '/mnt/data/geo//galera.cache'.
140910 13:59:41 [Note] WSREP: Passing config to GCS: base_host = 10.200.200
140910 14:09:29 mysqld_safe Starting mysqld daemon with databases from /mnt/data/geo
140910 14:09:29 mysqld_safe WSREP: Running position recovery with --log_error='/mnt/data/geo/wsrep_recovery.y0n7wv' --pid-file='/mnt/data/geo/ip-10-200-200-20-recover.pid'
140910 14:09:34 mysqld_safe WSREP: Recovered position 793fe80a-b316-11e2-0800-0198ce0bf65f:74027509
140910 14:09:34 [Note] WSREP: wsrep_start_position var submitted: '793fe80a-b316-11e2-0800-0198ce0bf65f:74027509'
140910 14:09:34 [Note] WSREP: Read nil XID from storage engines, skipping position init
140910 14:09:34 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/libgalera_smm.so'
140910 14:09:34 [Note] WSREP: wsrep_load(): Galera 2.11(r318911d) by Codership Oy <info@codership.com> loaded successfully.
140910 14:09:34 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1
140910 14:09:34 [Note] WSREP: Reusing existing '/mnt/data/geo//galera.cache'.
140910 14:09:34 [Note] WSREP: Passing config to GCS: base_host = 10.200.200
140910 1:07:23 [Note] WSREP: (9390eb39-384f-11e4-9192-96ce0bc70f13, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers: tcp://10.200.200.20:4567
140910 1:07:24 [Note] WSREP: (9390eb39-384f-11e4-9192-96ce0bc70f13, 'tcp://0.0.0.0:4567') reconnecting to 92d11e3e-3863-11e4-8e85-aa80c5e58da9 (tcp://10.200.200.20:4567), attempt 0
140910 1:07:25 [Note] WSREP: (9390eb39-384f-11e4-9192-96ce0bc70f13, 'tcp://0.0.0.0:4567') turning message relay requesting off
140910 1:07:25 [Note] WSREP: (9390eb39-384f-11e4-9192-96ce0bc70f13, 'tcp://0.0.0.0:4567') cleaning up duplicate 0x7f1df405dcb0 after established 0x7f1df402a6b0
140910 1:28:09 [Note] WSREP: (9390eb39-384f-11e4-9192-96ce0bc70f13, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers: tcp://10.200.200.20:4567
140910 1:28:10 [Note] WSREP: (9390eb39-384f-11e4-9192-96ce0bc70f13, 'tcp://0.0.0.0:4567') reconnecting to 92d11e3e-3863-11e4-8e85-aa80c5e58da9 (tcp://10.200.200.20:4567), attempt 0
140910 1:28:10 [Note] WSREP: (93
array (size=3)
'1' =>
object(stdClass)[164]
public 'QTY' => int 6
public 'name' => string 'Flowers' (length=7)
public 'rate' => string '1' (length=1)
public 'unit' => string 'gram' (length=4)
'4' =>
object(stdClass)[167]
public 'QTY' => null