Skip to content

Instantly share code, notes, and snippets.

View frodenas's full-sized avatar

Ferran Rodenas frodenas

  • Mountain View, CA
View GitHub Profile
@frodenas
frodenas / gist:3764572
Created September 21, 2012 23:58
Fog::Network OpenStack Example
$ fog
Welcome to fog interactive!
:default provides AWS, HP, OpenStack, Rackspace, VirtualBox and Vmfusion
>> quantum = Fog::Network.new(:provider => "OpenStack")
>>
?> # Create a new network:
?> quantum.networks.create(:name => "network_1")
<Fog::Network::OpenStack::Network
id="09b42312-bba6-4d52-a558-023e1de0d872",
name="network_1",
@frodenas
frodenas / gist:9107624
Last active August 29, 2015 13:56
Python shutil.move
root@a28e4835-146b-4da6-b736-1021126986a0:~# uname -a
Linux a28e4835-146b-4da6-b736-1021126986a0 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:24:59 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
root@a28e4835-146b-4da6-b736-1021126986a0:~# python -V
Python 2.7.4
root@a28e4835-146b-4da6-b736-1021126986a0:~# python
Python 2.7.4 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import pwd
@frodenas
frodenas / cf.yml
Created May 5, 2014 18:29
CloudFoundry (small) deployment manifest for Google Compute Engine
<%
director_uuid = 'CHANGEME'
static_ip = 'CHANGEME'
root_domain = "#{static_ip}.xip.io"
deployment_name = 'cf'
cf_release = '170'
protocol = 'http'
common_password = 'c1oudc0wc1oudc0w'
%>
---
@frodenas
frodenas / cf-full.yml
Last active August 29, 2015 14:01
CloudFoundry deployment manifest for Google Compute Engine
<%
director_uuid = 'CHANGEME'
static_ip = 'CHANGEME'
root_domain = "#{static_ip}.xip.io"
deployment_name = 'cf'
cf_release = '170'
protocol = 'http'
common_password = 'c1oudc0wc1oudc0w'
%>
---
@frodenas
frodenas / cf-170-openstack.yml
Last active August 29, 2015 14:01
Cloud Foundry v170 deployment manifest for OpenStack
<%
director_uuid = 'CHANGEME'
static_ip = 'CHANGEME'
root_domain = "#{static_ip}.xip.io"
deployment_name = 'cf'
cf_release = '170'
protocol = 'http'
common_password = 'c1oudc0wc1oudc0w'
%>
---
<%
director_uuid = 'cf0a7e71-efa8-4895-9607-40acc6f51aeb'
deployment_name = 'cf-push-console-errand'
protocol = 'http'
common_password = 'c1oudc0wc1oudc0w'
root_domain = '10.145.98.63.xip.io'
cf_deployment_name = 'cf'
%>
---
name: <%= deployment_name %>
@frodenas
frodenas / haproxy.properties
Last active August 29, 2015 14:04
CF HAProxy SSL self-generated certificate
properties:
ha_proxy:
ssl_pem: |
-----BEGIN CERTIFICATE-----
MIIDlDC********************************************LMAkGA1UEBhMC
VVMxCzAJBgNVBAgTAkNPMRQwEgYDVQQHEwtXaW50ZXIgUGFyazEQMA4GA1UEChMH
UGl2b3RhbDEeMBwGA1UEAxQVKi41NC44NC4yNTMuODcueGlwLmlvMScwJQYJKoZI
hvcNAQkBFhhzZ3JlZW5iZXJnQGdvcGl2b3RhbC5jb20wHhcNMTQwNTE5MjIxNDEx
WhcNMTUwNTE5MjIxNDExWjCBizELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNPMRQw
EgYDVQQHEwtXaW50ZXIgUGFyazEQMA4GA1UEChMHUGl2b3RhbDEeMBwGA1UEAxQV
@frodenas
frodenas / cf-175-gce.yml
Last active August 29, 2015 14:04
CloudFoundry v175 (small) deployment manifest for Google Compute Engine
<%
director_uuid = 'CHANGE-ME'
static_ip = 'CHANGE-ME'
root_domain = "#{static_ip}.xip.io"
deployment_name = 'cf'
cf_release = '175'
protocol = 'http'
common_password = 'c1oudc0wc1oudc0w'
%>
---
@frodenas
frodenas / logstash.conf
Last active August 29, 2015 14:04
Sample logstash
input {
tcp {
port => 514
type => syslog
}
}
filter {
if [type] == "syslog" {
grok {
@frodenas
frodenas / cf-183-openstack.yml
Created March 14, 2015 19:40
CloudFoundry v83 (small) deployment manifest for OpenStack
<%
director_uuid = 'CHANGE-ME'
floating_ip = 'CHANGE-ME'
root_domain = "#{floating_ip}.xip.io"
net_id = 'CHANGE-ME'
deployment_name = 'cf'
cf_release = '183'
protocol = 'http'
common_password = 'c1oudc0wc1oudc0w'
%>