Skip to content

Instantly share code, notes, and snippets.

@networkelements
networkelements / file0.txt
Created April 17, 2016 14:22
scriptなどでログを取るときに変な文字(制御文字)のない状態で読めるようにする ref: http://qiita.com/networkelements/items/aa4aec5417306b4c7e71
スクリプトは 2016年04月17日 22時52分01秒
に開始しました^[]0;user@host: ~^Guser@host:~$ fish
^[]0;fish /home/user^G^[[30m^[(B^[[mWelcome to fish, the friendly interactive shell
Type ^[[32mhelp^[[30m^[(B^[[m for instructions on how to use fish
^[]0;fish /home/user^G^[[30m^[(B^[[m^[[38;5;245m⏎^[[0m $
^[[30m^[(B^[[m^[]0;ping /home/user^G^[[30m^[(B^[[mPING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=44 time=116 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=44 time=70.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=44 time=90.0 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=44 time=230 ms
@networkelements
networkelements / file0.txt
Created April 17, 2016 11:16
ディスク暗号化した環境(Ubuntu14.04)でfstabを使わずにramdiskを作る ref: http://qiita.com/networkelements/items/0bb3d52d67aaff989da2
~> sudo apt-get update;sudo apt-fast install zram-config
~> sudo lshw -short | grep "System Memory"
~> sudo lshw -short | grep "システムメモリー"
/0/2b memory 18GiB システムメモリー
~> cd / ; pwd
/
~> sudo mkdir /ramdisk
~> sudo chmod 700 /ramdisk
~> sudo chown users:users /ramdisk ##やらないほうがいいかも?root:rootのままがいい?
~> ls -lA | grep ramdisk
@networkelements
networkelements / file0.txt
Created April 9, 2016 05:10
UbuntuやDebianでperl: warning: Setting locale failed.と怒られる問題を解決する ref: http://qiita.com/networkelements/items/12e2448b75f7ff057139
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "ja_JP.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
@networkelements
networkelements / gist:e8d81877bdba528df6ec
Created February 21, 2016 02:51 — forked from tanakh/gist:8750952
なぜ我々はHaskellを使うのか

スタートアップ企業 Silk が、Haskellを採用した理由。

http://engineering.silk.co/post/31920990633/why-we-use-haskell

As a newly started company, we have a lot of technical decisions to make. One of the important ones is the choice of a programming language. Since we’re building a web application, this goes for both the client (i.e. the web browser) and the server.

新しく始めた会社として、我々はたくさんの技術的決定を行わなければなりません。中でも重要なのは、プログラミング言語の選択です。我々はウェブアプリケーションを作っていたので、この選択がクライアント(Webブラウザなど)とサーバの両方で必要になります。

On the client, there wasn’t much discussion. Javascript is the only viable choice, unless you want to use Flash or similar plugin-based models. But on the server, we had more freedom. Popular choices for web applications are dynamically typed languages like Ruby, Python and PHP, and statically typed languages like Java and C#.

@networkelements
networkelements / last_of_opera_wiki.md
Created February 4, 2016 14:25 — forked from makotom/last_of_opera_wiki.md
Opera Wiki の最期

Opera Wiki の最期

訳合って Opera と私に関することをまとめていたときにふと Opera Wiki 遺跡 が目に留まったので, さらっとまとめる気になった. Opera Wiki 1周忌ということもあるので, 回顧の意味も含めて書いてみる.

ここで主に書きたいことは,

  • Opera Wiki の晩年は集団管理体制だったということ.
  • Opera Wiki の終了は主に私の判断だったということ.

Opera Wiki はどのようにして私のところに来たのか

Opera Wiki を私に引きついだのは @amatanoyo である. これは種々の記録から2011年5月の頭のことであることが分かっている. (*1) 実は, Opera Wiki を引き継いだ時点で, opera-wiki.com ドメインは, Wiki を @amatanoyo が, 2ちゃんのログを @crckyl がメンテしているという状態だった. データを引き継ぐときも, FTP のアクセス権限を @crckyl にも当てるのを忘れないようにとの注意喚起が @amatanoyo からあった. また, MediaWiki 上では, 何人か管理者権限を持っているユーザーがいた.

@networkelements
networkelements / .ng
Created October 23, 2015 05:22 — forked from matchy256/.ng
Ng (Nihongo micro Gnu emacs) 用設定ファイル例
; ~/.ng
;
; for more detail, please read Ng.doc
;
; 'next-line' doesn't insert newline at the end of buffer.
(next-line-add-newlines nil)
; exchange C-h with DEL.
(bsmap-mode)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>バーニング立花 - いもげばこ−二次元裏img@ふたばログ保管庫</title>
<link rel="canonical" href="http://cottonwoolbe.com/300259571.htm">
<meta name="description" content="バーニング立花 - いもげばこ−二次元裏img@ふたばログ保管庫">
<link rel="alternate" media="only screen and (max-width: 640px)" href="http://cottonwoolbe.com/s/300259571.htm">
<link rel="alternate" media="handheld" href="http://cottonwoolbe.com/m/300259571.htm">
<meta http-equiv="Content-Script-Type" content="text/javascript">
1.gentoo
2.LFS
3.Arch BSD
4.TRON
5.CRUX https://crux.nu/
6.GoboLinux https://github.com/gobolinux
7.OPNsense
8.DEFT Linux
9.jaris
10.plan9
$ sudo apt-get update;sudo apt-get install fcitx fcitx-mozc libfcitx-qt5-1 kde-config-fcitx
$ im-config
明示的にユーザーを選択でYesして、
http://i.imgur.com/ysFHEKd.png
のとおり、左の選択肢側をクリックすると●がでるのでfcitxを選ぶ
あとはXを再起動させるなり、ログアウトしてまたログインすれば日本語入力ができるようになる
@networkelements
networkelements / 不完全燃焼.txt
Last active August 29, 2015 14:09
Gentooよくわかんないです
script
ntpdate -s ntp.nict.jp
sudo hwclock -w
time
setxkbmap -model jp106 -layout jp
loadkeys jp106
loadkeys /usr/share/keymaps/i386/qwerty/jp106.map.gz
sudo apt-get install g++ cryptsetup gdisk f2fs-tools btrfs-tools libdigest-whirlpool-perl chrony iproute2 coreutils