layout | title | date | comments | categories | tags | author |
---|---|---|---|---|---|---|
post |
How to setup Rails app with puma and NGINX |
2013-03-16 17:51 |
true |
nginx, capistrano, deployment, rails, ruby, puma |
Trung Lê |
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
import IPython.html.widgets as widgets | |
from IPython.display import display, clear_output | |
text = widgets.TextWidget() | |
display(text) | |
def handle_submit(sender): | |
print(text.value) | |
print("pls go to next") | |
if 'poc'==str(text.value): | |
print 456 |
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
# /config/puma.rb | |
app = "manabalss" # App-specific | |
root = "/home/deployer/apps/#{app}" | |
workers 5 | |
threads 1, 1 # relying on many workers for thread-unsafe apps | |
rackup DefaultRackup | |
port 11592 |
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
" This is the main file that loads up the other configuration files. | |
if has('win32') || has ('win64') | |
let $VIMHOME = $HOME."/vimfiles" | |
else | |
let $VIMHOME = $HOME."/.vim" | |
endif | |
source $VIMHOME/vundle | |
source $VIMHOME/vimrc_main |
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 $(brew --prefix); git fetch origin ; git reset --hard origin/master ; cd /usr/local/Library/Taps/homebrew ; rm -rf homebrew-science ; brew tap homebrew/science ; brew install opencv ; |
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
/** | |
* Created by hsu-wei-cheng on 1/19/15. | |
*/ | |
class hi{ | |
} | |
object hi { | |
def hello_scala() : String = { | |
return "Hello scala" |
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
<div class="pagenum"> | |
<table align="center" border="0" cellspacing="0"> | |
<tbody> | |
<tr> | |
<td class="btnleftpage" width="1%"> | |
<a href="/news"></a> | |
</td> | |
<td class="btnleft" width="1%"> | |
<a href="/news" rel="prev"></a> |
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
require File.expand_path('../boot', __FILE__) | |
# Pick the frameworks you want: | |
require "active_model/railtie" | |
require "active_record/railtie" | |
require "action_controller/railtie" | |
require "action_mailer/railtie" | |
require "action_view/railtie" | |
require "sprockets/railtie" | |
# require "rails/test_unit/railtie" |
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
# Start message | |
startup_message off | |
# Set hardstatus always on | |
hardstatus alwayslastline " %-Lw%{= Bw}%n%f %t%{-}%+Lw %=| %M %d %0c:%s " | |
# Set default encoding using utf8 | |
defutf8 on |