Skip to content

Instantly share code, notes, and snippets.

View yoshi1984's full-sized avatar
🏠
Working from home

Yoshiyuki Yamada yoshi1984

🏠
Working from home
View GitHub Profile
cflags="-I$pkgincludedir -pipe -O2 -Wall -Wno-null-conversion -Wno-unused-private-field -Os -g -fno-strict-aliasing -DDBUG_OFF " #note: end space!
@yoshi1984
yoshi1984 / nginx
Created August 27, 2013 21:10
/etc/init.d/nginx
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
EMACS_VER=24.3
curl -O http://ftp.gnu.org/pub/gnu/emacs/emacs-${EMACS_VER}.tar.gz
svn co http://svn.sourceforge.jp/svnroot/macemacsjp/inline_patch/trunk inline_patch
tar xvfz emacs-${EMACS_VER}.tar.gz
cd emacs-${EMACS_VER}
patch -p0 < ../inline_patch/emacs-inline.patch
./configure --with-ns --without-x
make bootstrap
make install
cp nextstep/Emacs.app /Application
class Account < ActiveRecord::Base
def self.search(name = nil)
# search logic
end
end
# Twilio HTTP HAProxy Configuration
# Version: 0.1
global
daemon
log 127.0.0.1 local0 info
maxconn 60000
spread-checks 3
@yoshi1984
yoshi1984 / file0.txt
Created August 27, 2014 15:35
rails4でのcookieの設定・取得 ref: http://qiita.com/deepriver/items/0ba8da53b59b8e33458f
cookie["Cookie名指定"] = "値"
cookies[:hoge3] = "hoge3"
@yoshi1984
yoshi1984 / nginx.conf
Last active August 29, 2015 14:13 — forked from mimosz/nginx.conf
# sudo ln -s ~/nginx.conf unicorn.conf
upstream app_server {
server unix:/tmp/unicorn_padrino.sock fail_timeout=0;
}
server {
listen 80;
charset utf-8;
server_name db.innshine.com;
@yoshi1984
yoshi1984 / install-mysql5.7-circleci.sh
Last active February 29, 2016 05:56 — forked from kimh/install-mysql5.7-circleci.sh
Install MySQL 5.7 non-interactively in CircleCI
#!/bin/bash
set -x
set -e
curl -LO https://dev.mysql.com/get/mysql-apt-config_0.6.0-1_all.deb
echo mysql-apt-config mysql-apt-config/select-product select Apply | sudo debconf-set-selections
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7-dmr | sudo debconf-set-selections
echo mysql-apt-config mysql-apt-config/select-connector-python select none | sudo debconf-set-selections
echo mysql-apt-config mysql-apt-config/select-workbench select none | sudo debconf-set-selections
echo mysql-apt-config mysql-apt-config/select-utilities select none | sudo debconf-set-selections
@yoshi1984
yoshi1984 / 0_reuse_code.js
Created January 5, 2017 12:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yoshi1984
yoshi1984 / hitch.rb
Last active February 10, 2017 06:28 — forked from wallrat/hitch.rb
Homebrew brew formula for Varnish'es Hitch TLS Proxy Server
class Hitch < Formula
desc "A scalable TLS proxy by Varnish Software"
homepage "https://github.com/varnish/hitch"
url "https://github.com/varnish/hitch/archive/hitch-1.3.1.tar.gz"
sha256 "2a1c007b752e487a2a85204dcb620ba28fec4d51ebf3fa8528bfb05c94f21efd"
head "https://github.com/varnish/hitch.git"
depends_on "automake" => :build
depends_on "autoconf" => :build
depends_on "pkg-config" => :build