Skip to content

Instantly share code, notes, and snippets.

thufir@dur:~$
thufir@dur:~$ ll Desktop/netbeans
lrwxrwxrwx 1 thufir thufir 40 2012-03-22 23:12 Desktop/netbeans -> /home/thufir/netbeans-7.1.1/bin/netbeans*
thufir@dur:~$
@THUFIR
THUFIR / gist:2170467
Created March 23, 2012 13:04
apache commons nntp
thufir@dur:~$
thufir@dur:~$ java -jar NetBeansProjects/Gwene/dist/Gwene.jar
Gwene...
Settings...
initialize..
200 Leafnode NNTP Daemon, version 1.11.8 running at localhost (my fqdn: dur.bounceme.net)
GROUP comp.lang.java.help
211 37 3 39 comp.lang.java.help group selected
XOVER 1-9
224 Overview information for postings 3-9:
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@THUFIR
THUFIR / gist:2171996
Created March 23, 2012 15:47
dwmethys
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ ruby creatures.rb
/home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- Creature (LoadError)
from /home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from creatures.rb:2:in `<main>'
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ cat creatures.rb
require 'rubygems'
require 'Creature'
@THUFIR
THUFIR / gist:2173078
Created March 23, 2012 17:36
mysql gem
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ gem install activerecord-mysql-adapter --no-rdoc --no-ri
ERROR: Could not find a valid gem 'activerecord-mysql-adapter' (>= 0) in any repository
^CERROR: Interrupted
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$
@THUFIR
THUFIR / gist:2173317
Created March 23, 2012 18:07
dwemthys msyql
thufir@dur:~/ruby/dwemthys$
thufir@dur:~/ruby/dwemthys$ ruby connect.rb
connecting...
connected?
class Creature
life life
strength str
charisma char
weapon weapon
#<Creature:0x8bd5648>
thufir@dur:~$
thufir@dur:~$ sudo aptitude install -y exuberant-ctags
The following NEW packages will be installed:
exuberant-ctags
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/133 kB of archives. After unpacking 328 kB will be used.
Selecting previously deselected package exuberant-ctags.
(Reading database ... 185225 files and directories currently installed.)
Unpacking exuberant-ctags (from .../exuberant-ctags_1%3a5.9~svn20110310-2_i386.deb) ...
Processing triggers for man-db ...
@THUFIR
THUFIR / gist:2178392
Created March 24, 2012 04:51
query without rails
require 'fileutils'
require 'active_record'
puts "connecting..."
ActiveRecord::Base.establish_connection(
:adapter => "mysql",
:host => "localhost",
:username => "ruby",
:password => "password",
@THUFIR
THUFIR / gist:2178514
Created March 24, 2012 05:16
activerecord & feedzirra
thufir@dur:~/ruby/feedzirra$
thufir@dur:~/ruby/feedzirra$
thufir@dur:~/ruby/feedzirra$ ruby feed.rb
/home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1626:in `raise_if_conflicts': Unable to activate activerecord-3.2.2, because activesupport-3.1.4 conflicts with activesupport (= 3.2.2) (Gem::LoadError)
from /home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:741:in `activate'
from /home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb:211:in `rescue in try_activate'
from /home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb:208:in `try_activate'
from /home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from /home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from feed.rb:3:in `<main>'
@THUFIR
THUFIR / gist:2180574
Created March 24, 2012 09:24
java logging
thufir@dur:~$
thufir@dur:~$ java -jar NetBeansProjects/GweneTest/dist/GweneTest.jar
Gwene...
...Gwene
thufir@dur:~$
thufir@dur:~$ cat NetBeansProjects/GweneTest/src/logs/GweneMain.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/