Skip to content

Instantly share code, notes, and snippets.

@keisei1092
keisei1092 / wav2mp3.md
Last active June 30, 2018 14:57
指定したディレクトリにあるwavファイルを320kbpsのmp3ファイルに変換する

wav2mp3

指定したディレクトリにあるwavファイルを320kbpsのmp3ファイルに変換する
変換されたwavファイルは自動で削除します

Prerequisites

  • ffmpeg がインストールされていること
    • Homebrew がインストールされているmacOSなら brew install ffmpeg で入る
  • trash がインストールされていること

youtube-dl-cheetsheet

youtube-dlを使ってタスクを便利にこなすためのスニペット集

Pythonistaで使えるやつ

import youtube_dl, os, appex
@keisei1092
keisei1092 / danbooru_downloader.rb
Created January 13, 2019 12:13
[WIP] Danbooru Downloader
require 'httparty'
dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'downloaded'))
response = HTTParty.get 'https://gelbooru.com/index.php?page=dapi&s=post&q=index&tags=hatsune_miku&json=1'
response
.parsed_response
.map { |r| { r['file_url'] } }
.tap { |r| puts r }
# .each { |u|
@keisei1092
keisei1092 / my_confs.json
Last active March 21, 2019 11:36
Karabiner-Elements configuration
{
"title": "my confs",
"description": "karabiner is god",
"rules": [
{
"description": "ctrl-m to enter",
"manipulators": [
{
"type": "basic",
"from": {