Skip to content

Instantly share code, notes, and snippets.

View michiomochi's full-sized avatar
🤗
Happy!

Michikawa Masayoshi michiomochi

🤗
Happy!
View GitHub Profile
@michiomochi
michiomochi / userpic.sh
Created July 7, 2023 16:24 — forked from palmerc/userpic.sh
Updating a user's picture from a script
#!/bin/bash
set -e
declare -x USERNAME="$1"
declare -x USERPIC="$2"
declare -r DSIMPORT_CMD="/usr/bin/dsimport"
declare -r ID_CMD="/usr/bin/id"
@michiomochi
michiomochi / google_form_api.gs
Last active August 29, 2015 14:27
google_form_api
function doGet(e) {
var form = FormApp.openById(e.parameter.form_id);
var items = form.getItems();
var result = {form_id: form.getId(), items: []};
for (var i = 0; i < items.length; i++) {
var item = items[i];
var itemId = item.getId();
var itemTitle = item.getTitle();
var itemType = String(item.getType());
#!/bin/bash
set -e
PREFIX=${HOME}/local
BINDIR=${PREFIX}/bin
LIBDIR=${PREFIX}/lib
INCLUDEDIR=${PREFIX}/include
LOGDIR=${PREFIX}/log
LOGFILE=${LOGDIR}/setup_`date +%m%d%H%M%S`.log
cd ~/local/src
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz
tar xvf ruby-2.1.1.tar.gz
cd ruby-2.1.1
./configure --prefix=${HOME}/local
make -j2
make install
pkg-config
http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
# X11 compile install
# python
cd ${HOME}/local/src
wget --no-check-certificate http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar xvf Python-2.7.6.tgz
cd Python-2.7.6
env PKG_CONFIG_PATH=${HOME}/local/lib/pkgconfig:${HOME}/local/share/pkgconfig ./configure --prefix=${HOME}/local --enable-shared LDFLAGS="-L/home/vagrant/local/lib -fPIC"
make -j2
make install
cd ~/local/src
wget http://curl.haxx.se/download/curl-7.21.7.tar.bz2
tar xvf curl-7.21.7.tar.bz2
cd curl-7.21.7
./configure --prefix=${HOME}/local
make -j 2
make install
readlineをコンパイルインストールする
検証環境: CentOS6.4 64bit
インストール先
${HOME}/local/bin
readlineソースファイル
http://ftp.gnu.org/pub/gnu/readline/readline-6.3.tar.gz
検証環境: CentOS6.4 64bit
インストール先
${HOME}/local/bin
perlソースファイル
http://www.cpan.org/src/5.0/perl-5.18.0.tar.gz
================================
手順書