Skip to content

Instantly share code, notes, and snippets.

François GrandSchtroumpf

Block or report user

Report or block GrandSchtroumpf

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 world.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GrandSchtroumpf
GrandSchtroumpf / bottom-nav-bar.dart
Created Dec 13, 2019
Flutter Example - bottom nav bar
View bottom-nav-bar.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
debugShowCheckedModeBanner: false,
// Title
title: "Using Tabs",
// Home
home: MyHome()));
}
View nav-drawer.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
debugShowCheckedModeBanner: false,
home: HomeScreen(), // route for home is '/' implicitly
routes: <String, WidgetBuilder>{
SettingsScreen.routeName: (BuildContext context) => SettingsScreen(),
AccountScreen.routeName: (BuildContext context) => AccountScreen(),
},
@GrandSchtroumpf
GrandSchtroumpf / flutter_test.dart
Created Nov 19, 2019
Test to build integrate a flutter gist inside dartpad
View flutter_test.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
@GrandSchtroumpf
GrandSchtroumpf / Project.sol
Last active Nov 19, 2019
A naive Solidity contract that manages funds for a project
View Project.sol
pragma solidity >=0.5.0 <0.6.0;
// 10000000000000000000 // 10 Ethers
contract Project {
// The address who deployed the contract
address private owner;
// The cap to achieved to fund the project
uint public cap;
// The total funded.
@GrandSchtroumpf
GrandSchtroumpf / plugin-ws.js
Created Nov 4, 2019
Exemple using plugin-ws
View plugin-ws.js
const pluginWs = require('@remixproject/plugin-ws')
const express = require('express')
const ws = require('express-ws')
const bodyParser = require('body-parser');
const cors = require('cors');
const app = express()
ws(app)
app.use(bodyParser.urlencoded({extended: true}))
@GrandSchtroumpf
GrandSchtroumpf / fireauth.service.preview.ts
Created Sep 9, 2019
Preview of Firebase Auth Service
View fireauth.service.preview.ts
import { inject } from '@angular/core';
import { AngularFireAuth } from '@angular/fire/auth';
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
import { auth, User } from 'firebase';
import { switchMap, tap } from 'rxjs/operators';
import { Observable, of, combineLatest } from 'rxjs';
import { Store } from '@datorama/akita';
export const fireAuthProviders = ['github', 'google', 'microsoft', 'facebook', 'twitter' , 'email'] as const;
View scenario.json
{
"accounts": {
"account{0}": "0xca35b7d915458ef540ade6068dfe2f44e8fa733c"
},
"linkReferences": {},
"transactions": [
{
"timestamp": 1563522532175,
"record": {
"value": "0",
@GrandSchtroumpf
GrandSchtroumpf / ERC20.sol
Created Jul 18, 2019
Base code for meetup
View ERC20.sol
pragma solidity >=0.5.0 <0.6.0;
import "https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol";
contract ERC20 {
using SafeMath for uint256;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
event Transfer(address indexed from, address indexed to, uint256 amount);
View ERC20.sol
pragma solidity >=0.5.0 <0.6.0;
import "https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol";
contract ERC20 {
using SafeMath for uint256;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
event Transfer(address indexed from, address indexed to, uint256 amount);
You can’t perform that action at this time.