Skip to content

Instantly share code, notes, and snippets.

View masashi-sutou's full-sized avatar
🏠
Working from home

masashi-sutou masashi-sutou

🏠
Working from home
View GitHub Profile
@kocisov
kocisov / next_nginx.md
Last active June 10, 2024 19:45
How to setup next.js app on nginx with letsencrypt
@masuidrive
masuidrive / docker_rails.sh
Last active November 15, 2022 06:02
Docker ComposeでRails環境作成 mkdir -p railsapp && cd railsapp && curl -L http://bit.ly/rails6-docker | sh
#!/usr/bin/env bash
rails_version="${RAILS_VERSION:-7}"
ruby_version="${RUBY_VERSION:-3.0}"
node_version="${NODE_VERSION:-16}"
docker run --rm -v `pwd`:/usr/src/app ruby:$ruby_version sh -c "gem install rails --version $rails_version && rails new /usr/src/app --database mysql ${RAILS_OPTIONS} --git --force --version $rails_version"
cat << __EOT__ > Dockerfile
FROM ruby:$ruby_version
@ykst
ykst / gist:04abb7e4a4ae95fce81e
Created January 28, 2015 14:13
[iOS] 逆引きCorePlot

[iOS] 逆引きCorePlot

CorePlotを使う上でのTipsをまとめていきます。随時更新。

データソース

###データを更新する

- (void) reloadGraphData:(CPTGraph*)graph
{
    // データ取得の各種delegateが実行される。
 // graphに加えた表示上の変更はこれを実行しなくても即座に反映される。
@ajiyoshi-vg
ajiyoshi-vg / gist:d72b2cae129d73a405e4
Last active August 29, 2015 14:10
if式 / if文 の条件節で、左辺に定数を書くべき言語はあるか? @ajiyoshi.gist

if式 / if文 の条件節で、左辺に定数を書くべき言語はあるか? @ajiyoshi.gist

twitterからながれてきたこの話題。昔のCコンパイラは、if文の条件節で代入を書いても文句を言わなかったので、このようなコードに何の警告も出なかった。

#include<stdio.h>

int main() {
  int x = 0;
  /* おそらく意図と違うx == 1 と書くべきであった
@listochkin
listochkin / node-command-line-options.txt
Created April 17, 2014 11:00
Node V8 GC-related options
--log_gc (Log heap samples on garbage collection for the hp2ps tool.)
type: bool default: false
--expose_gc (expose gc extension)
type: bool default: false
--max_new_space_size (max size of the new generation (in kBytes))
type: int default: 0
--max_old_space_size (max size of the old generation (in Mbytes))
type: int default: 0
--max_executable_size (max size of executable memory (in Mbytes))
type: int default: 0
@rxaviers
rxaviers / gist:7360908
Last active June 11, 2024 09:23
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ShinichiU
ShinichiU / redmine-newer-2-3-1-gantt.patch
Last active April 27, 2016 10:36
Redmine 2.3.1 のガントチャートに週表示を消して日付表示にするバッチ
Index: app/views/gantts/show.html.erb
===================================================================
--- app/views/gantts/show.html.erb (リビジョン 11915)
+++ app/views/gantts/show.html.erb (作業コピー)
@@ -76,12 +76,17 @@
headers_height = header_height
show_weeks = false
+ show_week_day_top = false
show_days = false
@tsupo
tsupo / Twitter_API_1.1_rate_limit.txt
Created May 17, 2013 05:12
Twitter API 1.1 / 実行回数制限
Twitter API 1.1 の現行APIの制限
(REST API v1.1 Limits per window by resource)
https://dev.twitter.com/docs/rate-limiting/1.1/limits
・15分辺り最大何回実行できるか
Timelines
GET statuses/mentions_timeline 15回
GET statuses/user_timeline 180回/user, 300回/application
@PGMY
PGMY / iOSLib.md
Last active December 11, 2017 06:26
iOSで使えるライブラリなリポジトリまとめ