Skip to content

Instantly share code, notes, and snippets.

@smtm
smtm / DJ.log
Last active October 19, 2017 18:12
2017-10-19T20:03:46+0200: [Worker(delayed_job.0 host:greenbox.local pid:16354)] Starting job worker
2017-10-19T20:03:46+0200: [Worker(delayed_job.1 host:greenbox.local pid:16358)] Starting job worker
2017-10-19T20:04:21+0200: [Worker(delayed_job.0 host:greenbox.local pid:16354)] acquired lock on MixPanel.trackerpeople
2017-10-19T20:04:22+0200: [Worker(delayed_job.0 host:greenbox.local pid:16354)] MixPanel.trackerpeople completed after 0.5656
2017-10-19T20:04:22+0200: [Worker(delayed_job.0 host:greenbox.local pid:16354)] 1 jobs processed at 1.7281 j/s, 0 failed ...
2017-10-19T20:05:33+0200: [Worker(delayed_job.0 host:greenbox.local pid:16354)] Exiting...
2017-10-19T20:05:37+0200: [Worker(delayed_job.1 host:greenbox.local pid:16358)] Exiting...
@smtm
smtm / delayed_job.log
Created October 19, 2017 17:42
sctried to get
2017-10-19T19:35:23+0200: [Worker(delayed_job.0 host:greenbox.local pid:15551)] Starting job worker
2017-10-19T19:35:23+0200: [Worker(delayed_job.1 host:greenbox.local pid:15555)] Starting job worker
2017-10-19T19:35:53+0200: [Worker(delayed_job.0 host:greenbox.local pid:15551)] acquired lock on Level#recalc_channel
2017-10-19T19:35:53+0200: [Worker(delayed_job.1 host:greenbox.local pid:15555)] acquired lock on Level#recalc_channel
2017-10-19T19:35:53+0200: [Worker(delayed_job.0 host:greenbox.local pid:15551)] Level#recalc_channel completed after 0.4396
2017-10-19T19:35:53+0200: [Worker(delayed_job.0 host:greenbox.local pid:15551)] acquired lock on Level#recalc_channel
2017-10-19T19:35:53+0200: [Worker(delayed_job.1 host:greenbox.local pid:15555)] Level#recalc_channel completed after 0.4094
2017-10-19T19:35:53+0200: [Worker(delayed_job.1 host:greenbox.local pid:15555)] acquired lock on Level#recalc_channel
2017-10-19T19:35:53+0200: [Worker(delayed_job.0 host:greenbox.local pid:15551)] Level#recalc_channel com
10/19/17 18:44:35 +0200 greenbox.local (14363)] INFO : Attempting to start Scout Agent [2.3.0] on [greenbox.local]
[10/19/17 18:44:35 +0200 greenbox.local (14363)] INFO : Instrumenting ActionController::Base
[10/19/17 18:44:35 +0200 greenbox.local (14363)] INFO : Instrumenting ActionView::Template
[10/19/17 18:44:35 +0200 greenbox.local (14363)] INFO : Instrumenting render
[10/19/17 18:44:35 +0200 greenbox.local (14363)] INFO : Instrumenting render_with_scout_instrument, render_without_scout_instrument
[10/19/17 18:44:35 +0200 greenbox.local (14363)] INFO : Instrumenting ActiveRecord::ConnectionAdapters::AbstractAdapter
[10/19/17 18:44:35 +0200 greenbox.local (14363)] INFO : Instrumenting Net::HTTP
[10/19/17 18:44:35 +0200 greenbox.local (14363)] INFO : Starting monitoring for [igumbi.net]. Framework [rails] App Server [webrick] Background Job Framework [].
[10/19/17 18:44:35 +0200 greenbox.local (14363)] WARN : Couldn't fetch Gem information: uninitialized constant ScoutApm::Utils::InstalledGems::Bundler
[10
@smtm
smtm / rksv.php
Last active March 28, 2020 11:52
RKSV logic as PHP implementation (wrapped into a html page with a test scenario)
<html>
<head>
<title>RKSV PHP Funktionen</title>
</head>
<body>
<h1>RKSV PHP Funktionen in PHP </h1>
<p> 31.1.2017 as per <a href="https://github.com/a-sit-plus/at-registrierkassen-mustercode/issues/220#issuecomment-276019670">github comment thread</a></p>
<?php
$aeskey = "WQRtiiya3hYh/Uz44Bv3x8ETl1nrH6nCdErn69g5/lU=";
@smtm
smtm / trello-to-md.rb
Created June 8, 2015 11:59
convert a trello board to markdown
require 'json'
def stripa(a)
a.gsub(" ","").gsub(",","").gsub("&","").gsub(":","").gsub("-","").gsub("/","").gsub("(","").gsub(")","")
end
json = JSON.parse(File.read("anz.json"))
#puts "##{json['name']}\n\n"
@smtm
smtm / gist:1826578
Created February 14, 2012 12:39
nokogiri rename root
# I'm sort of new to this XML stuff and maybe I haven't grokked the basics , but here's what I am trying to do
# I need about 10 different request to a server and they share common code. I want to keep things DRY
# and use a sort of template system where the "header stuff stays the same and I use partials to inject into
# the XML tree
require 'rubygems'
require 'nokogiri'
module Nokfun
def self.nokbuild(method name)
@smtm
smtm / de.yml
Last active October 31, 2017 11:31
Parsing YAML in Rails i18n locale files to generate JSON for a javascript translation method
These are the code parts to grab related to this blog post.
Read more about it there
http://www.igumbi.com/en/blog/YAML-to-JSON-Rails-for-i18n-Language-Files
# The locale file structure de.yml
de:
obt:
@smtm
smtm / prototype
Created April 13, 2011 16:41
What is the best way to do onload Script execution?
// onLoad Syntax with calling jQuery in "Person"
jQuery(function() {
var cheight=$("#content").height();
var nheight=$("#navbar").height();
if (cheight>nheight) {
$("#navbar").height(cheight);
}
});
// same as above, more terse, we assume jQuery loaded
@smtm
smtm / Mailchimp hominid playground
Created April 4, 2011 11:02
ruby person model to interface with mailchimp thru the hominid gem
person.rb methods
def self.initMailchimpList
#do the initial sync of all people in the DB for a customer with
#pushing it into one list
end
def syncMailchimpList
# we need the mailchimp api key on hotel level
# get the structure of the list
# see if we have the person in the mailchimp list
@smtm
smtm / pk.sh
Created October 22, 2010 11:38
kills PeepOpen and TextMate, restarts Peepopen
#!/bin/bash
kill -9 `ps ax | grep PeepOpen | grep -v grep | awk '{print $1}'`
kill -9 `ps ax | grep TextMate | grep -v grep | awk '{print $1}'`
open /Applications/PeepOpen.app
echo restarted Peepopen, killed TextMate