Skip to content

Instantly share code, notes, and snippets.

@roshkins
roshkins / gist:9772469
Created March 25, 2014 22:06
Here is how I generated my image...
require 'RMagick'
include Magick
img = Image.new(1000,1000)
def fib_arr(num)
return [1] if num == 1
return [1,1] if num == 2
nums = fib_arr(num-1)
return nums + [nums[-1] + nums[-2]]
@roshkins
roshkins / reversed_num.rb
Last active December 20, 2015 02:58
My four line solution for reversing a number.
def reverse(num)
return num if num < 10
return (num % 10) * 10 ** Math.log10(num).floor + reverse(num/10)
end
#include <SPI.h>
#include <RTClib.h>
#include <SD.h>
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
@roshkins
roshkins / moopaloosextensions.md
Last active October 22, 2018 22:05
Moopaloo's Twitch Extensions

Moopaloo's Twitch Extensions

You saw me developing at TwitchCon, now get your own extension made!

Or get your other software made, my skills include many Web App skills, such as React, Redux, Jest/Enzyme for Unit Testing, HTML, CSS, JavaScript used in production environments.

I have Backend skills using:

  • Python, Node.js (JavaScript), GoLang, Ruby I've done desktop .net development with .net, C#, Visual Basic. I can probably help you debug or finish your project.
#include <eosiolib/eosio.hpp>
using namespace eosio;
class [[eosio::contract]] victorytoken : public eosio::contract {
public:
victorytoken(name receiver, name code, datastream<const char*> ds): contract(receiver, code, ds) {}
[[eosio::action]] void addbid(name user, int64_t price, uint64_t quantity) {
@roshkins
roshkins / DemurrageNFT.sol
Created March 20, 2021 22:56
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.7.0+commit.9e61f92b.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import {RedirectAll, ISuperToken, IConstantFlowAgreementV1, ISuperfluid} from "./RedirectAll.sol";
import {ERC721} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0-solc-0.7/contracts/token/ERC721/ERC721.sol";
import {ERC1155} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0-solc-0.7/contracts/token/ERC1155/ERC1155.sol";
/* Hello and welcome to your first Super App!
* In order to deploy this contract, you'll need a few things
@roshkins
roshkins / DemurrageNFT.sol
Created March 20, 2021 23:01
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.7.0+commit.9e61f92b.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import {RedirectAll, ISuperToken, IConstantFlowAgreementV1, ISuperfluid} from "./RedirectAll.sol";
import {ERC721} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0-solc-0.7/contracts/token/ERC721/ERC721.sol";
import {ERC1155} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0-solc-0.7/contracts/token/ERC1155/ERC1155.sol";
/* Hello and welcome to your first Super App!
* In order to deploy this contract, you'll need a few things
@roshkins
roshkins / DemurrageNFT.sol
Created March 21, 2021 02:27
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.7.0+commit.9e61f92b.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import {RedirectAll, ISuperToken, IConstantFlowAgreementV1, ISuperfluid} from "./RedirectAll.sol";
import {ERC721} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0-solc-0.7/contracts/token/ERC721/ERC721.sol";
import {ERC1155} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.2.0-solc-0.7/contracts/token/ERC1155/ERC1155.sol";
/* Hello and welcome to your first Super App!
* In order to deploy this contract, you'll need a few things
@roshkins
roshkins / guardianToggle.ahk
Created May 5, 2021 22:41
Toggle your Oculus Guardian with the insert key
toggl := False
Ins::
if toggl {
RunWait, %ComSpec% /c "adb shell setprop debug.oculus.guardian_pause 0"
toggl := False
} Else {
RunWait, %ComSpec% /c "adb shell setprop debug.oculus.guardian_pause 1"
toggl := True
}
@roshkins
roshkins / .deps...npm...@openzeppelin...contracts@4.4.0...access...AccessControl.sol
Created December 20, 2021 21:11
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";