Skip to content

Instantly share code, notes, and snippets.

View inoccu's full-sized avatar

Kenichi Inoue inoccu

View GitHub Profile
@miya0001
miya0001 / setuser.sh
Last active August 29, 2015 14:06
amimotoのnginxまわりのユーザーとかをごにょごにょ
#!/usr/bin/env bash
set -ex
service monit stop
sed -i -e "s/^user .*;$/user ec2-user ec2-user;/" /etc/nginx/nginx.conf
sed -i -e "s/^listen.owner .*$/listen.owner = ec2-user/" /etc/php-fpm.d/www.conf
sed -i -e "s/^listen.group .*$/listen.group = ec2-user/" /etc/php-fpm.d/www.conf
sed -i -e "s/nginx:nginx/ec2-user:ec2-user/g" /etc/monit.d/php-fpm
@mshibuya
mshibuya / rails_admin.ja.yml
Last active November 2, 2022 09:39
Japanese translation for RailsAdmin
ja:
admin:
js:
true: True
false: False
is_present: 存在する
is_blank: 空白
date: 日付 ...
between_and_: ... から ...
today: 今日
@strogonoff
strogonoff / middleware.py
Created November 16, 2011 08:56
Django middleware for cross-domain XHR. WARNING: Defaults are unsafe here. Make sure to set proper restrictions in production!
from django import http
try:
from django.conf import settings
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS
XS_SHARING_ALLOWED_METHODS = settings.XS_SHARING_ALLOWED_METHODS
XS_SHARING_ALLOWED_HEADERS = settings.XS_SHARING_ALLOWED_HEADERS
XS_SHARING_ALLOWED_CREDENTIALS = settings.XS_SHARING_ALLOWED_CREDENTIALS
except AttributeError:
XS_SHARING_ALLOWED_ORIGINS = '*'