Skip to content

Instantly share code, notes, and snippets.

View metaVariable's full-sized avatar

Kento Aoyama metaVariable

View GitHub Profile
@metaVariable
metaVariable / .tmux.conf
Last active July 19, 2017 07:03
Auto-setup script for local tmux2.3
# for config load
# wget -P $HOME -N https://gist.githubusercontent.com/metaVariable/71a32abc63ad2770997f66361db86810/raw/294b8d122731a5962f701b3f537213c8023931ab/.tmux.conf
# prefixキーをC-aに変更する
set -g prefix C-a
# C-bのキーバインドを解除する
unbind C-b
# キーストロークのディレイを減らす
@metaVariable
metaVariable / Dockerfile_ghostz_gpu_cuda8devel
Last active March 12, 2018 07:01
Dockerfile: ghostz-gpu + cuda 8.0
FROM nvidia/cuda:8.0-devel
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
wget \
make \
g++ \
git \
ca-certificates \
libboost-dev \
@metaVariable
metaVariable / Dockerfile_MEGADOCK-GPU-CUDA9
Last active March 28, 2018 06:27
MEGADOCK-GPU + CUDA9
FROM nvidia/cuda:9.0-devel
MAINTAINER Akiyama Laboratory, Tokyo Institute of Technology <megadock@bi.cs.titech.ac.jp>
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
wget \
make \
g++
@metaVariable
metaVariable / Dockerfile.ghostz-1.0.0
Created April 16, 2018 09:38
ghostz-1.0.0-easy-setup
# docker build . ghostz:1.0.0
FROM gcc:7.3.0
RUN wget -P /tmp http://www.bi.cs.titech.ac.jp/ghostz/releases/ghostz-1.0.0.tar.gz && \
tar xvzf /tmp/ghostz-1.0.0.tar.gz -C /opt && \
rm -rf /tmp/ghostz-1.0.0.tar.gz
WORKDIR /opt/ghostz-1.0.0
@metaVariable
metaVariable / setupSingularity-2.5.1.sh
Last active May 15, 2018 04:02
install singularity-2.5.1 with privilege for CentOS
#!/bin/bash
VERSION=2.5.1
echo "# install squashfs-tools for CentOS."
echo "# update and install squashfs-tools."
yum update -y
yum install -y squashfs-tools libarchive-devel
# Singularity
echo "# make singularity-$VERSION."
#include <mpi.h>
#include <stdio.h>
int main(int argc, char** argv) {
// Initialize the MPI environment
MPI_Init(NULL, NULL);
// Get the number of processes
int world_size;
MPI_Comm_size(MPI_COMM_WORLD, &world_size);
@metaVariable
metaVariable / pqstat.py
Created June 27, 2019 11:30 — forked from JonnoFTW/pqstat.py
A python curses script to interactively view SGE qstat output
#!/usr/bin/env python
import curses
import subprocess
import sys
from datetime import datetime
AUTHOR = "Jonathan Mackenzie"
NAME = "pqstat"
def get_qstat(args):
return subprocess.Popen(['qstat']+args,stdout=subprocess.PIPE).communicate()[0]
def main(scr):
@metaVariable
metaVariable / qrsh_jupyter-notebook_t3.md
Last active July 9, 2019 14:11
qrsh + singularity + X11 Firefox + Jupyter Notebook on TSUBAME3.0

qrsh + singularity + X11 Firefox + Jupyter Notebook on TSUBAME3.0

目的

SSHポートフォワードが提供されていない qrsh コマンドで Jupyter Notebook を利用したい on TSUBAME3.0

概要

@metaVariable
metaVariable / tmux_local_build.sh
Last active July 12, 2019 05:07
build local tmux without privilege
# 参考元: https://qiita.com/mkuriki_/items/f934c8a81c922832a618#_reference-e7c0fc5959275df5a954
BUILD_DIR="$HOME/tmux-build"
INSTALL_DIR="$HOME/.local"
libevent_ver="2.1.8-stable"
ncurses_ver="6.1"
tmux_ver="2.6"
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}
@metaVariable
metaVariable / loop.sh
Last active November 13, 2019 06:35
適当なコマンドをターミナルで定期実行するコマンド
#!/bin/bash
CMD=${CMD:-"qstat"}
WAIT=${WAIT:-"60s"}
MAX=${MAX:-"10000"}
for i in $(seq $MAX)
do
clear
printf " ==== $(date +%H:%M:%S) ====\n\n"