Skip to content

Instantly share code, notes, and snippets.

@dixia
dixia / techneek_meetup_eosio.txt
Last active May 21, 2019 06:03
Techneek meetup technical demo script
Nodeos command:
nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::http_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --access-control-allow-origin='*' --contracts-console --http-validate-host=false --verbose-http-errors
CDT:
eosio-cpp registry.cpp -o registry.wasm
Cleos commands:
@dixia
dixia / hackathon_how_to.md
Last active November 9, 2018 03:24 — forked from sergmetelin/hackathon_how_to.md
Hackathon Getting Started guide

About EOSIO

The EOS.IO software introduces a new blockchain architecture designed to enable vertical and horizontal scaling of decentralized applications. This is achieved by creating an operating system-like construct upon which applications can be built. The software provides accounts, authentication, databases, asynchronous communication and the scheduling of applications across many CPU cores or clusters. The resulting technology is a blockchain architecture that may ultimately scale to millions of transactions per second, eliminates user fees, and allows for quick and easy deployment and maintenance of decentralized applications, in the context of a governed blockchain.

About this guide:

Full documentation can be found at https://developers.eos.io/

This means your portal is correctly setup for the hackathon.

{"sig":"6a9ed98416712af85e247fad1c93c087bc293dcd82c1e145cb1215f06404265e31d581ea1b7569fb53372178e3aca9a9a4e304853eba0d21d5ec8891d4f7cf80","msghash":"61ec0353e6b3cbcb75cd1cade280097ec079b3f4660903aee6d28e816d4bcd87"}
@dixia
dixia / gist:24af9e1f07f0af3848a4
Created December 23, 2015 10:59
Save a typed array as a binary file
(function(console){
console.saveBlob = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'
@dixia
dixia / texture_garbage
Created January 21, 2015 14:03
should explicitly delete texture
var a = []
a.push(gl.createTexture())
a.pop()
a = null
//texture created at #2 is not delete from graphics card
@dixia
dixia / gist:a351ab65152c6e85092f
Last active August 29, 2015 14:08
emscripten malloc issue
//decompressionWorker.js
'use strict';
/*jslint worker: true*/
/*jslint browser: true*/
@dixia
dixia / gist:6883525
Created October 8, 2013 11:51
'20131007'.cut 3,5 => ['2013','10','07']
require 'test/unit'
class String
def cut *arg
raise TypeError unless arg.is_a? Array and arg.first.is_a? Fixnum
start = 0
arg.map do |n|
r = start..n
start = n + 1
r
@dixia
dixia / dump device tokens from Urbanairship
Created June 28, 2013 12:16
Dumping device tokens from Urbanairship. Pry is used.
require 'rubygems'
require 'httparty'
require 'pry'
results = []
def get_device_tokens url
if url.nil?
url = "https://go.urbanairship.com/api/device_tokens/"
end
options = {:basic_auth => {:username => 'x', :password => 'x'}}
class Array
def take_last n
self[(self.size-n)...self.size]
end
def drop_last n
self[0...-n]
end
end
@dixia
dixia / TimeOfDay.rb
Created December 12, 2012 12:39
A time subclass represents only the time of a day.
class TimeOfDay < Time
def <=>(another_time)
self_time_of_day = Time.local(Time.now.year, Time.now.month, Time.now.day,
self.hour, self.min, self.sec )
another_time_of_day = Time.local(Time.now.year, Time.now.month, Time.now.day,
another_time.hour, another_time.min, another_time.sec)
self_time_of_day <=> another_time_of_day
end
end