Skip to content

Instantly share code, notes, and snippets.

@jruels
jruels / Error
Created March 4, 2016 05:12
Ansible group_vars server role
TASK [application : Add lbs servers ips to hosts file] *************************
[DEPRECATION WARNING]: Skipping task due to undefined attribute, in the future
this will be a fatal error.. This feature will be removed in a future release.
Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.
TASK [application : create a database for wordpress] ***************************
fatal: [lb01]: FAILED! => {"failed": true, "msg": "ERROR! The conditional check 'server_role == 'db'' failed. The error was: ERROR! error while evaluating conditional (server_role == 'db'): ERROR! 'server_role' is undefined\n\nThe error appears to have been in '/Users/jruels/Projects/install-wordpress-ansible/roles/application/tasks/main.yml': line 6, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n## database tasks\n- include: 02-create_databases.yml\n ^ here\n"}
@jruels
jruels / Python_calc.py
Created February 20, 2016 19:52
Ruby vs Python
#!/usr/bin/python
def add():
print "Enter the two numbers to Add"
A=int(raw_input("Enter A: "))
B=int(raw_input("Enter B: "))
return A + B
def sub():
print "Enter the two numbers to Subtract"
@jruels
jruels / parker.js
Created December 27, 2015 04:40
javascript myChildren function
function myChildren(name) {
if (name == "Dave") {
return "Oldest";
}
else if (name == "Michelle") {
return "Middle";
}
else {
return "Not my kid!";
}
@jruels
jruels / gist:a8093cede4bfe7598e14
Last active December 5, 2024 13:32
How to launch an OpenStack instance in a specific host aggregate
#Make sure AggregateImagePropertiesIsolation is enabled in nova.conf
scheduler_default_filters=AggregateImagePropertiesIsolation
# Restart all nova services on all controllers
# Create host aggregates
# For example one aggregate for ESX and one for KVM
nova aggregate-create ESX-AZ ESX-AZ
nova aggregate-create KVM-AZ KVM-AZ
@jruels
jruels / file.md
Created October 2, 2015 19:41
Atom header auto completion
## Find the official PostgreSQL (`postgres`) image
Click the **>>** and **<<** links at the bottom of the page to navigate through the Official images.
---
## Review the image details
Find the 'postgres' official image and click the **> DETAILS** link for more image information.
@jruels
jruels / debug_output
Created April 22, 2015 01:47
Packer error
Debug mode enabled. Builds will not be parallelized.
vmware-vmx output will be in this color.
==> vmware-vmx: Pausing after run of step 'StepPrepareTools'. Press enter to continue.
==> vmware-vmx: Pausing after run of step 'StepOutputDir'. Press enter to continue.
==> vmware-vmx: Pausing after run of step 'StepCreateFloppy'. Press enter to continue.
==> vmware-vmx: Cloning source VM...
==> vmware-vmx: Pausing after run of step 'StepCloneVMX'. Press enter to continue.
==> vmware-vmx: Pausing after run of step 'StepConfigureVMX'. Press enter to continue.
==> vmware-vmx: Pausing after run of step 'StepSuppressMessages'. Press enter to continue.
@jruels
jruels / gist:62ade67a5183a6121d40
Last active August 29, 2015 14:19
packer fail
==> vmware-vmx: Deleting unnecessary VMware files...
vmware-vmx: Deleting: output-vmware-vmx/packer-vmware-vmx-1429660305.plist
vmware-vmx: Deleting: output-vmware-vmx/packer-vmware-vmx-1429660305.vmx.lck/M51947.lck
vmware-vmx: Deleting: output-vmware-vmx/vmware.log
==> vmware-vmx: Cleaning VMX prior to finishing up...
vmware-vmx: Unmounting floppy from VMX...
==> vmware-vmx: Compacting the disk image
==> vmware-vmx: Deleting output directory...
Build 'vmware-vmx' errored: Error compacting disk: VMware error: VixDiskLib: Invalid configuration file parameter. Failed to read configuration file.
Failed to open the disk '/Users/aslaen/Projects/packer_templates/output-vmware-vmx/autoinst.iso' : A file was not found (0x4).
@jruels
jruels / gist:981c413cfd1743087884
Created December 15, 2014 16:02
sublime text 3 plugins
$ ls -ltr Installed\ Packages/
total 1112
-rw-r--r--@ 1 aslaen staff 108299 Nov 27 23:02 Vintageous.sublime-package
-rw-r--r--@ 1 aslaen staff 4436 Nov 27 23:02 SublimeLinter-ruby.sublime-package
-rw-r--r--@ 1 aslaen staff 198414 Nov 27 23:02 SublimeGit.sublime-package
-rw-r--r--@ 1 aslaen staff 132375 Nov 27 23:02 Package Control.sublime-package
-rw-r--r--@ 1 aslaen staff 49144 Nov 27 23:02 GitGutter.sublime-package
-rw-r--r--@ 1 aslaen staff 29989 Nov 27 23:02 Chef.sublime-package
-rw-r--r--@ 1 aslaen staff 2360 Nov 27 23:02 Alternate VIM Navigation.sublime-package
-rw-r--r-- 1 aslaen staff 28200 Dec 10 11:04 Git.sublime-package
[2014-12-09 04:27:08.910679] IRC::jruels::rackspace_external == Timeout()
[2014-12-09 04:27:08.910869] (jruels/rackspace_external) ZNC -> CLI [:*[email protected] PRIVMSG js :IRC connection timed out. Reconnecting...]
[2014-12-09 04:27:08.911190] Connecting user/network [jruels/rackspace_external]
[2014-12-09 04:27:08.911275] TDNS: initiating resolving of [external.irc.rackspace.com] and bindhost []
[2014-12-09 04:27:08.911549] ConnectQueueTimer done
root@phx1cind006:~# ps auxfww | grep -B3 -A3 dd
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2 0.0 0.0 0 0 ? S Nov21 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S Nov21 0:01 \_ [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S< Nov21 0:00 \_ [kworker/0:0H]
root 6 0.0 0.0 0 0 ? S Nov21 0:00 \_ [kworker/u64:0]
--
root 25428 0.0 0.0 103556 4244 ? Ss 09:58 0:00 \_ sshd: root@pts/1
root 25448 0.1 0.0 22836 3772 pts/1 Ss 09:58 0:00 \_ -bash
root 25465 0.0 0.0 19104 1740 pts/1 R+ 09:59 0:00 \_ ps auxfww