Skip to content

Instantly share code, notes, and snippets.

View demonicblue's full-sized avatar

Henrik Hugo demonicblue

  • Gothenburg, Sweden
View GitHub Profile
@demonicblue
demonicblue / main.go
Created February 26, 2018 13:19 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"

Keybase proof

I hereby claim:

  • I am demonicblue on github.
  • I am dblue (https://keybase.io/dblue) on keybase.
  • I have a public key ASCMHn-tM7X7OwFvUKcYD847ju4yATLo0eOkOqfUT2zmPwo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am demonicblue on github.
* I am dblue (https://keybase.io/dblue) on keybase.
* I have a public key ASCMHn-tM7X7OwFvUKcYD847ju4yATLo0eOkOqfUT2zmPwo
To claim this, I am signing this object:
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
SELECT id, credits AS program_credits, NULL
FROM Students
NATURAL JOIN PassedCourses
NATURAL JOIN MandatoryCoursesForPrograms
OUTER JOIN Courses ON Courses.code = course
UNION
SELECT id, NULL, credits AS branch_credits
FROM Students
NATURAL JOIN PassedCourses
NATURAL JOIN MandatoryCoursesForBranches
SELECT id, sum(nvl(branch_credits, 0) + nvl(program_credits, 0)) as credits
FROM
(
SELECT id, SUM(b_credits) AS branch_credits, NULL AS program_credits
FROM
(
SELECT DISTINCT PC.id AS id, C.credits AS b_credits, C.code
FROM Courses C, MandatoryCoursesForBranches MCB, PassedCourses PC
WHERE PC.course = MCB.course AND PC.course = C.code
)
@demonicblue
demonicblue / gist:665493
Created November 6, 2010 15:43
sometimes chef starts but i end up with another long error output
thinkcloud-2:~ henrik$ cinderella
[Sat, 06 Nov 2010 16:37:42 +0100] INFO: Setting the run_list to ["homebrew", "homebrew::dbs", "homebrew::misc", "ruby", "ruby::irbrc", "node", "python"] from JSON
[Sat, 06 Nov 2010 16:37:42 +0100] INFO: Starting Chef Run (Version 0.9.12)
[Sat, 06 Nov 2010 16:37:42 +0100] INFO: Ran script[install_something] successfully
[Sat, 06 Nov 2010 16:37:42 +0100] INFO: Ran execute[include cinderella environment into defaults for ~/.bashrc] successfully
[Sat, 06 Nov 2010 16:37:42 +0100] INFO: Ran execute[include cinderella environment into defaults for ~/.zshrc] successfully
[Sat, 06 Nov 2010 16:37:42 +0100] INFO: Installing homebrew[git] version 1.7.3.2
[Sat, 06 Nov 2010 16:37:43 +0100] INFO: Ran script[updating homebrew from github] successfully
[Sat, 06 Nov 2010 16:37:44 +0100] INFO: Installing homebrew_db[redis] version 2.0.4
[Sat, 06 Nov 2010 16:37:44 +0100] INFO: Configuring redis to automatically start on login
@demonicblue
demonicblue / gist:665484
Created November 6, 2010 15:35
another error concering chef when running cinderella
thinkcloud-2:~ henrik$ cinderella
[Sat, 06 Nov 2010 16:31:35 +0100] INFO: Setting the run_list to ["homebrew", "homebrew::dbs", "homebrew::misc", "ruby", "ruby::irbrc", "node", "python"] from JSON
[Sat, 06 Nov 2010 16:31:35 +0100] INFO: Starting Chef Run (Version 0.9.12)
[Sat, 06 Nov 2010 16:31:35 +0100] ERROR: Running exception handlers
[Sat, 06 Nov 2010 16:31:35 +0100] ERROR: Exception handlers complete
/Users/henrik/Developer/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/1.8/tempfile.rb:167:in `close': closed stream (IOError)
from /Users/henrik/Developer/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/1.8/tempfile.rb:167
from /Users/henrik/Developer/.rvm/gems/ruby-1.8.7-p248/gems/chef-0.9.12/bin/../lib/chef/resource.rb:158:in `call'
from /Users/henrik/Developer/.rvm/gems/ruby-1.8.7-p248/gems/chef-0.9.12/bin/../lib/chef/resource.rb:158:in `load_prior_resource'
@demonicblue
demonicblue / cinderella error log
Created November 1, 2010 21:15
ecountering error while while trying to run cinderella
thinkcloud-2:atmos-cinderella-0508544 henrik$ cinderella
[Mon, 01 Nov 2010 22:14:37 +0100] INFO: Setting the run_list to ["homebrew", "homebrew::dbs", "homebrew::misc", "ruby", "ruby::irbrc", "node", "python"] from JSON
[Mon, 01 Nov 2010 22:14:37 +0100] INFO: Starting Chef Run (Version 0.9.12)
[Mon, 01 Nov 2010 22:14:37 +0100] ERROR: Running exception handlers
[Mon, 01 Nov 2010 22:14:37 +0100] ERROR: Exception handlers complete
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/tempfile.rb:167:in `close': closed stream (IOError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/tempfile.rb:167:in `callback'