Skip to content

Instantly share code, notes, and snippets.

View kronn's full-sized avatar

Matthias Viehweger kronn

View GitHub Profile
@kronn
kronn / mysql settings
Created March 1, 2011 08:45
the innodb-setting on a production site
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
innodb_flush_log_at_trx_commit = 2
innodb_buffer_pool_size = 512M
innodb_log_buffer_size = 512M
innodb_additional_mem_pool_size = 64M

10 Ways to improve Github Issues

I love the new GitHub issues, here are some ideas to make it perfect, ordered by priority:

1. I should be able to pick the assignee and milestone via keyboard when creating a new ticket

2. Keyboard shortcuts should work everywhere. E.g. when viewing an existing issue, 'c' does not work.

3. After creating an issue, the assigned user / milestone should be remembered and pre-filled.

4. Allow assigning a different user while commenting. Right now this deletes my half-typed comment.

5. When typing the @ symbol to mention somebody, it should auto-complete the name.

6. Things feel a little sluggish right now, any speed improvements would be very welcome.

@kronn
kronn / my-gh-issues.rb
Created May 9, 2011 06:28 — forked from copiousfreetime/my-gh-issues.rb
My Github Issues
#!/usr/bin/env ruby
#
# A quick script to dump an overview of all the open issues in all my github projects
#
require 'octokit'
require 'awesome_print'
require 'rainbow'
@kronn
kronn / test_helper_extract.rb
Created June 16, 2011 20:00
In case you need to change Database config mid-flight
ActiveRecord::Base.connection_pool.disconnect!
ActiveRecord::Base.connection_handler.remove_connection(ActiveRecord::Base)
Rails.application.config.database = new_database_config # not strictly necessary
ActiveRecord::Base.configurations = new_database_config
ActiveRecord::Base.establish_connection
current_scheduler = scheduler(:availabilities)
def current_scheduler.handle_exception(job, exception)
Airbrake.do_the_right_thing(exception, other_params)
puts "job #{job.job_id} caught exception '#{exception}' - the Airbrake has been triggered"
end
@kronn
kronn / fetch_facts.sh
Last active December 15, 2015 20:40 — forked from niklas/fetch_facts.sh
#!/bin/bash
ssh_host=$1
host_name=${2:-$ssh_host}
puppet_version="2.7.1"
if [ -z "$ssh_host" ]; then
echo "please provide hostname for node to fetch facts from"
exit
fi
#!/usr/bin/env bash
# An own database for every branch
#
# 1) put this script somewhere, make it executable (chmod +x)
# 2) modify your database.yml:
# development:
# adapter: postgresql
# database: "<%= `path/to/stored_script` %>"
# 3) If you want a separate db for your branch, follow the instructions on STDERR on environment startup

Keybase proof

I hereby claim:

  • I am kronn on github.
  • I am kronn (https://keybase.io/kronn) on keybase.
  • I have a public key ASAibO_1tMYCUH7PN-MxnSXnXqU8EnXmBCFc-48kHAvXmAo

To claim this, I am signing this object:

@kronn
kronn / .overcommit.yml
Created September 5, 2017 11:30
Overcommit plugin for checking the license header (simpler than upstream)
PreCommit:
UpdatedLicenseHeader:
enabled: true
description: 'Checking if license is present and updated'
@kronn
kronn / git-review
Last active July 20, 2018 09:17
a little script to review feature-branches
#!/usr/bin/env ruby
# rubocop:disable Style/SpecialGlobalVars
begin
require 'ruby-progressbar'
rescue LoadError
system 'gem', 'install', 'ruby-progressbar'
exec "#{$0} #{ARGV.join(' ')}"
end