Real World Electron Development
~ Case of the Kobito, Markdown Editor for YAPC Hackathon!
@mizchi / Koutaro Chikuba, Increments
- Node.js / Frontend Engineer
// ==UserScript== | |
// @name Qiita Code Number | |
// @namespace khsk | |
// @description コードに選択不可能な行番号を追加する | |
// @include http://qiita.com/*/items/* | |
// @include http://qiita.com/*/private/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
/* @flow */ | |
import React, { Fragment } from 'react' | |
import uuid from 'uuid' | |
import range from 'lodash.range' | |
import uniq from 'lodash.uniq' | |
import chunk from 'lodash.chunk' | |
type Cell = { name: string } | |
type State = {| |
もう5年も前の話になっていたのだけど、Echofon(Twitterクライアントの一つ)の件を今更だけど書かねばならない。
当時、Echofonのプッシュ通知を管理するサーバーの認証機能に欠陥があり(というか認証が無く) 他のEchofon利用者に対して送られるpush通知(DMやreplyなど)を横取りすることが出来た。
このセキュリティホール自体は素早く修正されたのだけど、この件をきっかけに、クライアント/サーバーの境界線が曖昧になっている、という問題を強く意識するようになった。
// TFSのAPIを使って、ソースコードの最新をローカルに取得するサンプル | |
// 参考: | |
// MSDN | |
// http://msdn.microsoft.com/ja-jp/library/microsoft.teamfoundation.versioncontrol.client.workspace%28v=vs.100%29.aspx | |
// StacK Overflow | |
// http://stackoverflow.com/questions/8341419/get-latest-using-tfs-api | |
// http://stackoverflow.com/questions/1827651/how-do-you-get-the-latest-version-of-source-code-using-the-team-foundation-serve | |
using System; |
require "psych" | |
require "redcarpet" | |
require_relative "./renderer" | |
require_relative "./toc_renderer" | |
module Mwr | |
class Generator | |
def initialize(workdir) | |
@workdir = File.expand_path(workdir) |