Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
web
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
yii
 
 
 
 

README.md

Shitcode [codename happycode]

Shitty code can occur almost everywhere, on every moment of your life, Shitcode is place for storing (And sharing too!) worst of our programming nightmares. Created as weekend project (So it's shitty as well) because... why not?

So if you have some shitty project or code and want to share it go ahead. Any contributions are welcome, including PRs, and bug reports.

REQUIREMENTS

PHP >= 5.4 (5.5 recommended because of array_column), some server, and cup of coffee (for me).

INSTALLATION

Just clone this repo into some working directory (you should know how to do that) and install dependencies with composer:

php /path/to/composer.phar install

WebServer

Your domain (I recommend using something like shitcode.dev) should point to /web/ folder, example config in apache:

<VirtualHost *:80>
    ServerAdmin webmaster@shitcode.dev
    DocumentRoot "/path/to/shitcode/web"
    ServerName shitcode.dev
    ErrorLog "logs/shitcode-error.log"
    CustomLog "logs/shitcode-access.log" common
</VirtualHost>

Or in nginx (including rewrite!):

server {
    listen 80;
    root /path/to/shitcode/web/;
    server_name shitcode.dev;

    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }
}

You can define alias too, but I assume that you know how to do it.

Database

Create database on your server, import tables from file schema.sql and fill config/db.php with your data, for example:

<?php return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=shitcode',
    'username' => 'root',
    'password' => '1234',
    'charset' => 'utf8',
];

Oh, and you have to configure mailer in config/mailer.php:

<?php return [
    'class' => 'yii\swiftmailer\Mailer',
    'useFileTransport' => true,
];

Now you're ready to go and login using admin admin@shitcode.test and password admin.

License

CreativeCommons BY-NC-SA

Oh, and yes, I know about r/badcode and govnokod.ru.

About

Home for shitty code from whole world.

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.