Skip to content

Instantly share code, notes, and snippets.

@K4zuki
K4zuki / rotatesvg.py
Created August 28, 2017 06:02
python3 script to rotate svg by degree
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
# simple SVG rotate script
# great hint from
# https://stackoverflow.com/questions/43199869/rotate-and-scale-a-complete-svg-document-using-python
# MIT license (c) K4ZUKI(k.yamamoto.08136891@gmail.com)
"""
import svgutils
import math
@K4zuki
K4zuki / mbed-cli-os2.md
Last active July 28, 2017 05:48
mbed cli import from mbed.org

Install

follow instruction in https://github.com/ARMmbed/mbed-cli

  • requires Python 2.7.11+, mercurial(from pip), git
  • pip install mercurial
  • pip install mbed-cli

Import existing project from mbed.org

$ mbed import https://developer.mbed.org/users/k4zuki/code/DA7212hello_dev/
@K4zuki
K4zuki / gpp-cross-compile.md
Last active July 21, 2017 04:55
cross compilation for gpp

Environment

  • Ubuntu16.04

Commands

  • get gpp-2.25tar.bz archive from https://github.com/logological/gpp/releases
  • $ tar jxf gpp-2.25.tar.bz2 extracts gpp-2.25 directory
  • $ sudo apt-get install mingw-w64 git-core wget quilt
  • $ cd gpp-2.25
  • $ ./configure --host=x86_64-w64-mingw32
  • $ make
@K4zuki
K4zuki / atom-on-right-clock-menu.md
Created July 19, 2017 06:18
"Open with Atom" on Ubuntu

cp /usr/share/applications/atom.desktop ~/.local/share/applications/atom.desktop

@K4zuki
K4zuki / plantuml.md
Last active July 21, 2017 11:39
PlantUML installation
@K4zuki
K4zuki / UseRictyDiminishedOnPowerShell.reg
Created July 12, 2017 10:19
add Ricty Diminished as Japanese font on Powershell
Windows Registry Editor Version 5.00
; add Ricty Diminished in powershell font list
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont]
"932." = "Ricty Diminished"
@K4zuki
K4zuki / README.md
Created July 12, 2017 08:39
fix Git for windows shortcut

run Git-Bash from $HOME

  1. run git bash
  2. apply Pin this program to task bar
  3. right ckick icon -> right click Git Bash -> Properties
  4. type following into Start in: %HOMEDRIVE%%HOMEPATH%
@K4zuki
K4zuki / README.md
Last active June 3, 2017 01:19
markdown-preview-enhanced front matter sample to use pandoc

for HTML output:

output:
  custom_document:
    path: output.html    
    pandoc_args: [    
    "--self-contained",
    # "--number-sections", # if you like it numbered
    # "--reference-docx=/Full/Path/To/Reference.docx",
 "-M","css=/Full/Path/To/github.css",    
@K4zuki
K4zuki / note.md
Created May 24, 2017 08:42
install docxtpl on your local [WINDOWS]
$ conda skeleton pypi docxtpl
$ conda build docxtpl
$ conda install --use-local docxtpl
@K4zuki
K4zuki / WMF5.0packageList.md
Last active October 25, 2016 07:57
Windows Management Framework 5.0 package List