Skip to content

Instantly share code, notes, and snippets.

View yt-siden's full-sized avatar
:octocat:

Takahiro YANO yt-siden

:octocat:
View GitHub Profile

Zabbixで監視しているLinuxマシンの再起動が必要かどうかをチェックする方法

はじめに

監視対象

  • CentOS 7
  • Ubuntu 16.04

※それぞれRHEL/Fedora, Debian系その他でも大丈夫だと思われます。

@yt-siden
yt-siden / arch_mailman_lists.sh
Created June 20, 2019 06:49
Mailmanが管理するlistに`arch`を実行する
#!/bin/sh
LISTS=`ls -l /var/lib/mailman/lists | grep ^d | awk '{print $9;}'`
for list in $LISTS
do
/usr/lib/mailman/bin/arch $list
done

概要

  • Universal Ctagsを導入して(La)TeX文書で:Denite outlineを使いたい
  • 候補は表示されるが,ジャンプが働かない
  • Universal Ctagsの出力する正規表現に問題があるっぽい?
  • --excmd=number で行番号の出力にすればOK

調査

以下のような(よくある)TeX文書を用意する.

Ubuntu 14.04 LTS から 16.04 LTS にアップグレードしたらデスクトップが起動しなかったので起動できるようにした話

問題の概要

  1. do-dist-upgrade でアップグレードを行って再起動したら,GUIの起動画面で止まった
  2. SSHでログインすることはできた
  3. apt, apt-get コマンドは libstdc++ のバージョンの違いにより利用不能

解決法

@yt-siden
yt-siden / scalapack_different_context_distribution.cpp
Created July 20, 2017 08:20
Redistributing a distributed matrix on another context
// Intel MKL (Intel Compiler/Intel MPI) is required
// compile as `mpiicpc -std=c++11 -mkl=cluster scalapack_different_context_distribution.cpp`
// run as `mpirun -np 16 ./a.out`
// Reference: http://www.netlib.org/scalapack/explore-html/de/d4f/pzgemrdrv_8c_source.html
//
// ctx_src: ctx_dst:
// [ 0 1 2 3 ] [ 0 1 ]
// [ 4 5 6 7 ] => [ 2 3 ]
// [ 8 9 10 11 ]
// [ 12 13 14 15 ]
@yt-siden
yt-siden / mpi_comm_split_test.cpp
Created July 13, 2017 02:09
MPI_Comm_splitのcolorにMPI_UNDEFINEDを指定したときに返ってくるコミュニケータを確認する
#include <mpi.h>
#include <unistd.h>
#include <iostream>
int main(int argc, char* argv[])
{
MPI_Init(&argc, &argv);
int rank, size;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);

macOSでターミナルからinkscapeを起動するとロケールに関する警告が出る

症状

% inkscape

(process:18763): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
Fontconfig warning: ignoring sjis.UTF-8: not a valid language tag

Skim+(Mac)VimでSyncTeXのForward/Backward Search

vimtexはlatexmkでのコンパイルなどをサポートしている. 詳しくは:help vimtexを参照.

以下では,SyncTeXを使用するために必要なことをざっくりと.

Forward Search

  1. vimtexを(NeoBundle等で)入れる
@yt-siden
yt-siden / magma_type_wrapper.h
Created July 22, 2015 12:22
MAGMA type wrapper for converting complex type (std::complex -> magmaComplex)
#ifndef UUID_6DBD3348_8ECE_4541_A1E1_3D5EBF9C3BD8
#define UUID_6DBD3348_8ECE_4541_A1E1_3D5EBF9C3BD8
#include <complex>
#include <magma.h>
// MAGMA type wrapper for using std::complex
/*
* T -> magma_type_wrapper<T>::type
* ---------------------------------------------------
@yt-siden
yt-siden / variable_check.cmake
Created July 16, 2015 12:02
Check variables set by certain modules in CMake
# CMakeLists.txt for checking variables set by Find*** in CMake
#
# Target packages: MPI, OpenMP, CUDA, (BLAS,) LAPACK, HDF5
#
# Referenced variables are based on CMake v3.0
# http://www.cmake.org/cmake/help/v3.0/manual/cmake-modules.7.html
#
# How to use
# 1. create an empty folder
# 2. locate this file to it as `folder/CMakeLists.txt`