Skip to content

Instantly share code, notes, and snippets.

@K4zuki
K4zuki / hex2bin_armelf.md
Last active August 29, 2015 14:20
automatic hex2bin run on KEIL for ARM Cortex-M processor

THIS MIGHT NOT WORK ON SOME MICROCONTROLLERS

  • ARMCC has binary converter "fromelf" command like "objcopy" command in GCC

  • some Cortex-M microcontroller vendor requires binary file, instead of ihex forat, for their binary downloader

  • tested with Keil uVision5 free(32kB) version:

    • open ""Options for Target"" window
      • [User] Tab
        • [Run User Programs After Build/Rebuild] section
  • check [Run #1] marked and input :

sync atom settings

@K4zuki
K4zuki / install_psreadline.ps1
Last active September 26, 2016 01:36
PowerShell profile
## from http://www.hanselman.com/blog/TowardsABetterConsolePSReadLineForPowerShellCommandLineEditing.aspx
(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex
install-module PsReadLine
$ps = ${env:USERPROFILE}+"/Documents/WindowsPowerShell"
if (-Not (Test-Path $ps)) {
mkdir $ps
}
$p = ${env:USERPROFILE}+"\git_profile\profile.ps1"
$file= "if (Test-Path $p)
{
@K4zuki
K4zuki / TexLivePackageInstall.md
Last active August 10, 2016 22:29
texlive package installation

tlmgr install [Package] where [Package] found in http://www.ctan.org/ or its mirror sites.

recently cannot use the command above but great hint found! http://tex.stackexchange.com/questions/313768/tlmgr-unknown-directive saying get update-tlmgr-latest.sh from https://www.tug.org/texlive/tlmgr.html then run as root

# sh update-tlmgr-latest.sh

kpsewhich style.sty to find out where the package is installed

@K4zuki
K4zuki / README.md
Last active July 5, 2020 04:22
ubuntu16.04-like bashrc with git status

ubuntu16.04-like bashrc with git status

install

  1. clone to ~/git_bashrc
  2. find out git-prompt.sh and git-completion.bash and add source line in git_bashrc/bashrc
  3. $ echo "source ~/git_bashrc/bashrc" > ~/.bashrc

look

user@localhost:~/git_bashrc (master *) $
<-- green --><-- blue --> <-- white-->
@K4zuki
K4zuki / patch atom-language-ini.md
Created July 22, 2016 03:06
modify `language-ini` module for atom editor

modify language-ini module for atom editor

install

apm install language-ini

in ini.cson

L1~

'fileTypes': [
  'inf',
 'desktop',
@K4zuki
K4zuki / tex_rotate_pic+caption.md
Created August 12, 2016 10:08
TeX rotate pic and add caption in same direction
@K4zuki
K4zuki / user.inputrc
Last active August 21, 2016 14:57
$HOME/.inputrc # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
# http://stackoverflow.com/questions/5029118/bash-ctrl-to-move-cursor-between-words-strings
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
@K4zuki
K4zuki / note.md
Last active May 27, 2019 19:32
can make a hg repo as git submodule?

Idea

  • clone a mbedTM repository as mercurial repo
  • put the cloned repo to github(or similar) as a git repo with mbed repo revision status history
  • another git repo uses the converted github repo as a submodule

Hints