Skip to content

Instantly share code, notes, and snippets.

View wikimatze's full-sized avatar
💭
Writing

Matthias Günther wikimatze

💭
Writing
View GitHub Profile
@wikimatze
wikimatze / slides.md
Created April 22, 2021 10:26
Basic introduction into tmux

%title: tmux - terminal multiplexer for Unix OS %author: @wikimatze %date: 2021-04-22

-> tmux <-

-> Have multiple terminal sessions used in parallel in a single window <-

@wikimatze
wikimatze / _post.haml
Created October 14, 2018 17:18
padrino blog tutorial _post.haml
.column.is-7.is-offset-2
.card.article
.card-content
.media
.media-content.has-text-centered
%p.title.article-title
%h3.has-text-centered
= link_to post.title, url_for(:posts, :show, :id => post.id)
.has-addons
%span.tag.is-rounded= time_ago_in_words(post.created_at || Time.now) + ' ago'
@wikimatze
wikimatze / application.js
Last active October 14, 2018 17:01
padrino blog tutorial application js
document.addEventListener('DOMContentLoaded', function () {
// Get all "navbar-burger" elements
var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.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
wikimatze / application.css
Last active October 14, 2018 17:01
padrino blog tutorial application css
.hero-body {
background-image: url(https://farm3.staticflickr.com/2840/33942486610_e0c80a7999_o_d.jpg);
background-position: center;
background-size: cover;
background-repeat: no-repeat;
height: 700px;
background-color: black;
}
h1.title {
@wikimatze
wikimatze / application.haml
Last active October 14, 2018 17:01
padrino blog tutorial application layout
!!! Strict
%html
%head
%title= "Padrino Sample Blog"
= stylesheet_link_tag 'bulma', 'application'
= javascript_include_tag 'jquery', 'application'
%body
%nav.navbar
%div.container
.navbar-brand
@wikimatze
wikimatze / migrateExistingPostsToFirstAccount.rb
Last active October 14, 2018 16:56
padrino blog tutorial migrateExistingPostsToFirstAccount
Sequel.migration do
up do
first_account_id = from(:accounts).get(:id)
if first_account_id
from(:posts).update(account_id: first_account_id)
end
end
down do
@wikimatze
wikimatze / show.haml
Last active October 14, 2018 16:55
padrino blog tutorial show.haml
%section.articles
.column.is-8.is-offset-2
.card.article
.card-content
.media
.media-content.has-text-centered
%h3.title.article-title= @post.title
.tags.has-addons.level-item
%span.tag.is-rounded= time_ago_in_words(@post.created_at || Time.now) + ' ago'
.content.article-body
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, "."
# Vim Conf 2017

author
:   Matthias Günther


# Talks 1
@wikimatze
wikimatze / vimb_error.txt
Created November 11, 2017 04:48
Error when starting vimb 2.12
Here is the stacktrace:
```
NOT SANDBOXED
[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 <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.