Generarates inventory for ansible from etcd using python-etcd library.
The script assumes etcd.ini to be present alongside it. To choose a different path, set the ETCD_INI_PATH environment variable:
export ETCD_INI_PATH=/path/to/etcd.ini
| // Fixing some of the errors in the: | |
| // https://gist.github.com/PumpkinSeed/b4993c6ad20ea90e3da8c991a90a91e1 | |
| // | |
| // 1. It was only able to extract database information, based upon a Struct. | |
| // The code now can deal with a struct or a slice with structs. | |
| // | |
| // 2. The code relied on the json tag in the struct. | |
| // You need to match the data with database fields, not the output fields. | |
| // This will match up more 1 to 1 as you are in controle of your Database naming and selecting of that data. | |
| // If a client expect different named exported json fields, ... |
| node { | |
| // Mark the code checkout 'Checkout'.... | |
| stage 'Checkout' | |
| // // Get some code from a GitHub repository | |
| git url: 'git@github.com:myorg/infrastructure.git' | |
| // Get the Terraform tool. | |
| def tfHome = tool name: 'Terraform', type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool' |
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| # install libio-socket-ssl-perl to get this | |
| use IO::Socket::SSL; | |
| my $hostname = shift or die "Usage: $0 www.example.com\n"; | |
| IO::Socket::SSL->new( | |
| PeerHost => "$hostname:443", |
| _Go to your Owncloud installation <https://myowncloud/remote.php/mozilla_sync> and accept the SSL Certificate | |
| _Open about:config | |
| _Create: services.sync.username <string> the value should be a hash not the username itself. (You only need the hash if the | |
| sync was setup with a pre FF29, if you start from scratch the string doesn't matter) | |
| You can look this up in an older browser or in the logs of your Owncloud server!! | |
| _Go to: Preferences -> Sync -> Setup Firefox sync (you should see the old UI now) | |
| 'I Have an Account' | |
| 'I don't have the device with me' | |
| 'Account' - again use the hash NOT the actual username! |
| define accounts::virtual ($uid,$realname,$pass,$sshkeytype,$sshkey) { | |
| include accounts::params | |
| # Pull in values from accounts::params | |
| $homepath = $accounts::params::homepath | |
| $shell = $accounts::params::shell | |
| # Create the user | |
| user { $title: | |
| ensure => 'present', |
| dmg=$1 | |
| # A script to install Unity3d automatically from the command line given a dmg file. | |
| # The resulting file is stored under /Applications/Unity$VERSION | |
| # check assumptions | |
| unityhome=/Applications/Unity | |
| if [[ -d "$unityhome" ]]; then | |
| echo "ERROR: $unityhome already present" |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| // C# example | |
| using UnityEditor; | |
| using System.IO; | |
| using System.Collections; | |
| using UnityEngine; | |
| using System.Collections.Generic; | |
| class PerformBuild | |
| { | |
| static string[] GetBuildScenes() |
| # Start the old vagrant | |
| $ vagrant init centos-6.3 | |
| $ vagrant up | |
| # You should see a message like: | |
| # [default] The guest additions on this VM do not match the install version of | |
| # VirtualBox! This may cause things such as forwarded ports, shared | |
| # folders, and more to not work properly. If any of those things fail on | |
| # this machine, please update the guest additions and repackage the | |
| # box. |