Skip to content

Instantly share code, notes, and snippets.

View nakamorichi's full-sized avatar

Mikael Nakajima nakamorichi

View GitHub Profile
Installing ri documentation for typo-5.4.2...
ERROR: While generating documentation for typo-5.4.2
... MESSAGE: Unhandled special: Special: type=17, text="<!--more-->"
... RDOC args: --ri --op /usr/lib/ruby/gems/1.8/doc/typo-5.4.2/ri --quiet . --title typo-5.4.2 Documentation
Installing RDoc documentation for typo-5.4.2...
ERROR: While generating documentation for typo-5.4.2
... MESSAGE: Unhandled special: Special: type=17, text="<!--more-->"
... RDOC args: --op /usr/lib/ruby/gems/1.8/doc/typo-5.4.2/rdoc --quiet . --title typo-5.4.2 Documentation
RuntimeError in Admin/dashboard#index
Showing app/views/admin/dashboard/_posts.html.erb where line #9 raised:
Invalid root argument:
Extracted source (around line #9):
6: <% else %>
7: <% for post in @recent_posts -%>
8: <li>
10 context "Entry" do
11 rails_context EntryController do
12 hookup { get :index }
13 asserts(:response).renders(/index/)
14 end
15 end
@nakamorichi
nakamorichi / absolute-to-relative.ts
Created June 9, 2017 04:51
Script for converting absolute module paths to relative
import * as Path from 'path';
import * as recursive from 'recursive-readdir';
import * as Fs from 'fs';
import * as xregexp from 'xregexp';
const root = Path.resolve(__dirname, '..');
recursive(root, ['!*.js'], (error, files) => {
files.forEach(file => {
const fileContent = Fs.readFileSync(file, 'utf-8');
@nakamorichi
nakamorichi / file1.txt
Created August 10, 2017 07:39
TypeScriptのリンター(TSLint)の設置 ref: http://qiita.com/Kitanotori/items/118a09db97dfd8d37b04
import TextareaAutosize from 'react-textarea-autosize';
# FROM <イメージ名>:<バージョンタグ>
# このイメージを元に使って
FROM node:8.2.1-alpine
# イメージの中にアプリ用ディレクトリを作成
RUN mkdir -p /opt/myapp
# イメージの中の"cd"
WORKDIR /opt/myapp
@nakamorichi
nakamorichi / 1_traefik-custom-resources.yml
Last active August 12, 2019 03:29
Traefik 2.0 custom resource definitions
kind: CustomResourceDefinition
apiVersion: apiextensions.k8s.io/v1beta1
metadata:
name: ingressroutes.traefik.containo.us
spec:
group: traefik.containo.us
version: v1alpha1
names:
kind: IngressRoute
plural: ingressroutes
@nakamorichi
nakamorichi / 2_traefik-rbac.yml
Created August 11, 2019 08:15
Traefik 2.0 service account, roles, etc.
apiVersion: v1
kind: Namespace
metadata:
name: traefik
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: traefik-ingress-controller
namespace: traefik
@nakamorichi
nakamorichi / 3_traefik-dep.yml
Created August 11, 2019 08:18
Traefik 2.0 deployment definition
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
namespace: traefik
name: traefik
labels:
app: traefik
spec:
replicas: 1
selector: