Skip to content

Instantly share code, notes, and snippets.

View oshikryu's full-sized avatar

Ryuta Oshikiri oshikryu

  • San Francisco, CA
View GitHub Profile
@oshikryu
oshikryu / Keybase.md
Created September 12, 2021 14:43
Keybase

Keybase proof

I hereby claim:

  • I am oshikryu on github.
  • I am oshikryu (https://keybase.io/oshikryu) on keybase.
  • I have a public key ASB_h8uI0zXzQCcwGXbzNnP5ZFckFXCZrAFjryxJ_EpPUgo

To claim this, I am signing this object:

@oshikryu
oshikryu / poll-action.js
Last active December 6, 2019 19:30
Updated component-redux
import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { actions as pollActions} from './actions';
export class MyComponent extends React.Component {
componentDidMount() {
const { actions } = this.props;
actions.watchPollEndpoint();
@oshikryu
oshikryu / poll.js
Last active December 6, 2019 21:26
poll-interval
import React from 'react';
export class MyComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
items: [],
}
componentDidMount() {
@oshikryu
oshikryu / actions.js
Last active December 6, 2019 20:47
polling-endpoint-saga
import * as types from './types';
export const watchPollEndpoint = () => {
return {
types: types.WATCH_POLL_ENDPOINT,
}
}
export const stopPolling = () => {
return {
@oshikryu
oshikryu / eslint.json
Created November 8, 2018 21:01
Sample eslint.json
{
"rules": {
"indent": [
2,
2
],
"quotes": [
2,
"single"
@oshikryu
oshikryu / attachments.js
Last active September 27, 2017 18:12
getting attachments in two ways
/*
Which implementation would you prefer for downloading bulk attachments? (e.g. click download and
expect 3+ images)
1) One implementation requires the addition of 3 new libraries to make a zip file (which a user will just unzip
anyway)
However, it looks pretty straightforward
*/
@oshikryu
oshikryu / datamaker.js
Last active May 2, 2017 00:03
CSV export with webworkers
// this file expects global variables data and compareData to be available
var regData = data;
var doubleData = data.concat(data);
var doubleCompareData = compareData.concat(compareData);
var millionData = [];
for (var idx=0; idx < 10; idx += 1) {
millionData = millionData.concat(doubleCompareData);
}
@oshikryu
oshikryu / notes.md
Created April 28, 2017 18:49
JAMstack notes

JAMstack notes


Netlify structure:

Structured data in a git repository

Smashing architecture React talking to github api Victor hugo go based boilerplate static site generator

@oshikryu
oshikryu / app.js
Created April 28, 2015 21:42
sample ember
App = Ember.Application.create();
App.Router.map(function() {
this.resource('all');
this.resource('recent');
this.resource('starred');
});
App.IndexRoute = Ember.Route.extend({
beforeModel: function() {
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);