Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Alex Siman siman

🏠
Working from home
Block or report user

Report or block siman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View acropolis-release-plan-by-alex.md

Pioneer


  • Description: The user interface for interacting with the platform.
  • Manager: Alex
  • Team:
    • Alex: Developer
    • Mokhtar: Developer
    • Martin: Testing
  • Main repo: apps
  • Current version: We didn't have a proper version for Pioneer before and just used the version that shipped with Polkadot Apps that is 0.32.0-beta.6.
View getStream-custom-doFeedRequest.js
import React from 'react';
import { StreamApp, NotificationDropdown, FlatFeed, LikeButton, Activity, CommentField, CommentList } from 'react-activity-feed';
import 'react-activity-feed/dist/index.css';
const customDoFeedRequest = (client, feedGroup, userId, options) => {
const feed = client.feed(feedGroup, userId);
const feedPromise = feed.get(options);
feedPromise.then((res) => {
console.log('doFeedRequest: Promise:', res.results);
res.results.forEach((activity) => {
@siman
siman / CounterWithContextAndUsereducer.tsx
Created Apr 28, 2019
Counter with Context and useReducer
View CounterWithContextAndUsereducer.tsx
import React, { useReducer, createContext, useContext } from 'react';
type CounterProps = {
initialCount: number
};
type CounterState = {
count: number
};
@siman
siman / MyAccountProvider.tsx
Created Apr 28, 2019
My account provider for Joystream UI
View MyAccountProvider.tsx
import React, { useReducer, createContext, useContext, useEffect } from 'react';
import store from 'store';
export const MY_ADDRESS = 'joy.myAddress';
function readMyAddress (): string | undefined {
const myAddress: string | undefined = store.get(MY_ADDRESS);
console.log('Read my address from the local storage:', myAddress);
return myAddress;
}
@siman
siman / substrate-blogs.rs
Created Mar 24, 2019
Separate fields (name, title, body, tabs)
View substrate-blogs.rs
#![cfg_attr(not(feature = "std"), no_std)]
use rstd::prelude::*;
use parity_codec::Codec;
use parity_codec_derive::{Encode, Decode};
use srml_support::{StorageMap, StorageValue, dispatch, decl_module, decl_storage, decl_event, ensure, Parameter};
use srml_support::traits::{Currency};
use runtime_primitives::traits::{Zero, SimpleArithmetic, As, Member, MaybeSerializeDebug};
use system::{self, ensure_signed};
use crate::governance::{GovernanceCurrency, BalanceOf };
@siman
siman / visual-code-user-settings.json
Last active Jun 30, 2019
Visual Studio Code with Rust syntax. You need to install "dark-plus-syntax" theme before.
View visual-code-user-settings.json
{
"window.zoomLevel": 1,
"gitlens.settings.mode": "advanced",
"eslint.enable": false,
"files.autoSave": "onFocusChange",
"files.associations": {
"*.css": "scss"
},
"editor.wordWrap": "on",
"editor.renderWhitespace": "boundary",
View keybase.md

Keybase proof

I hereby claim:

  • I am siman on github.
  • I am siman (https://keybase.io/siman) on keybase.
  • I have a public key ASC4Sc6unZDjkw96TnP-XHlxEi4f8L2CCswkyoZ0JfIg9wo

To claim this, I am signing this object:

@siman
siman / config.toml
Created Oct 2, 2018
tendermint config.toml
View config.toml
# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml
##### main base config options #####
# TCP or UNIX socket address of the ABCI application,
# or the name of an ABCI application compiled in with the Tendermint binary
proxy_app = "tcp://127.0.0.1:26658"
# A custom human readable name for this node
@siman
siman / image-proxy.conf
Created Sep 24, 2018 — forked from tmaiaroto/image-proxy.conf
Nginx Image Filter Resize Proxy Service
View image-proxy.conf
# Feel free to change this path of course (and keys_zone value as well, but also change the usage of it below).
proxy_cache_path /var/www/cache/resized levels=1:2 keys_zone=resizedimages:10m max_size=1G;
# Gzip was on in another conf file of mine...You may need to uncomment the next line.
#gzip on;
gzip_disable msie6;
gzip_static on;
gzip_comp_level 4;
gzip_proxied any;
# Again, be careful that you aren't overwriting some other setting from another config's http {} section.
You can’t perform that action at this time.