Skip to content

Instantly share code, notes, and snippets.

View khebbie's full-sized avatar

Klaus Hebsgaard khebbie

View GitHub Profile
@khebbie
khebbie / Practices of a professional developer.md
Last active August 29, 2015 13:57
Practices of a proffesional developer

Over the years I have picked up a list of practices that I think are essential to a professional developer - these are of course my opinions - other may disagree.
We don't expect our customers or managers to ask for these things - but rather as professionals we do this because - well we are professionals. When estimating a task at hand we don't add "unit testing" tasks 'cause these are just things we do
Just like at doctor does not expect his patients to ask him to wash his hands - neither do we expect customers or managers to ask us to do unit testing etc.
Big books are written about each of these subjects, hence I don't go into much detail about each - I just list them.
Either research on the internet or find a good book if you don't understand an item. I am mostly a web developer, so these practices apply to that space - but most also apply to other spaces.

##Development, Integration, Test and Live environment As web developers we are not satisfied with the ["it works on my machine" mantra](http:/

set -g default-terminal "screen-256color"
# soften status bar color from harsh green to light gray
set -g status-bg '#777777'
set -g status-fg '#aaaaaa'
set -g status on
set -g status-keys vi
set -g history-limit 1000000
@khebbie
khebbie / .vimrc.local
Created August 25, 2014 08:57
.vimrc.local
let mapleader=" "
nnoremap <Leader>q :q<CR>
nnoremap <Leader>w :w<CR>
nnoremap <Leader>e :e
nnoremap <Leader>v :vsplit
nnoremap <Leader>s :split
nnoremap <Leader>p :CtrlP<CR>
nnoremap <Leader>g :vimgrep
nnoremap <Leader>c :copen<CR>
nnoremap <Leader>C :cclose<CR>
input {
udp {
port => 3334
codec => json_lines
type => "system_logs"
}
udp {
port => 3333
codec => json_lines
type => "business_logs"

Keybase proof

I hereby claim:

  • I am khebbie on github.
  • I am khebbie (https://keybase.io/khebbie) on keybase.
  • I have a public key whose fingerprint is 47A7 715E ACA9 2DED 4A75 70B6 A7FC 89FB 1737 2EAF

To claim this, I am signing this object:

SELECT
pg_terminate_backend(pid)
FROM
pg_stat_activity
WHERE
pid <> pg_backend_pid()
AND datname = 'database name';
@khebbie
khebbie / .irbrc
Last active August 29, 2015 14:23
My dotfiles for devbox (vagrant)
require 'active_support'
require 'active_support/core_ext'
# load a gem that may or may not be handled by bundler in your directory
# see links above for details on this
def unbundled_require gem
if defined?(::Bundler)
# Have to check for a version to avoid gems with dashes, e.g. pry-rails
spec_path = Dir.glob("#{Gem.dir}/specifications/#{gem}-[0-9]*.gemspec").last
if spec_path.nil?
@khebbie
khebbie / .gitconfig
Created August 11, 2015 06:59
New git config with Haackeds aliases
[user]
name = Klaus Hebsgaard
email = klaus@hebsgaard.dk
[alias]
co = checkout
aa = add --all .
br = branch
ci = commit
fu = reset --hard
# Log display from screencast, with train tracks.
@khebbie
khebbie / task.ex
Last active August 29, 2015 14:27
Elixir mix task
defmodule Mix.Tasks.Import do
use Mix.Task
def run(_) do
# place your task code here
end
end
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (ie. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()