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 / 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, "."
@wikimatze
wikimatze / blog_tutorial_admin_creation.sh
Last active May 10, 2018 05:44
Example output for the blog-tutorial of Padrino for admin creation (http://padrinorb.com/guides/getting-started/blog-tutorial/)
$ padrino g admin
force .components
create admin
exist admin
create admin/controllers/base.rb
create admin/controllers/sessions.rb
create public/admin
create public/admin/images/favicon.ico
create public/admin/images/font/FontAwesome.otf
create public/admin/images/font/fontawesome-webfont.eot
@wikimatze
wikimatze / blog-tutorial.sh
Last active May 9, 2018 21:25
Example output for the blog-tutorial of Padrino (http://padrinorb.com/guides/getting-started/blog-tutorial/)
$ padrino g project blog-update -t rspec -e haml -c scss -s jquery -d sequel -b
create
create .gitignore
create config.ru
create config/apps.rb
create config/boot.rb
create public/favicon.ico
create public/images
create public/javascripts
create public/stylesheets
# 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.
@wikimatze
wikimatze / vimfest2017.txt
Created September 21, 2017 19:47
The agenda for Vimfest 2017
= 2017-09-22 Fri =
(Getting to know each other)
17-20h Hacking
20-23h Dinner + Drinks
= 2017-09-23 Sat =
10:00-10:10 Boarding
10:20-10:50 Daniel Siepmann: Writing NeoVim Plugins using Python Plugin