Skip to content

Instantly share code, notes, and snippets.

View yosmoc's full-sized avatar

Yoshihisa Mochihara yosmoc

  • IKEA IT AB
  • Sweden
View GitHub Profile
#!/bin/bash
IFS=$'\n'
files=$(find . -type f -name "*.mp3")
trim=2
for file in $files
do
file_without_extension=${file%.*}
@yosmoc
yosmoc / mp4tomp3.sh
Created January 3, 2015 04:57
シェルスクリプトでスペースや改行が入っているファイル処理するときには、IFSを設定する。 ref: http://qiita.com/samurai20000@github/items/7162d9bf7410b09cb5c2
#!/bin/bash
IFS=$'\n'
files=$(find . -type f -name "*.mp4")
for file in $files
do
file_without_extension=${file%.*}
brew install lame
brew install sox
@yosmoc
yosmoc / hosts
Created October 10, 2014 20:49
WIP: my ubuntu's playbook
[localhost]
127.0.0.1
@yosmoc
yosmoc / file1.yml
Last active August 29, 2015 14:07
AnsibleでLinuxに最新版のpecoをインストールする ref: http://qiita.com/samurai20000@github/items/8d77f4b5a503ca58b64e
- name: Get latest peco version
shell: >
curl -sI https://github.com/peco/peco/releases/latest | awk -F'/' '/^Location:/{print $NF}'
register: peco_latest_version
- hosts: vm
sudo: yes
tasks:
- apt: update_cache=yes
- apt: name=zsh state=present
- apt: name=git state=present
- apt: name=emacs state=present
- apt: name=vim state=present
- apt: name=golang state=present
- apt: name=gist state=present
/* <system section="theme" selected="11696248318757940905"> */
@import url("http://hatenablog.com/theme/11696248318757940905.css");
/* </system> */
#blog-title {
border-top: none;
}
.entry {
border-bottom: none;
}
package main
import (
"fmt"
"io/ioutil"
"log"
)
func main() {
file, err := ioutil.ReadFile("for.go")
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := 1.0
for {
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match(nil "/Users/yoshi/.emacs.d/elpa/helm-20140119.59/helm-autoloads.el")
auto-async-byte-compile()
run-hooks(after-save-hook)
ad-Orig-basic-save-buffer()
basic-save-buffer()
save-buffer()
update-directory-autoloads("/Users/yoshi/.emacs.d/elpa/helm-20140119.59")
package-generate-autoloads("helm" "/Users/yoshi/.emacs.d/elpa/helm-20140119.59")
package--make-autoloads-and-compile("helm" "/Users/yoshi/.emacs.d/elpa/helm-20140119.59")