Skip to content

Instantly share code, notes, and snippets.

View soundyogi's full-sized avatar
🦊

KaiserMerkle soundyogi

🦊
View GitHub Profile
@soundyogi
soundyogi / ContractSend.tsx
Last active January 13, 2019 04:10
First Try of a generalized Drizzle Based Transaction Component with Context.Consumer
/* global web3 */
import React from 'react';
import { DrizzleContext } from "drizzle-react";
import { drizzleProviderFactory } from '../../Provider';
type IDrizzleContext = {
drizzle: object
drizzleState: object
initialized: boolean
@soundyogi
soundyogi / web3_resolver_ethereum_provider_2018.js
Last active October 30, 2018 04:04
avoid race conditions with web3 and be ready for new ethereum provider system ( provider.enable() ) 2nd. nov 2018
/* global window */
// originally from: https://github.com/adrianmcli
// adapted by me
import Web3 from 'web3'
const fallback = 'wss://mainnet.infura.io/ws'
@soundyogi
soundyogi / install_ionic_compiler.sh
Created September 2, 2018 23:27 — forked from javimosch/install_ionic_compiler.sh
Cloud9 Free VM (2048mb Storage) + Android Cordova Ionic Compiler
#vm machine needs nodejs
#download sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
rm android-sdk_r24.2-linux.tgz
mv android-sdk-linux/ android
#install essential sdk components
~/workspace/android/tools/android update sdk -u --all --filter 2,4,168
#install enviroment dependencies
sudo apt-get install lib32stdc++6
@soundyogi
soundyogi / ngrxintro.md
Created August 4, 2018 14:32 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@soundyogi
soundyogi / package.json
Created July 24, 2018 18:29 — forked from drcmda/package.json
webpack 4
"scripts": {
"dev": "node .dev/webpack.dev.server.js",
"dev-prod": "node .dev/webpack.dev.server.js --production",
"build": "rimraf ./dist && webpack --config .dev/webpack.config.production.js --colors",
},
"devDependencies": {
"@babel/core": "7.0.0-beta.38",
"@babel/plugin-proposal-class-properties": "7.0.0-beta.38",
"@babel/plugin-proposal-decorators": "7.0.0-beta.38",
"@babel/plugin-transform-classes": "7.0.0-beta.38",
@soundyogi
soundyogi / eventemitter.js
Created May 10, 2018 21:38 — forked from mudge/eventemitter.js
A very simple EventEmitter in pure JavaScript (suitable for both node.js and browsers).
/* Polyfill indexOf. */
var indexOf;
if (typeof Array.prototype.indexOf === 'function') {
indexOf = function (haystack, needle) {
return haystack.indexOf(needle);
};
} else {
indexOf = function (haystack, needle) {
var i = 0, length = haystack.length, idx = -1, found = false;
/* FLUX and UNIDIRECTIONAL DATAFLOW
GOAL: We will build a very simple Redux-Like Flux in this File.
Flux is the name for a pattern developed by facebook.
Intead of relying on React to manage state - we just let it do what it is good at.
Being a View Library.
With an external Datastore and Discrete "Actions" that transform it,
"Transactional State" can be achieved.
It also enables clean and seperate pipelines between - external input "events" like
the user clicking a button - and the data that actually has to change.
This is called: "Unidirectional Dataflow"
@soundyogi
soundyogi / threejs_morph_targets_more_than_8.js
Last active April 29, 2018 07:00
three js more than 8 morph targets non animated, pre-compute morph targets
/* Precompute Morph Target Shape
I needed 12 Morph Target but Three JS supports only 8 at runtime.
Since we did not use them for animation we used this to precompute our meshes.
By soundyogi, adapted from jspdown
*/
var vertices = geometry.attributes.position.array;
var morphTargets = geometry.morphAttributes.position;
var verticesReference = vertices.slice()
@soundyogi
soundyogi / shadowMaterial.js
Created April 29, 2018 06:44 — forked from ayamflow/shadowMaterial.js
ShaderMaterial that only renders shadow
// Minimal version of MeshBasicMaterial
// But removed everything except shadow
// then only render the shadow
var shadowMaterial = {
transparent: true,
uniforms: THREE.UniformsUtils.merge([
THREE.UniformsLib['common'],
THREE.UniformsLib['shadowmap']
]),
@soundyogi
soundyogi / bittrex_old_api_11_docs.txt
Last active April 15, 2018 15:45
Bittrex API 1.1 old docs save
# Because the new api docs miss so much information like nonce and apisign-ing I copied it from the google cache:
Developer's Guide - Api
Overview
Bittrex provides a simple and powerful REST API to allow you to programatically perform nearly all actions you can from our web interface. All requests use the application/json content type and go over https. The base url is https://bittrex.com/api/{version}/. All requests are GET requests and all responses come in a default response object with the result in the result field. Always check the success flag to ensure that your API call succeeded.
We are currently restricting orders to 500 open orders and 200,000 orders a day. We reserve the right to change these settings as we tune the system. If you are affected by these limits as an active trader, please email support@bittrex.com.
If you have any questions, feedback or recommendation for API support you can post a question in our support center.