Skip to content

Instantly share code, notes, and snippets.

/*!
* Start Bootstrap - Freelancer Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
body {
/*overflow-x: hidden;*/
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
import userProvider from '../resource/UserProvider'
const loginModule = {
namespaced: true,
state: {
userData: {}
},
mutations: {
SET_USER_DATA (state, data) {
state.userData = data
export default (state = {}, action) => {
switch (action.type) {
case 'LOGIN_SUCCESS':
return action.payload
default:
return state
}
}
import { takeEvery, put, call, fork } from 'redux-saga/effects'
import UserProvider from '../../resources/UserProvider'
const userProvider = new UserProvider()
function *loginRequest() {
yield takeEvery('LOGIN', login)
}
function* login(action) {
try {
yield put({type: "INCREASE_LOADING"});
const result = yield call(userProvider.signIn, action.payload.email, action.payload.password)
class ObservableTodoStore {
@observable todos = [];
@observable pendingRequests = 0;
constructor() {
mobx.autorun(() => console.log(this.report));
}
@computed get completedTodosCount() {
return this.todos.filter(
@observer
class TodoList extends React.Component {
render() {
const store = this.props.store;
return (
<div>
{ store.report }
<ul>
{ store.todos.map(
(todo, idx) => <TodoView todo={ todo } key={ idx } />
@jitinics
jitinics / ballot.sol
Created September 30, 2019 07:49
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.11+commit.c082d0b4.js&optimize=true&gist=
pragma solidity ^0.5.0;
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/access/roles/MinterRole.sol";
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/ERC20.sol";
contract CoinFactory is MinterRole, ERC20 {
function createCoin(uint _coinBought, address clientWalletAddress) public onlyMinter {
_mint(msg.sender, _coinBought);
_transfer(msg.sender, clientWalletAddress, _coinBought);
}
BEGIN:VCALENDAR
METHOD:PUBLISH
VERSION:2.0
X-WR-CALNAME:Inspire-english-class-booking
PRODID:-//Apple Inc.//Mac OS X 10.15.7//EN
X-APPLE-CALENDAR-COLOR:#CC73E1
X-WR-TIMEZONE:Asia/Bangkok
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Asia/Bangkok