Skip to content

Instantly share code, notes, and snippets.

View silverskyvicto's full-sized avatar
🏢
Work

Yuuki Ebihara silverskyvicto

🏢
Work
  • Ricksoft Co., Ltd.
  • Japan
View GitHub Profile
#!/bin/bash
# install tool necessary
sudo apt -y install make gcc autoconf
# install dependencies
sudo apt-get -y install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
GIT_DL_PAGE="https://mirrors.edge.kernel.org/pub/software/scm/git/"
GIT_VERSION="git-2.40.0"
#!/bin/bash
# install tool necessary
yum -y install gcc autoconf ncurses-devel
cd /usr/local/src
git clone https://github.com/vim/vim.git
if [ $? -eq 0 ]; then
@silverskyvicto
silverskyvicto / install_git_centos7.sh
Last active March 15, 2023 02:00
Script for installing Git.
#!/bin/bash
# install tool necessary
yum -y install gcc make autoconf
# install dependencies
yum -y install curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel
GIT_DL_PAGE="https://mirrors.edge.kernel.org/pub/software/scm/git/"
GIT_VERSION="git-2.40.0"
@silverskyvicto
silverskyvicto / install_libreoffice_centos.sh
Created August 13, 2018 02:14
Script for installing LibreOffice
#!/bin/bash
# A script to install or update libreoffice releases properly
if [[ "$1" == "-x" ]]; then
shift
set -x
fi
me=`basename $0`
Usage() {
@silverskyvicto
silverskyvicto / centos6-setup.sh
Last active June 3, 2018 12:34
CentOS 6 setup script
#!/bin/bash
echo "========= CentOS Base Setup Start ========="
echo "===== time setup start ====="
yum -y update
### オリジナルをバックアップ
cp -a /etc/sysconfig/clock /etc/sysconfig/clock.org
if [ $? -eq 0 ]; then
@silverskyvicto
silverskyvicto / centos7-setup.sh
Last active June 3, 2018 12:33
CentOS 7 Setup script
#!/bin/bash
echo "========= CentOS Base Setup Start ========="
echo "===== time setup start ====="
yum -y update
# タイムゾーンは日本
timedatectl set-timezone Asia/Tokyo
# 手動で同期しておく
chronyc -a makestep
echo "===== time setup finish ====="
@silverskyvicto
silverskyvicto / file0.txt
Created April 21, 2018 17:05
OpenLDAPのインストール(ソースから) ref: https://qiita.com/silverskyvicto/items/13c069a7f646e86073b2
# curl -LkvOf ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.45.tgz
# coding: UTF-8
import sys
import json
list_name = sys.argv[1]
with open(list_name, "r") as fList:
file_name = fList.readline().replace('\n', '')
input_str = ""
@silverskyvicto
silverskyvicto / file0.txt
Created November 14, 2017 11:51
PostgreSQL のログイン時にパスワードを省略する方法 ref: https://qiita.com/silverskyvicto/items/0909d698526779d975f5
## .pgpassファイルを作成
# vi .pgpass
## 次の内容を記載
<DBサーバのホスト名>:<DBサーバのポート>:<データベース名>:<ユーザ名>:<パスワード>
# 記載したら保存する
## 権限を以下のコマンドで変更する
# chmod 600 .pgpass
@silverskyvicto
silverskyvicto / create_ascii_control_file.py
Last active August 18, 2017 16:03
Script for creating file including ascii control character. for test
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
ascii_controls = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x7f]
try:
output = open(sys.argv[1], 'w')