Skip to content

Instantly share code, notes, and snippets.

@UnderpantsGnome
UnderpantsGnome / rhasspy.log
Created December 21, 2019 22:51
Rhasspy startup output
% ./run-venv.sh --profile en
DEBUG:__main__:Namespace(host='0.0.0.0', log_level='DEBUG', port=12101, profile='en', set=[], ssl=None, system_profiles='/home/pi/apps/rhasspy/profiles', user_profiles='/home/pi/.config/rhasspy/profiles')
DEBUG:RhasspyCore:Loaded profile from /home/pi/.config/rhasspy/profiles/en/profile.json
DEBUG:RhasspyCore:Profile files will be written to /home/pi/.config/rhasspy/profiles/en
DEBUG:root:Loading default profile settings from /home/pi/apps/rhasspy/profiles/defaults.json
DEBUG:WebSocketObserver: -> started
DEBUG:DialogueManager: -> started
DEBUG:DialogueManager:started -> loading_mqtt
DEBUG:DialogueManager:Loading MQTT first
DEBUG:DialogueManager:Loading...will time out after 30 second(s)
@UnderpantsGnome
UnderpantsGnome / Gemfile
Created February 27, 2018 00:02
Integration testing React with a Rails API using RSpec
...
group :test do
gem 'capybara', '~> 2.4.4'
gem 'capybara-screenshot', '~> 1.0.11'
gem 'database_cleaner'
gem 'launchy', '~> 2.4.3'
gem 'rspec-rails'
gem 'selenium-webdriver'
end
require 'formula'
class Mysql < Formula
homepage 'http://dev.mysql.com/doc/refman/5.1/en/'
url 'http://mysql.mirrors.pair.com/Downloads/MySQL-5.1/mysql-5.1.60.tar.gz'
md5 '076d61d5f9b0de4e51b6c48a5e576035'
depends_on 'readline'
def options
@UnderpantsGnome
UnderpantsGnome / pre-commit
Last active September 27, 2015 00:47
My pre-commit hook
#!/bin/bash
debug=`git diff --cached | grep -C 2 -E '+\s*And (open|show me the page|save_and_open_page)'`
pry=`git diff --cached | grep -C 2 -E 'binding.pry'`
debugger=`git diff --cached | grep -C 2 debugger`
console_log=`git diff --cached | grep -C 2 console.log`
conflicts=`git diff --cached | grep -C 2 -E '<<<|>>>'`
if [ -n "$debug" ]; then
echo "debugging statements added in this commit"
@UnderpantsGnome
UnderpantsGnome / queue_failure_session_proxy.rb
Created May 4, 2011 21:29
DJ Queue Failed Solr calls for index and remove
require 'sunspot/session_proxy/silent_fail_session_proxy'
module Sunspot
module SessionProxy
class QueueFailureSessionProxy < Sunspot::SessionProxy::SilentFailSessionProxy
QUEUE_METHODS = [:index!, :index, :remove!, :remove]
def rescued_exception(method_name, ex, klass)
raise ex unless ::Rails.env.production?
#!/usr/bin/env ruby
File.open('gemlist').each do |line|
next if line =~ /^#/
g, v = line.split
ret = system("gem install #{g} #{v} --no-rdoc --no-ri") if g && v
p $? unless ret
end
mmoen@shiny:~$ !echo
echo $PATH | tr ":" "\n"
/Users/mmoen/.rvm/rubies/ruby-1.8.6-p383/bin
/Users/mmoen/.rvm/gems/ruby-1.8.6-p383%strappy/bin
/Users/mmoen/.rvm/gems/ruby-1.8.6-p383%strappy%global/bin
/Users/mmoen/.rvm/bin
/opt/local/bin
/opt/local/sbin
/Users/mmoen/bin
/usr/local/mysql/bin
The following scenario leads to the below gem paths. Not sure how/where to fix it.
rvm 1.9.1
rvm 1.8.6
- GEM PATHS:
- /Users/tukaiz/.rvm/gems/ruby-1.8.6-p383
- /Users/tukaiz/.rvm/gems/ruby-1.8.6-p383%global
- /Users/tukaiz/.rvm/gems/ruby-1.9.1-p378%global
@UnderpantsGnome
UnderpantsGnome / gist:289486
Created January 29, 2010 05:46
rvm global gems per ruby
########################################
### Start with a "clean" environment ###
########################################
mmoen@shiny:~/tmp$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.6 (2009-08-04 patchlevel 383) [i686-darwin10.2.0]
- INSTALLATION DIRECTORY: /Users/mmoen/.rvm/gems/ruby/1.8.6
- RUBY EXECUTABLE: /Users/mmoen/.rvm/ruby-1.8.6-p383/bin/ruby
# Factory girl, relaxed.
#
# Factory.define :user do |f|
# f.login 'johndoe%d' # Sequence.
# f.email '%{login}@example.com' # Interpolate.
# f.password f.password_confirmation('foobar') # Chain.
# end
#
# Factory.define :post do |f|
# f.user { Factory :user } # Blocks, if you must.