Skip to content

Instantly share code, notes, and snippets.

@valbeat
valbeat / text was written by sublime text.text
Created October 22, 2014 03:33
post to Gist from sublime
text was written by sublime text
@valbeat
valbeat / Preferences.sublime-settings
Created October 22, 2014 03:34
My Sublime Text Settings
{
"auto_complete": true,
"auto_indent": true,
"auto_match_enabled": true,
"bold_folder_labels": true,
"color_scheme": "Packages/User/base16-ocean.dark (SL).tmTheme",
"disable_formatted_linebreak": true,
"disable_tab_abbreviations": true,
"disabled_single_snippet_for_scopes": "",
"draw_minimap_border": true,
@valbeat
valbeat / Package Control.sublime-settings
Created October 22, 2014 03:35
My Sublime Text Package
{
"installed_packages":
[
"Abacus",
"ApacheConf.tmLanguage",
"AutoFileName",
"BracketHighlighter",
"CoffeeCompile",
"CoffeeLint",
"CoffeeScript",
@valbeat
valbeat / Vagrantfile
Created October 23, 2014 03:21
centos65 Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
src/gz all http://iotdk.intel.com/repos/1.1/iotdk/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32
src intel-iotdk http://iotdk.intel.com/repos/1.1/intelgalactic
src intel-all http://iotdk.intel.com/repos/1.1/iotdk/all
src intel-i586 http://iotdk.intel.com/repos/1.1/iotdk/i586
src intel-x86 http://iotdk.intel.com/repos/1.1/iotdk/x86~
# マス目の描画
drawGrid : ->
# svgにマス目を内包するグループを作成
@svg.append('g')
.attr(
class : 'grid'
)
# マス目グループの中に水平線を追加する
@svg.select('g.grid')
@valbeat
valbeat / d3Visualizer.coffee
Created January 15, 2015 06:50
d3Visualizer
# d3のビジュアライザー
class Visualizer
el: 'svg'
dom: null
constructor : (selector)->
selection = d3.select('selector')
@dom = selection.append(@el)
@initialize()
class Text extends Visualizer
type: 'text'
constructor: ->
@dom.attr
fill: '#000'
text: (content) ->
@dom.text(content)
module.exports = Text
Visualizer = require './visualizer.coffee'
# svgのマージン(グラフの軸を描画するために確保)
svgMargin :
top : 0
right: 0
bottom: 0
left: 0
svgWidth : 960