Skip to content

Commit de41194

Browse files
committed
formatting
1 parent 7218f1b commit de41194

23 files changed

+54
-51
lines changed

app/Console/Kernel.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ protected function schedule(Schedule $schedule)
2222

2323
$schedule->job(GenerateSitemapJob::class)->dailyAt('1:03');
2424

25-
$schedule->job(SendAdminAlertJob::class )->dailyAt('17:30');
25+
$schedule->job(SendAdminAlertJob::class)->dailyAt('17:30');
2626

2727
$schedule->command('backup:run-configless --disable-notifications --only-db --set-destination-disks=dropbox')->weeklyOn(2, '2:11');
2828
}
2929

3030
protected function commands()
3131
{
32-
$this->load([
33-
__DIR__.'/Commands',
34-
]);
32+
$this->load(__DIR__.'/Commands');
3533
}
3634
}

app/Http/Controllers/KeyPagesController.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ public function stats()
7373
});
7474

7575
return view($this->coinType.'-stats', [
76-
'today' => $allTime->firstWhere('date', now()->toDateString()) ?? optional(),
76+
'today' => $allTime->firstWhere('date', now()->toDateString()) ?? optional(),
7777
'thisMonth' => CoinStats::combine($thisMonth),
7878
'lastMonth' => CoinStats::combine($lastMonth),
79-
'allTime' => CoinStats::combine($allTime),
79+
'allTime' => CoinStats::combine($allTime),
8080
'smallestPages' => SmallestRandomPage::listForCoin($this->coinType),
81-
'biggestPages' => BiggestRandomPage::listForCoin($this->coinType),
81+
'biggestPages' => BiggestRandomPage::listForCoin($this->coinType),
8282
'maxPage' => $this->pageNumber::lastPageNumber(),
8383
]);
8484
}
@@ -97,13 +97,13 @@ public function keysPage($pageNumber = null)
9797
CoinStats::coinPageViewed($this->coinType, count($keys));
9898

9999
return view($this->coinType.'-page', [
100-
'pageNumber' => $pageNumber,
101-
'nextPage' => increment_string($pageNumber),
102-
'previousPage' => decrement_string($pageNumber),
103-
'lastPage' => $this->pageNumber::lastPageNumber(),
100+
'pageNumber' => $pageNumber,
101+
'nextPage' => increment_string($pageNumber),
102+
'previousPage' => decrement_string($pageNumber),
103+
'lastPage' => $this->pageNumber::lastPageNumber(),
104104
'isOnFirstPage' => $pageNumber === '1',
105-
'isOnLastPage' => $pageNumber === $this->pageNumber::lastPageNumber(),
106-
'keys' => $keys,
105+
'isOnLastPage' => $pageNumber === $this->pageNumber::lastPageNumber(),
106+
'keys' => $keys,
107107
]);
108108
}
109109

app/Http/Controllers/StatisticsPageController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ public function __invoke()
2828
});
2929

3030
return view('stats', [
31-
'today' => CoinStats::combine($allTime->where('date', now()->toDateString())),
31+
'today' => CoinStats::combine($allTime->where('date', now()->toDateString())),
3232
'thisMonth' => CoinStats::combine($thisMonth),
3333
'lastMonth' => CoinStats::combine($lastMonth),
34-
'allTime' => CoinStats::combine($allTime),
34+
'allTime' => CoinStats::combine($allTime),
3535
'smallestPages' => SmallestRandomPage::listForAllCoins(),
36-
'biggestPages' => BiggestRandomPage::listForAllCoins(),
36+
'biggestPages' => BiggestRandomPage::listForAllCoins(),
3737
'maxPage' => PageNumber::lastPageNumber(),
3838
]);
3939
}

app/Http/Kernel.php

+6-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use App\Http\Middleware\Authenticate;
66
use App\Http\Middleware\EncryptCookies;
77
use App\Http\Middleware\TrimStrings;
8-
use App\Http\Middleware\TrustProxies;
98
use App\Http\Middleware\KeyPageHumanVerification;
109
use App\Http\Middleware\VerifyCsrfToken;
1110
use Illuminate\Foundation\Http\Kernel as HttpKernel;
@@ -47,13 +46,13 @@ class Kernel extends HttpKernel
4746
* These middleware may be assigned to groups or used individually.
4847
*/
4948
protected $routeMiddleware = [
50-
'auth' => Authenticate::class,
51-
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
52-
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
49+
'auth' => Authenticate::class,
50+
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
51+
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
5352
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
54-
'can' => \Illuminate\Auth\Middleware\Authorize::class,
55-
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
56-
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
53+
'can' => \Illuminate\Auth\Middleware\Authorize::class,
54+
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
55+
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
5756

5857
'only-for-humans' => KeyPageHumanVerification::class,
5958
];

app/Keys/BitcoinPageKeys.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ protected function generateKeys()
4141
[$wif, $cpub, $pub] = explode(' ', trim($line, '{}'));
4242

4343
return [
44-
'wif' => $wif,
45-
'pub' => $pub,
44+
'wif' => $wif,
45+
'pub' => $pub,
4646
'cpub' => $cpub,
4747
];
4848
}, $lines);

app/Models/CoinStats.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static function coinPageViewed($coin, int $keysGenerated)
5757
'coin' => $coin,
5858
])
5959
->update([
60-
'pages_viewed' => DB::raw('pages_viewed + 1'),
60+
'pages_viewed' => DB::raw('pages_viewed + 1'),
6161
'keys_generated' => DB::raw("keys_generated + $keysGenerated"),
6262
]);
6363
}

app/Providers/RouteServiceProvider.php

+5-12
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,18 @@ class RouteServiceProvider extends ServiceProvider
1010
protected $namespace = 'App\Http\Controllers';
1111

1212
public function map()
13-
{
14-
$this->mapApiRoutes();
15-
16-
$this->mapWebRoutes();
17-
}
18-
19-
protected function mapWebRoutes()
2013
{
2114
Route::middleware('web')
2215
->namespace($this->namespace)
2316
->group(base_path('routes/web-routes.php'));
24-
}
2517

26-
protected function mapApiRoutes()
27-
{
28-
if (! app()->environment('local')) {
29-
return;
18+
if (app()->environment('local')) {
19+
$this->registerTestApiRoutes();
3020
}
21+
}
3122

23+
private function registerTestApiRoutes()
24+
{
3225
Route::middleware('api')
3326
->prefix('api/v1')
3427
->group(base_path('routes/api-test-routes.php'));

app/Support/helpers.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,5 @@ function allow_robots($coinType, $pageNumber)
160160
return EthereumPageNumber::allowRobots($pageNumber);
161161
}
162162

163-
throw new RuntimeException('Invalid coin type: '. $coinType);
163+
throw new RuntimeException('Invalid coin type: '.$coinType);
164164
}

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sjorso/keys",
3-
"description": "description",
4-
"keywords": ["key", "words"],
3+
"description": "Keys.lol",
4+
"keywords": ["keys"],
55
"license": "MIT",
66
"type": "project",
77
"require": {

database/seeds/CoinStatsSeeder.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ protected function seed(Carbon $date)
2626
CoinStats::create([
2727
'coin' => $coinType,
2828
'date' => $date->toDateString(),
29-
'pages_viewed' => $pagesViewed = random_int(0, 100000),
29+
'pages_viewed' => $pagesViewed = random_int(0, 100000),
3030
'random_pages_generated' => random_int(0, $pagesViewed),
31-
'keys_generated' => $pagesViewed * 128,
31+
'keys_generated' => $pagesViewed * 128,
3232
]);
3333
});
3434
}

readme.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Keys.lol
2-
Cryptocurrency private keys
2+
This repository contains the website for [Keys.lol](https://keys.lol).
3+
4+
The code that generates the keys is in [a separate repository](https://github.com/SjorsO/keys-generator).
35

46
## Laravel version
57
[Compare to laravel master](https://github.com/laravel/laravel/compare/915667a8d5fa31e7d35b617f64c47ab67a64a171...master)
@@ -10,11 +12,22 @@ Make sure the [keys generator executable](https://github.com/SjorsO/keys-generat
1012
```bash
1113
cp .env.example .env
1214

15+
# Fill in the .env file
16+
1317
composer install
1418

1519
php artisan key:generate
1620

17-
artisan migrate:fresh --seed
21+
artisan migrate:fresh
1822

1923
npm install && npm run dev
2024
```
25+
26+
## Contributing
27+
Feel free to open a pull request if you want to add new features, or if you want to help improve the code, design, text, seo, or any other part of the website.
28+
29+
If you want want to discuss an idea with me before implementing it, you can contact me by email, twitter, or by opening an issue.
30+
31+
## License
32+
33+
This project is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

resources/js/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ require('es6-promise').polyfill();
33

44
window.axios = require('axios');
55

6-
require('./blockadblock');
6+
require('./vendor/blockadblock');
File renamed without changes.

resources/views/home.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Yes, your private key is on this website too, but don't worry, nobody will ever find it.
1313
<br>
1414
<br>
15-
If you want to try finding your wallet, click one of the buttons below.
15+
If you want to try searching for your wallet, click one of the buttons below.
1616
</p>
1717

1818
<div class="flex items-center justify-between sm:justify-start my-8">

routes/api-test-routes.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
$hasBalance = $usedBefore && random_int(0, 100) > 80;
2222

2323
return [
24-
'final_balance' => $finalBalance = ($hasBalance ? random_int(1, 1204568646) : 0),
25-
'n_tx' => $usedBefore ? random_int(5, 150) : 0,
24+
'final_balance' => $finalBalance = ($hasBalance ? random_int(1, 1204568646) : 0),
25+
'n_tx' => $usedBefore ? random_int(5, 150) : 0,
2626
'total_received' => $usedBefore ? random_int($finalBalance, 2204568646) : 0,
2727
];
2828
}, $keys);

tests/TestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ abstract class TestCase extends BaseTestCase
1212

1313
protected function getSnapshotDirectory(): string
1414
{
15-
return base_path('tests/Files/_snapshots_');
15+
return base_path('tests/_snapshots_');
1616
}
1717

1818
public function createApplication()

webpack.mix.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const mix = require('laravel-mix');
2-
let tailwindcss = require('tailwindcss');
2+
const tailwindcss = require('tailwindcss');
33
require('laravel-mix-purgecss');
44

55
mix.disableNotifications();

0 commit comments

Comments
 (0)