This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 参考: http://bclennox.com/extremely-large-file-uploads-with-nginx-passenger-rails-and-jquery | |
cd lib | |
git clone https://github.com/vkholodkov/nginx-upload-module.git | |
cd nginx-upload-module | |
# 新し目のnginxに対応したブランチに変更 | |
git checkout 2.255 | |
# nginx-upload-moduleでstateファイルにアクセスできないバグに対応するパッチを当てる | |
# https://github.com/vkholodkov/nginx-upload-module/issues/41#issuecomment-59182124 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd path/to/project | |
$ Dockerfile-local-dev | |
FROM ruby:2.6.1 | |
RUN apt update -qq \ | |
&& apt install -y build-essential \ | |
curl | |
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd path/to/project | |
$ rbenv local 2.3.0 | |
$ bundle init | |
$ vi Gemfile | |
$ cat Gemfile | |
source "https://rubygems.org" | |
gem "rails" | |
$ bundle install --path vendor/bundle | |
$ be rails new . -T -d mysql --skip-turbolinks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
exec > >(tee /var/log/ffmpeg.log|logger -t user-data -s 2>/dev/console) 2>&1 | |
rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm | |
yum remove libvpx libogg libvorbis libtheora libx264 x264 ffmpeg | |
yum install --enablerepo=epel gcc gcc-c++ automake autoconf libtool yasm nasm -y | |
mkdir /root/lib | |
cd /root/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# -*- coding: utf-8 -*- | |
require 'rubygems' | |
require 'cgi' | |
require 'time' | |
require 'openssl' | |
require 'base64' | |
require 'net/http' | |
require 'net/https' | |
require 'pp' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### install Mesa | |
$ cd | |
$ mkdir lib | |
$ cd lib/ | |
$ wget ftp://ftp.freedesktop.org/pub/mesa/9.0.3/MesaLib-9.0.3.tar.gz | |
$ tar xvzf MesaLib-9.0.3.tar.gz | |
$ cd Mesa-9.0.3/ | |
$ sudo apt-get update | |
$ sudo apt-get install gcc g++ make autoconf wdiff libtool bison flex libxml2 python-libxml2 xutils-dev pkg-config libx11-dev libxext-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-xfixes0-dev libdrm-dev llvm-dev | |
$ ./configure --enable-xlib-glx --disable-dri |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## CentOS-6.2-x86_64-minimal.iso完了後 | |
# shutdown -h now | |
## ネットワーク設定はeth0をNATに、eth1をホストオンリーアダプタにする | |
# cd /etc/sysconfig/network-scripts/ | |
# vi ifcfg-eth0 | |
DEVICE="eth0" | |
BOOTPROTO=dhcp | |
HWADDR="00:00:00:00:00:00" | |
NM_CONTROLLED="yes" | |
ONBOOT="yes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install zsh zsh-dev | |
$ sudo apt-get install curl | |
$ sudo apt-get install make | |
$ sudo apt-get install gcc | |
$ sudo apt-get install g++ | |
$ sudo apt-get install emacs | |
$ sudo apt-get install emacs-goodies-el | |
$ sudo apt-get install git | |
$ sudo apt-get install subversion | |
$ sudo apt-get install zlib1g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Equivalent of "tail -f" as a webpage using websocket | |
# Usage: webtail.py PORT FILENAME | |
# Tested with tornado 2.1 | |
# Thanks to Thomas Pelletier for it's great introduction to tornado+websocket | |
# http://thomas.pelletier.im/2010/08/websocket-tornado-redis/ | |
import tornado.httpserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; .emacs | |
;; enable visual feedback on selections | |
(setq transient-mark-mode t) | |
;; default to better frame titles | |
(setq frame-title-format | |
(concat "%b - emacs@" (system-name))) | |
;; default to unified diffs |
NewerOlder