Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jmitchener on github.
  • I am jcm (https://keybase.io/jcm) on keybase.
  • I have a public key ASAh1hp63uw2rwPxSYaYum4uLAXnOorbdvgmy1_UiQf78Ao

To claim this, I am signing this object:

awful.key({ modkey, "Control" }, "j", function ()
awful.screen.focus_relative(-1)
local g = screen[mouse.screen].geometry
mouse:coords({ x = g.x + g.width / 2, y = g.y + g.height / 2 })
end),
awful.key({ modkey, "Control" }, "k", function ()
awful.screen.focus_relative( 1)
local g = screen[mouse.screen].geometry
mouse.coords({ x = g.x + g.width / 2, y = g.y + g.height / 2 })
end),
echo "--- DELETING OLD INDEX ---"
curl -XDELETE 'http://localhost:9200/ngramtest?pretty'
echo "--- CREATING INDEX ---"
curl -XPUT 'http://127.0.0.1:9200/ngramtest/?pretty=1' -d '{
"mappings" : {
"footype" : {
"properties" : {
@jmitchener
jmitchener / gist:3661207
Created September 6, 2012 23:19
Edge N-Gram Test
echo "--- DELETING OLD INDEX ---"
curl -XDELETE 'http://localhost:9200/ngramtest?pretty'
echo "--- CREATING INDEX ---"
# [Tue Jun 21 12:05:39 2011] Protocol: http, Server: 192.168.5.103:9200
curl -XPUT 'http://127.0.0.1:9200/ngramtest/?pretty=1' -d '
{
[2012-05-17 11:32:21,501][DEBUG][monitor.fs ] [es2] Using probe [org.elasticsearch.monitor.fs.SigarFsProbe@13ce64f6] with refresh_interval [1s]
[2012-05-17 11:32:21,868][DEBUG][cache.memory ] [es2] using bytebuffer cache with small_buffer_size [1kb], large_buffer_size [1mb], small_cache_size [10mb], large_cache_size [500mb], direct [true]
[2012-05-17 11:32:21,913][DEBUG][cluster.routing.allocation.decider] [es2] using node_concurrent_recoveries [2], node_initial_primaries_recoveries [4]
[2012-05-17 11:32:21,914][DEBUG][cluster.routing.allocation.decider] [es2] using [cluster.routing.allocation.allow_rebalance] with [indices_all_active]
[2012-05-17 11:32:21,914][DEBUG][cluster.routing.allocation.decider] [es2] using [cluster_concurrent_rebalance] with [2]
[2012-05-17 11:32:21,918][DEBUG][gateway.local ] [es2] using initial_shards [quorum], list_timeout [30s]
[2012-05-17 11:32:22,004][DEBUG][indices.recovery ] [es2] using max_size_per_sec[0b], concurrent_streams [5],
@Override
public boolean onTouchEvent(MotionEvent event) {
float x = event.getX();
float y = event.getY();
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
onTouchDown(x, y);
// invalidate();
break;
ActionView::TemplateError (undefined method `path_encoding' for #<Repository::Git:0xbcbc004>) on line #19 of app/views/projects/settings/_repository.rhtml:
16: <% button_disabled = true %>
17: <% if @repository %>
18: <% button_disabled = ! @repository.class.scm_available %>
19: <%= repository_field_tags(f, @repository)%>
20: <% end %>
21: </div>
22:
lib/tabular_form_builder.rb:38:in `select'
jcm@jcm-desktop:~ > sudo aptitude install maven2
The following NEW packages will be installed:
ant{a} ant-optional{a} antlr{a} bsh{a} bsh-gcj{a} fop{a} gcj-4.4-base{a} gcj-4.4-jre-lib{a} groovy{a} ivy{a}
java-wrappers{a} junit4{a} libantlr-java{a} libasm2-java{a} libasm3-java{a} libavalon-framework-java{a}
libbackport-util-concurrent-java{a} libbatik-java{a} libbsf-java{a} libclassworlds-java{a}
libcommons-beanutils-java{a} libcommons-cli-java{a} libcommons-codec-java{a} libcommons-collections-java{a}
libcommons-collections3-java{a} libcommons-configuration-java{a} libcommons-digester-java{a}
libcommons-httpclient-java{a} libcommons-io-java{a} libcommons-jxpath-java{a} libcommons-lang-java{a}
libcommons-logging-java{a} libcommons-net2-java{a} libcommons-validator-java{a} libdoxia-java{a}
libdoxia-sitetools-java{a} libexcalibur-logkit-java{a} libganymed-ssh2-java{a} libgcj-bc{a} libgcj-common{a}
JSTest.Calendar = (function() {
// constructor
var cal = function(element, name) {
this.name = name;
this.element = $(element);
this.element.html("I'm " + this.name);
this.refresh(); //call instance method
cal.someFunc(); //call static method
}
#!/usr/bin/env ruby
BEGIN {$VERBOSE = true} # enable warnings (-w)
class MusicHash < Hash
def initialize(file)
parse_file file
end
private
def parse_file(file)