Skip to content

Instantly share code, notes, and snippets.


Matthias Günther wikimatze

Block or report user

Report or block wikimatze

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
wikimatze / _post.haml
Created Oct 14, 2018
padrino blog tutorial _post.haml
View _post.haml
= link_to post.title, url_for(:posts, :show, :id =>
.has-addons time_ago_in_words(post.created_at || + ' ago'
wikimatze / application.js
Last active Oct 14, 2018
padrino blog tutorial application js
View application.js
document.addEventListener('DOMContentLoaded', function () {
// Get all "navbar-burger" elements
var $navbarBurgers ='.navbar-burger'), 0);
// Check if there are any navbar burgers
if ($navbarBurgers.length > 0) {
// Add a click event on each of them
$navbarBurgers.forEach(function ($el) {
$el.addEventListener('click', function () {
wikimatze / application.css
Last active Oct 14, 2018
padrino blog tutorial application css
View application.css
.hero-body {
background-image: url(;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
height: 700px;
background-color: black;
h1.title {
wikimatze / application.haml
Last active Oct 14, 2018
padrino blog tutorial application layout
View application.haml
!!! Strict
%title= "Padrino Sample Blog"
= stylesheet_link_tag 'bulma', 'application'
= javascript_include_tag 'jquery', 'application'
wikimatze / migrateExistingPostsToFirstAccount.rb
Last active Oct 14, 2018
padrino blog tutorial migrateExistingPostsToFirstAccount
View migrateExistingPostsToFirstAccount.rb
Sequel.migration do
up do
first_account_id = from(:accounts).get(:id)
if first_account_id
from(:posts).update(account_id: first_account_id)
down do
wikimatze / show.haml
Last active Oct 14, 2018
padrino blog tutorial show.haml
View show.haml
%h3.title.article-title= @post.title
.tags.has-addons.level-item time_ago_in_words(@post.created_at || + ' ago'
View my_template.rb
project :test => :rspec, :orm => :activerecord
generate 'model', 'account username:string password:string'
generate 'model', 'post title:string body:text'
generate 'controller', 'posts get:index get:new post:new'
generate 'controller', 'users get:index'
generate 'migration', 'AddEmailToAccount email:string'
require_dependencies 'nokogiri'
git :init
git :add, "."
wikimatze / vimb_error.txt
Created Nov 11, 2017
Error when starting vimb 2.12
View vimb_error.txt
Here is the stacktrace:
[fresh] [error] tables_open_display, glXQueryVersion returned False
[fresh] [error] tables_open_display, glXQueryVersion returned False
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
You can’t perform that action at this time.