Skip to content

Instantly share code, notes, and snippets.

View hitobashira's full-sized avatar

WonderTOMATO hitobashira

  • Osaka,Japan
  • 23:41 (UTC +09:00)
View GitHub Profile
@muendelezaji
muendelezaji / bash-to-zsh-hist.py
Created October 5, 2016 14:18 — forked from op/bash-history-to-zsh-history.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@d2s
d2s / installing-node-with-nvm.md
Last active August 10, 2024 04:45
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
@yoheia
yoheia / perl_oneliner_example
Last active August 26, 2024 05:55
Perlワンライナー&マルチライナー集
Perl ワンライナーサンプル集
■概要
障害解析のためのログの調査、非互換対応でのソースコードの調査といった
テキスト処理で使った Perl ワンライナーのサンプル集です。
Perl ワンライナーは以下の点が良いと思います。
・Perl は Oracle Database (10g以降) に同梱されている。
 従って、Windows プラットフォームでも使える。
@moccos
moccos / find.pl
Last active March 11, 2020 00:55
[Perl] GNU find wrapper to set -regextype.
#!/usr/bin/perl
use strict;
my $idx = 0;
my @preopt = ("-H", "-L", "-P");
my $command = "find";
my $regex_type = " -regextype posix-egrep";
# check @preopt
for (; $idx <= $#ARGV; $idx++) {
@xkikeg
xkikeg / zshhist.py
Last active May 21, 2024 02:02
Convert ZSH history file (.zsh_history file) between original weird encoding and proper UTF-8.
#!/usr/bin/env python3
"""
ZSH history convert script.
When you mistakenly type your password or quite bad command into ZSH,
you may want to remove the entry from the history.
The problem is, the .zsh_history is encoded in a weird format!
If you want to find a command with non-ASCII character, it'll be problematic.