Skip to content

Instantly share code, notes, and snippets.

View code-brewer's full-sized avatar

wangyouhua code-brewer

View GitHub Profile
@code-brewer
code-brewer / index.html
Last active October 26, 2019 03:09
rxjs_v6.x_cdn_defer_demo2 // source https://jsbin.com/josumud
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>rxjs_v6.x_cdn_defer_demo2 </title>
<!-- <script src="https://npmcdn.com/@reactivex/rxjs@5.0.0-beta.3/dist/global/Rx.umd.js"></script> -->
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.min.js"> </script>
</head>
@code-brewer
code-brewer / index.html
Last active October 26, 2019 02:44
rxjs_v6+_cdn_defer // source https://jsbin.com/josumud
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>distinctUntilChanged</title>
<!-- <script src="https://npmcdn.com/@reactivex/rxjs@5.0.0-beta.3/dist/global/Rx.umd.js"></script> -->
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.min.js"> </script>
</head>
@code-brewer
code-brewer / index.html
Last active October 26, 2019 02:18
rxjs_cdn_version_distinctUntilChanged// source https://jsbin.com/josumud
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>distinctUntilChanged</title>
<!-- <script src="https://npmcdn.com/@reactivex/rxjs@5.0.0-beta.3/dist/global/Rx.umd.js"></script> -->
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.min.js"> </script>
</head>
@code-brewer
code-brewer / index.html
Last active October 26, 2019 02:20
rxjs_cdn_version_6.x_bufferCount// source https://jsbin.com/deturan
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="brooze-wang's rxjs playground on jsbin">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>bufferCount</title>
<!-- <script src="https://npmcdn.com/@reactivex/rxjs@5.0.0-beta.3/dist/global/Rx.umd.js"></script> -->
<script src="https://unpkg.com/rxjs/bundles/rxjs.umd.min.js"> </script>
@code-brewer
code-brewer / RealmWrapper.md
Created April 15, 2019 02:13 — forked from codeopensrc/RealmWrapper.md
A javascript wrapper for the RealmDB node module used in React Native.

My RealmWrapper.js file. Uses RealmSchema.js for the schema.

You can find the "realmSchema.js" here and examples here

'use strict';

import Realm from 'realm';
import Schemas from "./realmSchemas.js";
const version = 51;
@code-brewer
code-brewer / pom.xml
Created April 1, 2019 07:50 — forked from mnadeem/pom.xml
Add non maven jar in maven way
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.demo.app</groupId>
<artifactId>demo-app</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<version.maven-install-plugin>2.5.2</version.maven-install-plugin>
<version.non-maven1>1.0.0</version.non-maven1>
@code-brewer
code-brewer / ByteStringOp.sol
Created January 3, 2019 11:30
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.2+commit.1df8f40c.js&optimize=false&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 15, 2018 00:51
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 14, 2018 16:50
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //
@code-brewer
code-brewer / ByteStringOp.sol
Created October 14, 2018 16:50
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity 0.4.25;
contract stringOpTest {
byte[] bs;
function convertingToString()public returns(string){
// bytes32 memory hw = "Hello World"; // TypeError: Storage location can only be given for array or struct types.
bytes32 hw = "Hello World"; //