Skip to content

Instantly share code, notes, and snippets.

View Swader's full-sized avatar
🏠
Buidling

Bruno Škvorc Swader

🏠
Buidling
View GitHub Profile
@Swader
Swader / edition_sections.php
Last active September 2, 2023 04:53
Cursor Migration Output
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEditionSectionsTable extends Migration
{
public function up()
{
@Swader
Swader / editions_and_editionsections.php
Created August 27, 2023 19:42
Code Llama Migration Output
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSectionsAndEditionSectionsTables extends Migration
{
/**
* Run the migrations.
@Swader
Swader / editions.php
Created August 27, 2023 11:33
ChatGPT Migration Output
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEditionsTable extends Migration
{
public function up()
{
Schema::create('editions', function (Blueprint $table) {
$table->id();
@Swader
Swader / create_failed_jobs_table.php
Created August 27, 2023 11:05
Laravel Breeze Migrations
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
@Swader
Swader / MyCryptoProfile.md
Created June 21, 2022 16:24
MyCryptoProfile.md

Linking my account swader on GitHub with my address 5CK8D1sKNwF473wbuBP6NuhQfPaWUetNsWUNAAzVwTfxqjfr on Substrate in mycryptoprofile.io, and the challenge code is: 0460bfdffa715f8b188a01128ad40b39. #LitentryVerifyMyAddress

5CvcK8o745NwUeLCmEoP4WpDPpB6eKduxR7fV3GtTJCvWysj
5Gdj9n5idJwTjJY5f2QWmrfu5yS57SGGEJt5rsw9UoLuRbYo
5CqULFyV8rgpy3bd3yJGfyFoPrn2EP46vnn86ey4FP5j4nih
5ED1tYzMYqN5pUFeQLNHUKqw9h7t6vrMzdPhiGxjPL4HMHqn
5EgtXK8zsxUu47Zg1ASZF7KzNtWowk6Grp9qEFeVC6C5vgDU
5CZnrJuy9iEYpcSUucTGzzmWvPj9hEicgBxXF3RFTooRXBRa
5HpRcaD8q95mejgSUsyaqbQeczYZcpbLzSvDZYBHj7ZFvtfJ
5Gs3Vmbsr2xaBLCKwTqvUfT511u14QB9jqks2WEsQyWvNvLC
5GbrTYbpLNanZ9c3TjkAURAT91VchpTtE82Vy2mgiex8gqTt
5C89Z5bkp3nAjEcnFFsYxW7b5rj3X3PK38p46zNPYSyWXtQT
use frame_support::{decl_module, decl_storage, decl_event, decl_error, ensure};
use sp_std::vec::Vec;
use system::ensure_signed;
pub trait Trait: system::Trait {
type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
}
decl_event! {
pub enum Event<T> where AccountId = <T as system::Trait>::AccountId {
@Swader
Swader / login.php
Created February 24, 2020 10:44
snippets
</form>
<!-- -------↓↓↓↓ ADD THIS ↓↓↓↓------ -->
<div style="margin-top:10px"><button type="submit" class="btn btn-primary" id="web3login">Log in with Web3</button></div>
<div>
<select name="web3account" id="web3accounts" style="display:none"></select>
<button type="submit" class="btn btn-primary" id="web3loginConfirm" style="display:none">Confirm login</button>
@Swader
Swader / id_rsa.pub
Created August 5, 2019 22:40
Pubkey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCb0AVAqC1Bouz25uJVBPAeOqnUlZXid10V3RuQWw3oFLyNDu2JjQ9032IiHcKyZf/FbqBDngCnybCSeMtqZx4dxMGxXrvzkHDW+ZcsdY3k8bLy4RZaKKNgINrBHASsjrn22Oqya5GlkK9/NdcaCxWjmMoy9gbdBAnDD4fYukAEMw7CMKnL9DIfHNp0qykEBSPeM9g7OyZZaHmTscgoCX/nApmkZ3G3ug2XcSwpPLVF0vSLN/Ieutjl1+lUUTkrzBLxPByoG62a0Vgtkn0HRonmO85uXAMH3K46yLlHj6cW4FeIZuIsSlW82TN8S3wBD67nJfhPeM30YQP4I/HdF6H/ swader@ubruntu
@Swader
Swader / humanRewarder.sol
Created July 22, 2019 22:10
HumanRewarder
pragma solidity 0.5.1;
contract HasVoted {
mapping (address => bool) public voted;
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);