Skip to content

Instantly share code, notes, and snippets.

@non117
non117 / Todo.js
Created March 25, 2017 08:13
redux design ducks
import { createAction, handleActions } from 'redux-actions';
import { takeEvery } from 'redux-saga';
import { call, put } from 'redux-saga/effects';
import { TodoState } from '../models';
const CREATE_TASK = 'CREATE_TASK';
const UPDATE_TASK = 'UPDATE_TASK';
const CHECK_TASK = 'CHECK_TASK';
const SUBMIT_TASK = 'SUBMIT_TASK';
const CHANGE_INPUT = 'CHANGE_INPUT';
@non117
non117 / TaskItem.jsx
Last active March 26, 2017 01:08
redux design components
import React, { PropTypes } from 'react';
import { Task } from '../../models';
export default class TaskItem extends React.PureComponent {
static propTypes = {
task: Task.PropTypes.isRequired,
}
static contextTypes = {
changeInputTarget: PropTypes.func,
checkTask: PropTypes.func,
@non117
non117 / c4-xlarge_cpuminer-multi.log
Created December 13, 2017 14:47
cpuminer bench on EC2
[2017-12-13 14:46:05] Starting Stratum on stratum+tcp://jp.lapool.me:3014
[2017-12-13 14:46:05] 4 miner threads started, using 'yescrypt' algorithm.
[2017-12-13 14:46:08] Stratum difficulty set to 0.5 (0.00001)
[2017-12-13 14:46:10] CPU #2: 0.42 kH/s
[2017-12-13 14:46:10] accepted: 1/1 (diff 0.000), 0.42 kH/s yes!
[2017-12-13 14:46:10] CPU #1: 0.42 kH/s
[2017-12-13 14:46:10] CPU #0: 0.42 kH/s
[2017-12-13 14:46:10] CPU #3: 0.42 kH/s
[2017-12-13 14:46:20] CPU #3: 0.42 kH/s
[2017-12-13 14:46:20] accepted: 2/2 (diff 0.000), 1.67 kH/s yes!
@non117
non117 / mendako.js
Last active December 4, 2020 05:54
めんだこが降ります
w = () => window.innerWidth * 0.95
h = () => window.innerHeight * 0.95
r = Math.random
men = () => {
base = "https://media.handon.club/custom_emojis/images/000/"
if(r() > 0.01) {
return `${base}008/726/original/mendako_anime.png`
} else {
p = r()
if(p > 0.67) {
@non117
non117 / main.go
Last active July 9, 2024 13:45
co2mini
package main
import (
"fmt"
"log"
"os"
"os/signal"
"syscall"
"time"