- 16.10 (180210) で確認.
- dotm のフォーマットがバージョンアップで予告もなしに変更されて, 設定ファイルをおじゃんにされることがあるので要注意.
- バージョンアップでキーが登録されている名称(
NavPaneSearch
)とかがコロコロ変わる. ひどい時は日本語→英語(というかメソッド名っぽいもの)に変更されたりする(当然予告なんぞない).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'webrick' | |
require 'open3' | |
server = WEBrick::HTTPServer.new(:DocumentRoot => './', Port: 9999, ServerType: Thread) | |
server.start | |
sleep 3 | |
result = Open3.capture2e('curl http://localhost:9999/index.html') | |
p result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HTTP 上の zip ファイルをオンメモリで DL/加工 した結果をファイルに保存. | |
# 行単位での読み出し/加工/書き出しを意識した実装. | |
if __FILE__ == $0 | |
url = "http://localhost:8000/1020201008_00.csv.zip" | |
require "open-uri" | |
require "zip" | |
File.open('conved.csv', 'w') do |output| | |
OpenURI.open_uri(url) do |payload_io| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require "json" | |
def reduce_precision_recursively(coordinates, precision: 6) | |
if coordinates.first.is_a?(Array) | |
coordinates.each do |coords| | |
round_coordinates(coords, precision: precision) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Library/Frameworks/GDAL.framework/Versions/1.9/Programs/ogr2ogr -f GeoJSON -simplify 100 -lco COORDINATE_PRECISION=2 ~/Downloads/mbtiles/nat_park_region_100x.json ~/Downloads/mbtiles/nat_park_region.shp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>すくろーる♡</title> | |
<style type="text/css"> | |
#outer { | |
border: 1px solid #000; | |
height: 400px; | |
overflow-y: scroll; |
from: angular.js/DEVELOPERS.md at master · angular/angular.js
Must be one of the following:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "benchmark" | |
# Sum of digits | |
TARGET = 123456789 | |
def sum_by_s | |
TARGET.to_s.chars.map(&:to_i).sum | |
end |
- Word
- Can't save a file as PDF.
- Can't input the equations with the keyboard shortcuts.