Skip to content

Instantly share code, notes, and snippets.

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

Suguru Murakami sugumura

🏠
Working from home
View GitHub Profile
@sugumura
sugumura / webapp_healthd.conf
Created March 1, 2018 11:32
nginxでキャッシュ時間を0にしたい場合
########
# ~~~
########
location /public {
alias /var/app/current/public;
gzip_static on;
gzip on;
expires 0;
add_header Cache-Control public;
@sugumura
sugumura / snippets.md
Created October 24, 2017 01:29
自分のスニペットコマンドメモにしていくつもり

Server

圧縮

$ tar zcvf log`date +%Y%m%d`.tar.gz ./log

Local Server

@sugumura
sugumura / overwrite_plist.sh
Created October 19, 2017 16:01
for cordova hook scripts
#!/bin/bash
PLIST=platforms/ios/*/*-Info.plist
echo 'exec overwrite_plist.sh'
cat << EOF |
Delete :CFBundleDevelopmentRegion
Add :CFBundleDevelopmentRegion array
Add :CFBundleDevelopmentRegion:0 string "Japanese"
@sugumura
sugumura / prefectures.json
Last active July 5, 2017 05:24
都道府県。jp_prefecture gemのyamlから変換しています。 https://github.com/chocoby/jp_prefecture/blob/master/data/prefecture.yml
[
{
"code": 1,
"name": "北海道",
"name_e": "hokkaido",
"name_h": "ほっかいどう",
"name_k": "ホッカイドウ",
"area": "北海道"
},
{
@sugumura
sugumura / aws_elastic_beanstalk.md
Created June 7, 2017 05:33
Elastic Beanstalkで新しいアカウントで環境を作る場合

create new profile

$ brew update
$ brew upgrade aws-cli aws-elasticbeanstalk

$ aws configure --profile [profile-name]
# add setting ~/.aws/[config/credentials]

$ eb init --profile [profile-name]
@sugumura
sugumura / create_rails_app.md
Last active April 27, 2018 10:39
Start Ruby on Rails.
$ mkdir {your_app}
$ bundle init
$ vim Gemfile

# enable rails gem and edit version
gem "rails", '5.2.0'


$ bundle install --path=vendor/bundle --jobs=4
@sugumura
sugumura / README.md
Last active June 7, 2017 08:20
MySQL PostgreSQL on docker

please download files on your computer.

# example use postgresql
$ cd your_project_path
$ mv docker-compose-postgresql.yml docker-compose.yml
$ docker-compose up -d

# terminate
$ docker-compose down
@sugumura
sugumura / gen_icons.sh
Created May 16, 2017 05:42
Mac OS X用のアイコンファイル(.icns)を生成するスクリプトです。icon_512x512@2x.png(解像度が1024x1024)のファイルを実行フォルダに設置して実行してください。
#!/bin/sh
# for Mac OS X
# required sips command
cd `dirname $0`
outdir="icon.iconset"
mkdir -p $outdir
if [ -e "icon_512x512@2x.png" ]; then
@sugumura
sugumura / 2016-11-16-javascript.md
Created November 16, 2016 11:55
第4回Javascript勉強会@未来会議室(プログラミング超入門) http://otona.connpass.com/event/44234/

第4回Javascript勉強会@未来会議室(プログラミング超入門)

http://otona.connpass.com/event/44234/

データ構造

データとは何か

コンピュータで表現される何らかの情報

@sugumura
sugumura / 2016-10-19-javascript.md
Last active November 2, 2016 14:51
第3回Javascript勉強会@未来会議室(プログラミング超入門) http://otona.connpass.com/event/41816/

2016/10/19

Javascript勉強会第三回

アルゴリズム

アルゴリズムの活用
コンピュータになんらかの手続きをし、問題を解決する
多くの場合繰り返し処理を含む