Skip to content

Instantly share code, notes, and snippets.

View css
body {
background: rgba(255, 255, 255, 1.0);
}
* {
font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: rgba(0, 0, 0, 1.0);
font-size: 16px;
line-height: 115%;
@yymm
yymm / checker.py
Last active Oct 26, 2017
Encoding and newline checker (required chardet)
View checker.py
import os
from chardet.universaldetector import UniversalDetector
def check_encode(file_path):
detector = UniversalDetector()
with open(file_path, mode='rb') as f:
for binary in f:
detector.feed(binary)
if detector.done:
View dokku_setup.md

Dokkuセットアップ手順

  1. 空きPCの確保
  2. Ubuntu Server 14.04のインストール
  3. swap領域の作成( How To Add Swap on Ubuntu 14.04 | DigitalOcean )
  4. dokkuのインストール(Dokku - The smallest PaaS implementation you've ever seen )
  5. dokkuを建てたサーバのIPにブラウザでアクセスして、SSH公開鍵を貼り付けて、ホスト名をIP.xip.ioにしてvirtual hostにチェックを入れる。
  6. Dokku add new ssh key | DigitalOceanを参考にssh鍵を追加できるが、指定するユーザーはパス無しでsudoできる必要がある
@yymm
yymm / want_to_ergodox.md
Last active May 27, 2020
Ergodox買おうの会
View want_to_ergodox.md

この記事のあの画像を見てビビッと来てしまったので, 周りにいる人とErgodoxの購入検討をはじめました(随時更新)

購入できるところ

➜ FalbaTech

ErgoDox - FalbaTech

選んでいくスタイル。

View docker-compose.yml.dev
dev:
restart: always
build: .
ports:
- "5000:5000"
- "8080:8080"
- "8888:8888"
- "2222:22"
links:
- mysql
@yymm
yymm / Dockerfile.dev
Last active Jun 2, 2019
for development
View Dockerfile.dev
#
# Base
#
FROM ubuntu:14.04
MAINTAINER yymm yuya.yano.6260@gmail.com
RUN apt-get update -y
RUN chmod go+w,u+s /tmp
@yymm
yymm / virtual_matrix_diff.py
Created Nov 19, 2015
virtual_matrix_diff.py
View virtual_matrix_diff.py
# -*- coding: utf-8 -*-
import sys
import math
def getcolor(colorname): # {{{
colors = {
'clear': '\033[0m',
'black': '\033[30m',
'red': '\033[31m',
'green': '\033[32m',
View mdx_embedly.py
import markdown
from markdown import Extension
from markdown.postprocessors import Postprocessor
import re
import requests
GIST_RE = r"^http(?:s)?://gist\.github\.com/.+$"
class EmbedExtension(Extension):
def extendMarkdown(self, md, md_globals):
View delaunay.js
(function (win, doc, Class) {
'use strict';
// Namespace
var DelaunayTriangle = {};
var DT = DelaunayTriangle;
/*! -----------------------------------------------------
ドロネー三角形分割のためのユーティリティ関数
@yymm
yymm / bootstrap-nodejs.sh
Last active Sep 15, 2016
My nodejs proj bootstraping (browserify & coffeescript (& react.js) )
View bootstrap-nodejs.sh
# once
npm install -g electron-prebuilt gulp node-gyp
# per proj
npm install -save-dev vinyl-source-stream gulp gulp-util browserify coffee-reactify watchify gulp-notify coffee-script coffeeify
mkdir src
mkdir bundle
touch app.coffee
# shop
You can’t perform that action at this time.