Skip to content

Instantly share code, notes, and snippets.

@growingspaghetti
growingspaghetti / main.py
Last active April 16, 2021 16:25
pydub split_on_silence
from pydub import AudioSegment
from pydub.silence import split_on_silence
import glob
import os
mp3s = glob.glob("/media/dev/workspace/viewer/using-english/*_d_*.mp3")
mp3s.sort()
def split(mp3):
@growingspaghetti
growingspaghetti / eclipse.xml
Last active December 31, 2020 03:19 — forked from fei-ke/eclipse.xml
Eclipse color scheme for IntelliJ IDEAfrom http://return0x0000.blogspot.com/2009/02/eclipse-color-scheme-for-intellij-idea.htmlpath /home/{your_account_name}/.IntelliJIdea{your_version}/config/colorsJust save it like eclipse.icls
<scheme name="eclipse copy with bash" version="142" parent_scheme="Default">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2020-12-31T05:16:34</property>
<property name="ide">Idea</property>
<property name="ideVersion">2020.3.0.0</property>
<property name="modified">2020-12-31T05:16:45</property>
<property name="originalScheme">eclipse copy</property>
</metaInfo>
<option name="CONSOLE_FONT_NAME" value="FreeMono" />
@growingspaghetti
growingspaghetti / README.md
Last active February 10, 2020 21:03
2020年2月10日付、minikubeのセットアップ方法と小技(Ubuntu)

KubernetesやUIのダッシュボードの激しいバージョン更新にも関わらず、DNSやyamlのプロパディー値の整合性ために、kubernetes、kubectl、dashboard、helmのバージョンが相互適当なものに揃わなければならない

目次

目次, kubectlをインストールする, minikubeをインストールする, kubernetesをインストールする, kubernetesのクラスタ情報を表示させる, Dashboardをインストールする, weavescopeをインストールする, helmをインストールする, PrometheusとGrafanaをインストールする, kubefwdをインストールする

ryoji@ubuntu:~$ kubectl version
Client Version: version.Info{
  Major:"1", 
  Minor:"17", 
 GitVersion:"v1.17.0", 
@growingspaghetti
growingspaghetti / README.md
Last active February 10, 2020 21:00
Minikube set up tips and tricks, as of 10 Februrary 2020 (Ubuntu)

Note: Kubernetes version changes rapidly and so as its dashboard. Despite that fact, the versions of kubernetes, kubectl, dashboard, helm have to be in concordance. Otherwise, it fails to match DNS or yaml properties one another.

Table of Contents

Table of Contents, Install kubectl, Install minikube, Install kubernetes, Print kubernetes info, Install Dashboard, Install Weavescope, Install helm, Install Prometheus and Grafana, Install kubefwd

ryoji@ubuntu:~$ kubectl version
Client Version: version.Info{
  Major:"1", 
  Minor:"17", 
 GitVersion:"v1.17.0", 
@growingspaghetti
growingspaghetti / StringUtils.rs
Last active November 26, 2017 16:55
Those of StringUtils.substringBefore(), substringAfter(), and subStringBetween() are following in Rust. JavaのStringUtils.substringBefore(), substringAfter(), substringBetween()はRustでは以下かと(文字列操作)。 https://play.rust-lang.org/?gist=31abc000d4c0973c58c395d1d28a4332&version=undefined `cargo test -- --nocapture` for println!()
fn substring_before(body: &str, separator: &str) -> String {
match body.find(separator) {
Some(i) => body.get(..i).unwrap().to_string(),
None => body.to_string(),
}
}
fn substring_after(body: &str, separator: &str) -> String {
match body.find(separator) {
Some(i) => body.get(i+separator.len()..).unwrap().to_string(),