Skip to content

Instantly share code, notes, and snippets.

@g8d3
g8d3 / Capistrano solr
Created May 29, 2013 23:04
Capistrano solr
#namespace :deploy do
## Ask whether to reindex before restarting Passenger
#task :restart, :roles => :app, :except => {:no_release => true} do
#solr.reindex if 'y' == Capistrano::CLI.ui.ask("\n\n Should I reindex all models? (anything but y will cancel)")
#run "touch #{File.join(current_path, 'tmp', 'restart.txt')}"
#end
#desc 'create shared data and pid dirs for Solr'
def reverse(str)
if str[0] and str[1]
str[-1] + reverse(str[0..-2])
else
str
end
end
def reverse_for(str)
s = ''
### recipe
# This file should be in .../cookbooks/database/recipes/default.rb
if ['solo', 'app_master', 'app', 'util'].include?(node[:instance_role])
# for each application
node[:engineyard][:environment][:apps].each do |app|
# create new database.yml
template "/data/#{app[:name]}/shared/config/database.yml" do
source 'database.yml.erb'
@g8d3
g8d3 / readme.md
Last active August 29, 2015 13:55
Vagrant - Chef - Ubuntu 13.10 - Error when running vagrant up.

What I have tried:

  1. I edited VM in VitualBox I realised that VM was being stuck in grub, after I hit enter there I could do vagrant ssh, but chef recipes won't work in this test case.
  2. So I stopped machine and reviewed /etc/default/grub inside VM timeout was correctly set!, after I tried again vagrant up I got this strange error.
  3. I made this process from scratch too, i.e. vagrant destroy and vagrant up, and I continue getting this long error.

I do have omnibus plugin installed:

$ vagrant plugin list
sigma.utils.pkg('sigma.canvas.edges');
sigma.canvas.edges.t = function(edge, source, target, context, settings) {
var color = edge.color,
prefix = settings('prefix') || '',
edgeColor = settings('edgeColor'),
defaultNodeColor = settings('defaultNodeColor'),
defaultEdgeColor = settings('defaultEdgeColor');
if (!color)
switch (edgeColor) {
cat npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'uninstall', '-g', 'meteorite' ]
2 info using npm@1.4.10
3 info using node@v0.10.28
4 verbose node symlink /usr/local/bin/node
5 info /usr/local/lib/node_modules/meteorite unbuild
6 info preuninstall meteorite@0.7.4
7 info uninstall meteorite@0.7.4
8 verbose true,/usr/local/lib/node_modules,/usr/local/lib/node_modules unbuild meteorite@0.7.4
=> Errors prevented startup:
While building package `iron-router`:
error: no such package: 'ui'
While building package `blaze-layout`:
error: no such package: 'ui'
layout-test.html:16: Parse error:
...} {{> yield region="footer"}}
----------------------^
@g8d3
g8d3 / install.sh
Last active August 14, 2016 21:29
Script to open tabs in Ubuntu terminal using xdotool.
curl -L https://goo.gl/0Jxf8j -o /usr/local/bin/ntab
chmod +x /usr/local/bin/ntab
@g8d3
g8d3 / designer.html
Created August 15, 2014 22:46
designer
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../code-mirror/code-mirror.html">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../yt-video/yt-search-video.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@g8d3
g8d3 / designer.html
Created August 15, 2014 22:50
designer
<link rel="import" href="../google-map/google-map-search.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">