Skip to content

Instantly share code, notes, and snippets.

View nukosuke's full-sized avatar
🍊
🐈 🐈 🐈

nukosuke nukosuke

🍊
🐈 🐈 🐈
View GitHub Profile
@nukosuke
nukosuke / application.html.erb
Created February 8, 2017 08:54
react_on_rails, react-router, redux
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<%= server_render_js("Helmet.rewind().title.toString()") %>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all' %>
</head>
<body>
<%= yield %>
@nukosuke
nukosuke / railsContextReducer.js
Created February 8, 2017 09:03
react_on_rails, react-router, redux
export default function railsContextReducer(state = {}) {
return state;
}
npm install annict --save
@nukosuke
nukosuke / clientRegistration.js
Created February 8, 2017 08:51
react_on_rails, react-router, redux
import React from 'react';
import { Provider } from 'react-redux';
import { Router as ReactRouter, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import ReactOnRails from 'react-on-rails';
import routes from '../routes/routes';
import store from '../store/store';
const Router = (props, railsContext) => {
const store = ReactOnRails.getStore("store");
@nukosuke
nukosuke / progressbar.vb
Created May 1, 2017 07:12
progressbar macro for PowerPoint
Sub progressbar()
Const r As String = "00" '色・RGB値のR
Const g As String = "ae" '色・RGB値のG
Const b As String = "ef" '色・RGB値のB
Const pbH As Long = 10 '高さ
Const pbBG As Single = 0.6 '背景の透過性
Const bgr As String = "ff"
Const bgg As String = "be"
Const bgb As String = "00"
import * as path from "path";
import * as Koa from "koa";
import * as staticFiles from "koa-static";
import * as React from "react";
import * as ReactDOM from "react-dom/server";
import { StaticRouter } from "react-router-dom";
import { Helmet } from "react-helmet";
import Application from "./components/Application";
const app = new Koa();
import * as Koa from "koa";
import * as React from "react";
import * as ReactDOM from "react-dom/server";
import { Helmet } from "react-helmet";
import Application from "./components/Application";
const app = new Koa();
app.use(ctx => {
const markup = ReactDOM.renderToString(<Application/>);
import * as Koa from "koa";
import * as React from "react";
import * as ReactDOM from "react-dom/server";
import { StaticRouter } from "react-router-dom";
import { Helmet } from "react-helmet";
import Application from "./components/Application";
const app = new Koa();
// StaticRouterにKoaのコンテキストからURLを渡し、
import * as React from "react";
import { Switch, Route, Link } from "react-router-dom";
export default class Application extends React.Component<any, any> {
render() {
return (
<div>
<ul>
<li><Link to="/1">page 1</Link></li>
<li><Link to="/2">page 2</Link></li>
@nukosuke
nukosuke / .zenform.toml
Created February 2, 2018 15:36
zenform credentials TOML format
# ~/.zenform
[[credentials]]
[credentials.production]
auth_type = "basic"
subdomain = "zenform"
email = "zenform@example.com"
password = "password"
[credentials.sandbox]
auth_type = "basic"