Skip to content

Instantly share code, notes, and snippets.

View litecreator's full-sized avatar

Marlon Hanks litecreator

View GitHub Profile
@litecreator
litecreator / erc20-token-sample.sol
Created October 16, 2021 08:37 — forked from jcmartinezdev/erc20-token-sample.sol
Necessary code to generate an ERC20 Token
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Sample token contract
//
// Symbol : LCST
// Name : LCS Token
// Total supply : 100000
// Decimals : 2
// Owner Account : 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe
@litecreator
litecreator / gist:9b269108dfbc0ca9ff7e15b26d44a86c
Created May 21, 2021 22:49
Regex to Validate Litetokens Addresses
^(L)[a-zA-HJ-NP-Z0-9]{25,39}$

Current strategy

$  ./zenbot.sh trade gdax.eth-USD --trend_ema 20 -period 7m --max_slippage_pct 0.48 --poll_trades 6000 --order_poll_time 6000 --order_adjust_time 6000 --oversold_rsi_periods=1000 --oversold_rsi=1000 --rsi_periods=1100 --neutral_rate=0.1 --max_sell_loss_pct=0.85 --max_buy_loss_pct=5 --buy_pct=100 --sell_pct=100 --selector gdax.eth-usd  --markup_sell_pct 0.25  --markdown_buy_pct 0.00  --reset-profit

The role of buy & sell percentages (PCT)

#!/usr/bin/env sh
# Compiler Alternatives on Ubuntu 20
# Remove all existing alternatives
sudo update-alternatives --remove-all cc
# exit on first error
set -e
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 2
@litecreator
litecreator / headlessvm.md
Created December 22, 2020 23:33 — forked from elasticskyx/headlessvm.md
Run VirtualBox Virtual Machines in Headless Mode #virtualbox #windows #vm

Setup a Headless Virtual Machine on Windows using Oracle VirtualBox

If you are concerned with having many windows open when running several virtual machines on your Windows server or workstation, then have them run headless using VirtualBox commandline tools. Additionally, you can manage these VM's using RDP (Mircrosoft Terminal Server Connection - mstsc.exe) or SSH access (if enabled)

Install VirtualBox and Extension Packs

  • Download the latest version and install of [Oracle VirtualBox] [vbox]
  • Download the [VirtualBox Extension Pack] [vbox] and install for the same version
@litecreator
litecreator / Setup GCC and CLANG Toolchains.md
Created December 18, 2020 02:48 — forked from bhaskarvk/Setup GCC and CLANG Toolchains.md
Proper GCC (vers. 5/6/7) & LLVM/CLANG (vers. 4/5) Toolchain Setup on Ubuntu/Linux Mint

This approach uses update-alternatives to manage GCC and LLVM/CLANG C/C++ compiler toolchains. Although tested on Linux Mint 18.3, this approach should work on any Debian based distro or for that matter any Linux distro with update-alternatives support, provided the packages are installed correctly.

There are 3 files

  • gcc-alternatives.sh installs GCC versions 5/6/7 and sets up alternatives for gcc/g++/cpp/gfortran.
  • llvm-clang-alternatives.sh installs LLVM and CLANG versions 4/5 and sets up alternatives for various LLVM and CLANG programs including clang and clang++.
  • cc-alternatives.sh sets up alternatives for the cc, cxx, and the ld commands. This script can be used to change systemwide default compiler/linker combination to either GCC or CLANG.

Once these scripts are run you can change the system GCC/CLANG versions by running sudo update-alternatives --config gcc|clang. To change the default compiler/linker combo used by t

pragma solidity >=0.4.22 <0.6.0;
contract owned {
address public owner;
constructor() public {
owner = msg.sender;
}
modifier onlyOwner {
pragma solidity >=0.4.22 <0.6.0;
interface token {
function transfer(address receiver, uint amount) external;
}
contract Crowdsale {
address public beneficiary;
uint public fundingGoal;
uint public amountRaised;
pragma solidity >=0.4.22 <0.6.0;
interface tokenRecipient {
function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external;
}
contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
@litecreator
litecreator / hello.sol
Created January 13, 2019 19:17
The Vapory Hello Contract
pragma solidity ^0.4.18;
contract Hello {
string public message;
function Hello(string initialMessage) public {
message = initialMessage;
}
function setMessage(string newMessage) public {
message = newMessage;
}
}