Skip to content

Instantly share code, notes, and snippets.

View jtmkrueger's full-sized avatar
🎉
Working from home

John Krueger jtmkrueger

🎉
Working from home
View GitHub Profile
@jtmkrueger
jtmkrueger / gist:8c23a86dd75a1487396a794d3e553e19
Created September 17, 2020 17:58
jard foreman stack trace
11:53:38 web.1 | --- Error ---
11:53:38 logs.1 | Started GET "/referrer_profile_notifications" for 127.0.0.1 at 2020-09-17 11:53:25 -0600
11:53:38 web.1 | Internal error from Jard. I'm sorry to mess up your debugging experience.
11:53:38 logs.1 | (5.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
11:53:38 web.1 | It would be great if you can submit an issue in https://github.com/nguyenquangminh0711/ruby_jard/issues
11:53:38 logs.1 | Processing by ReferrerProfileNotificationsController#index as HTML
11:53:38 web.1 |
11:53:38 logs.1 | User Load (2.0ms) SELECT "users".* FROM "users" WHERE "users"."remember_token" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["remember_token", "7c552efb1a28bd4f5005dcf3598803d9f77aee8a"], ["LIMIT", 1]]
11:53:38 web.1 | -2..-1 out of range
11:53:38 logs.1 | ↳ app/controllers/application_contr

Keybase proof

I hereby claim:

  • I am jtmkrueger on github.
  • I am jtmkrueger (https://keybase.io/jtmkrueger) on keybase.
  • I have a public key ASChOjcdDK9mFND9W4s0bkgPjUmxOYYsbHTMH4ocs4sfTwo

To claim this, I am signing this object:

class PretendController < ApplicationController
def create
render params
end
end
@jtmkrueger
jtmkrueger / batch_three_export.py
Created March 31, 2016 21:12
Batch export all objects in the scene as seperate three.js json files
import bpy
import os
# Batch exporting of all objects in the scene into separate json files
# access the scene
scene = bpy.context.scene
# get the current path and make a new folder for the exported meshes
path = bpy.path.abspath('//' + bpy.path.basename(bpy.context.blend_data.filepath) + '_jsonexport/')
▶ cat /var/db/pkgin/pkg_install-err.log
---Jan 19 13:12:30: installing libssh2-1.6.0...
---Jan 19 13:12:30: installing curl-7.44.0...
---Jan 19 13:23:50: installing patch-2.7.5...
---Jan 19 13:32:12: installing libffi-3.2.1...
---Jan 19 13:32:12: installing python27-2.7.10...
---Jan 19 13:32:14: installing nodejs-4.1.1...
---Jan 20 14:40:40: installing libpaper-1.1.24...
---Jan 20 14:40:41: installing ghostscript-fonts-8.11nb3...
---Jan 20 14:40:41: installing giflib-5.1.1...
~
▶ pkgin -f up
cleaning database from http://pkgsrc.joyent.com/packages/Darwin/2015Q3/x86_64/All entries...
processing remote summary (http://pkgsrc.joyent.com/packages/Darwin/trunk/x86_64/All)...
pkg_summary.xz 0% 0 0.0KB/s 0.0KB/s --:-- ETAcleaning database from http://pkgsrc.joyent.com/packages/Darwin/trunk/x86_64/All entries...
pkg_summary.xz 100% 1776KB 888.2KB/s 944.4KB/s 00:02
~
▶ pkgin

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jtmkrueger
jtmkrueger / gist:6158238
Created August 5, 2013 18:30
fire function on esc with jqeury
var that = this;
$(document).keyup(function(e) {
if (e.keyCode == 27) { that.closePopup(e); }   // esc
});

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jtmkrueger
jtmkrueger / gist:2573837
Created May 2, 2012 04:55
devise rails-api stack trace
/Users/jtmkrueger/.rvm/gems/ruby-1.9.3-p125@cmsweb/gems/devise-2.0.4/lib/devise/controllers/helpers.rb:8:in `block in <module:Helpers>': undefi
ned method `helper_method' for ActionController::API:Class (NoMethodError)
from /Users/jtmkrueger/.rvm/gems/ruby-1.9.3-p125@cmsweb/gems/activesupport-3.2.3/lib/active_support/concern.rb:119:in `class_eval'
from /Users/jtmkrueger/.rvm/gems/ruby-1.9.3-p125@cmsweb/gems/activesupport-3.2.3/lib/active_support/concern.rb:119:in `append_features'
from /Users/jtmkrueger/.rvm/gems/ruby-1.9.3-p125@cmsweb/gems/devise-2.0.4/lib/devise.rb:424:in `include'
from /Users/jtmkrueger/.rvm/gems/ruby-1.9.3-p125@cmsweb/gems/devise-2.0.4/lib/devise.rb:424:in `block in include_helpers'
from /Users/jtmkrueger/.rvm/gems/ruby-1.9.3-p125@cmsweb/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /Users/jtmkrueger/.rvm/gems/ruby-1.9.3-p125@cmsweb/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:36: