Skip to content

Instantly share code, notes, and snippets.

View kotevcode's full-sized avatar
💾
Building

Shahaf kotevcode

💾
Building
View GitHub Profile
@kotevcode
kotevcode / laravel-deploy.sh
Last active October 14, 2017 10:22
A Laravel deploy script
#!/bin/bash
# Shutdown the app
# php artisan down
# Pulling latest changes
git pull origin master
# Install composer while optimizing
composer install --no-dev --optimize-autoloader
# Optimizing cache
php artisan cache:clear
@kotevcode
kotevcode / oneflow.php
Created August 1, 2018 14:16
a php integration with oneflow
<?php
use GuzzleHttp\Client;
$credentials = [
'api' => 'https://orders.oneflow.io/api',
'token' => 'your_token',
'secret' => 'your_secret',
'destination' => 'supplier_key',
];
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
contract NFTradeNFTToken is ERC721, AccessControl {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
interface ERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address account, uint256 amount) external;
}
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Address.sol";
interface RoyaltiesInterface {
function claimCommunity(uint256 tokenId) external;
}
abstract contract RoyaltiesAddon is ERC721URIStorage {