Skip to content

Instantly share code, notes, and snippets.

View nothingmuch's full-sized avatar
🤔

Yuval Kogman nothingmuch

🤔
View GitHub Profile
Model::KiokuDB:
dsn: dbi:SQLite:dbname=root/db
<Model KiokuDB>
dsn dbi:SQLite:dbname=root/db
</Model>
__PACKAGE__->config(
'Plugin::Authentication' => {
realms => {
default => {
credential => {
class => 'Password',
password_type => 'self_check'
},
store => {
class => 'Model::KiokuDB',
package Kitten::Friend::Model::KiokuDB;
use Moose;
extends qw(KiokuX::Model);
sub insert_kitten {
my ( $self, $kitten ) = @_;
my $id = $self->txn_do(sub {
$self->store($kitten);
package Kitten::Friend::Web::Model::KiokuDB;
use Moose;
use Kitten::Friend::Model::KiokuDB;
BEGIN { extends qw(Catalyst::Model::KiokuDB) }
has '+model_class' => ( default => "Kitten::Friend::Model::KiokuDB" );
1;
• [syeeda:/tmp/foo] nothingmuch % git init
Initialized empty Git repository in /private/tmp/foo/.git/
• [syeeda:/tmp/foo] nothingmuch % echo foo > foo
• [syeeda:/tmp/foo] nothingmuch % git add foo
• [syeeda:/tmp/foo] nothingmuch % git commit -m "add foo"
[master (root-commit)]: created 403b7b4: "add foo"
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 foo
• [syeeda:/tmp/foo] nothingmuch % git checkout -b contributer
Switched to a new branch "contributer"
• [syeeda:/tmp/foo] nothingmuch % git reset --hard contributer@{1}
HEAD is now at c4ac515 modify foo
• [syeeda:/tmp/foo] nothingmuch % git merge master
Merge made by recursive.
• [syeeda:/tmp/foo] nothingmuch % git log --all --decorate
commit 7290abd93ecc30e984b93bd7eed577baef5f2ba1 (refs/heads/contributer)
Merge: c4ac515... 1515d1a...
Author: Yuval Kogman <nothingmuch@woobling.org>
Date: Sat May 16 05:47:05 2009 +0200
• [syeeda:/tmp/foo] nothingmuch % git log
commit 72f802f6b0318ed9bad918fd1e9b4fabb293f6c7
Merge: 5b7fe70... ec9dcfb...
Author: Yuval Kogman <nothingmuch@woobling.org>
Date: Sat May 16 06:08:27 2009 +0200
Merge branch 'master' into contrib
commit ec9dcfb20d582d87c230da5c4f65bd0d9cfd5bba
Author: Yuval Kogman <nothingmuch@woobling.org>
package MyFoo::Schema::Identity;
use Moose::Role;
has user => (
isa => "MyFoo::Schema::User",
is => "ro",
required => 1,
);
package MyFoo::Schema::Identity::Username;
/*********************** MOVED ************************
* *
* this script now lives at *
* http://github.com/nothingmuch/jquery-gist-upgrade/ *
* *
****************************************************** /