Skip to content

Instantly share code, notes, and snippets.

View lgs's full-sized avatar

Luca G. Soave lgs

View GitHub Profile
@lgs
lgs / gist:ba74356d870e24bd156f
Last active August 26, 2015 16:38 — forked from michfield/gist:4525251
Clone all GitHub repositories of a user #bash
a virtual machine will not power on because one of its virtual disks is in use by another powered-on virtual machine.
Cannot open the disk '/vmfs/volumes/512d6435-5ea55908-04f1-0050560f0f44/Win01B/Win01B_1.vmdk'
or one of the snapshot disks it depends on. Failed to lock the file
~ # egrep "DISKLIB-LIB" /vmfs/volumes/512d6435-5ea55908-04f1-0050560f0f44/Win02B/vmware.log
2014-01-31T09:07:04.321Z| Worker#0| I120: DISKLIB-LIB : Opened "/vmfs/volumes/512d6435-5ea55908-04f1-0050560f0f44/Win02B/Win02b.vmdk" (flags 0xa, type vmfs).
2014-01-31T09:07:05.840Z| vmx| I120: DISKLIB-LIB : Failed to open '/vmfs/volumes/512d6435-5ea55908-04f1-0050560f0f44/Win01B/Win01B_1.vmdk' with flags 0xa Failed to lock the file (16392).
@lgs
lgs / README.md
Created February 1, 2014 11:44 — forked from proppy/README.md

docker.sh: a small interactive shell hack for docker

Usage: ./docker.sh [base-image-name]

Demo: http://ascii.io/a/5011

@lgs
lgs / diff-diamond-busybox
Last active August 29, 2015 13:56
As required by discussing Stackbrew pool request #28 ( https://github.com/dotcloud/stackbrew/pull/28 )
root@basenode:/var/lib/docker# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
diamond latest d7f6a6fe4763 30 hours ago 1.215 MB
busybox latest 769b9341d937 37 hours ago 2.489 MB
root@basenode:/var/lib/docker#
root@basenode:/var/lib/docker# ls -lrt ./aufs/diff/d7f6a6fe47634cfe6ce2b93a13c5f7dc5df125267c6ac3f9e842ef2f45fa7ada
total 60
drwxr-xr-x 2 root root 4096 feb 4 00:03 sys
gem 'pg'
group :development do
gem 'ruby-debug'
end
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'omniauth'
gem 'haml'
gem 'dynamic_form'
# Run with: rake environment elasticsearch:reindex
namespace :elasticsearch do
desc "re-index elasticsearch"
task :reindex => :environment do
klass = Place
ENV['CLASS'] = klass.name
ENV['INDEX'] = new_index = klass.tire.index.name << '_' << Time.now.strftime('%Y%m%d%H%M%S')
#!/usr/bin/python
# e.g. docker ps -a | grep 'my name' | awk '{print $1}' | xargs docker inspect | ./volume-list.py
import json
import fileinput
raw = []
for line in fileinput.input():
raw.append(line)
data = json.loads(''.join(raw))
@lgs
lgs / feature.rb
Created April 27, 2014 16:34 — forked from cavalle/feature.rb
require 'meatloaf'
require 'steps'
Feature "Eat candies" do
Scenario "Eat a candy from a jar full of them" do
Given "I have a jar with candies", candies: 10
When "I eat one candy"
Then "the jar won't be empty"
end
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rubygems'
gem 'minitest'
require 'minitest/autorun'
require 'action_controller/test_case'
require 'miniskirt'
require 'capybara/rails'
@lgs
lgs / Gemfile
Created May 17, 2014 11:12 — forked from metaskills/Gemfile
gem 'jekyll', '~> 2.0.0.alpha'
gem 'nokogiri'
gem 'redcarpet'
gem 'rouge'