Skip to content

Instantly share code, notes, and snippets.

View dims's full-sized avatar

Davanum Srinivas dims

View GitHub Profile
@dims
dims / x
Created September 15, 2008 14:29
CmdUtils.CreateCommand({
name: "paste",
takes: {
status: noun_arb_text
},
modifiers: {},
preview: function(previewBlock, directObj) {},
execute: function(directObj) {
var statusText = directObj.text;
if (statusText.length < 1) {
dims@dims-desktop:~/apache/deltacloud/client$ rake package
(in /home/dims/apache/deltacloud/client)
rake aborted!
uninitialized constant Rake::DSL
/usr/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in `<class:TaskLib>'
/var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in `<module:Rake>'
/var/lib/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
@dims
dims / gist:59be0c075f29e7ec26a8
Created June 2, 2014 12:03
Expect script for logging into VPN using Anyconnect client (works on osx and linux)
#!/usr/bin/expect
set timeout 20
spawn "/opt/cisco/anyconnect/bin/vpn"
expect "VPN>" { send "connect server.ip.address.or.hostname\r" }
expect "*sername*" { send "MY_USERID\r" }
expect "*assword*" { send "MY_PASSWORD\r" }
expect "state: Connected" { send "exit\r" }
<%
director_uuid = 'CHANGEME'
static_ip = 'CHANGEME'
root_domain = "#{static_ip}.xip.io"
deployment_name = 'cf'
cf_release = '173'
protocol = 'http'
common_password = 'c1oudc0wc1oudc0w'
%>
---
---
name: microbosh-openstack
logging:
level: DEBUG
network:
type: dynamic
vip: 172.24.4.1
#!/usr/bin/env python
import itertools
import socket
import time
from launchpadlib import uris
from launchpadlib.launchpad import Launchpad
AllowEncodedSlashes NoDecode
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "/private/etc/apache2/server.crt"
SSLCertificateKeyFile "/private/etc/apache2/server.key"
SSLProxyEngine On
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/static/hideci.js
@dims
dims / gist:ca0ac30f7106e1af15a8
Created October 15, 2014 01:22
Forward Docker unix socket
sudo socat "UNIX-LISTEN:/var/run/docker.sock,reuseaddr,fork" EXEC:'ssh stack@bigblue -i /Users/dims/.ssh/id_dsa socat STDIO UNIX-CONNECT\:/var/run/docker.sock'
from novadocker.virt import docker
from novadocker.virt.docker import client
from novadocker.virt.docker import hostinfo
from nova.compute import flavors
driver = docker.DockerDriver(None)
driver._docker = client.DockerHTTPClient(url='tcp://127.0.0.1:2375')
print ">>>> init_host : %r " % "OK" if driver.init_host(None) is None else "FAILED"
print ">>>> is_daemon_running : %r " % driver._is_daemon_running()
@dims
dims / devices.md
Last active August 29, 2015 14:10

GET /containers/(id)/devices

Example request:

GET /containers/4fa6e0f0c678/devices HTTP/1.1

Example response:

HTTP/1.1 200 OK
Content-Type: application/json