Skip to content

Instantly share code, notes, and snippets.


Christian Aust datenimperator

View GitHub Profile
datenimperator / model.rb
Created Apr 28, 2014
Unique numbering DSL
View model.rb
class Model < ActiveRecord::Base
# setzt :invoice_id Attribut im before_create
has_unique :invoice_id,
scoped_by: lambda{ },
formatter: lambda{ |scope, value| sprintf("R-%04d-%04d", scope, value) }
datenimperator / issues.rb
Created May 6, 2014
Display active, assigned tickets from Gitlab using Ruby
View issues.rb
#!/usr/bin/env ruby
require 'open-uri'
require 'json'
issues = JSON.load(open("#{GITLAB}/api/v3/issues?private_token=#{TOKEN}"))
$ curl -I ""
curl: (60) SSL certificate problem: Invalid certificate chain
More details here:
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verificatio
$ ping -c 20
PING ( 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
datenimperator / error.log
Created Aug 30, 2014
sidekiq/paperclip/delayed_paperclip error
View error.log
2014-08-30T13:50:22.477Z 36512 TID-ouv9kmve4 DelayedPaperclip::Jobs::Sidekiq JID-d5633dd7375cb03f87bf47dd INFO: fail: 0.481 sec
2014-08-30T13:50:22.478Z 36512 TID-ouv9kmve4 WARN: {"retry"=>true, "queue"=>"paperclip", "backtrace"=>true, "class"=>"DelayedPaperclip::Jobs::Sidekiq", "args"=>["ProductImage", 2644, "image"], "jid"=>"d5633dd7375cb03f87bf47dd", "enqueued_at"=>1409403315.5664058, "error_message"=>"Argument list too long - identify -format '%wx%h,%[exif:orientation]' '/var/folders/f3/j05ygbhx6cx4ykwbdv6m5nbh000101/T/2e309f3244e197b93dc741957dc7fa1520140830-36512-108qunp.jpg[0]' 2>/dev/null", "error_class"=>"Errno::E2BIG", "failed_at"=>1409403664.329591, "retry_count"=>2, "error_backtrace"=>["/Users/christian/.rvm/gems/ruby-2.1.2@dmh/gems/cocaine-0.5.4/lib/cocaine/command_line/runners/process_runner.rb:34:in `spawn'", "/Users/christian/.rvm/gems/ruby-2.1.2@dmh/gems/cocaine-0.5.4/lib/cocaine/command_line/runners/process_runner.rb:34:in `spawn'", "/Users/christian/.rvm/gems/ruby-2.1.2@dmh/gems/cocaine-0.5
View authors.txt
user1 = Full Name <>
user1_alias = Full Name <>
user2 = Another Name <>
View error.log
Process: [4427]
Path: /System/Library/Frameworks/WebKit.framework/Versions/A/XPCServices/
Version: 10600 (10600.5.17)
Build Info: WebKit2-7600005017000000~3
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Safari [2458]
User ID: 1025
View gist:209138
# SipFaxPref.m
# SipFax
# Created by Christian on 12.10.09.
# Copyright (c) 2009 Christian Aust. All rights reserved.
require 'osx/cocoa'
require 'client'
View gist:209133
def init
if super_init
@identified = false
@dirty = false
@username, @password, @account_type = 'test', 'abc', SIP_TEAM
View gist:211663
christian@macbookpro:~/Documents/Projekte/SipFax\ otool -L build/Debug/SipFax.prefPane/Contents/MacOS/SipFax
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 12.0.0)
/System/Library/Frameworks/PreferencePanes.framework/Versions/A/PreferencePanes (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../Frameworks/RubyCocoa.framework/Versions/A/RubyCocoa (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 36371.0.0)
@loader_path/../Frameworks/BWToolkitFramework.framework/Versions/A/BWToolkitFramework (compatibility version 1.0.0, current version 0.0.0)
@loader_path/../Frameworks/EMKeychain.framework/Versions/A/EMKeychain (compatibility version 1.0.0, current version 1.0.0)
@executable_path/../Frameworks/XMLRPC.framework/Versions/A/XMLRPC (compatibility version 1.0.0, cur
You can’t perform that action at this time.