Skip to content

Instantly share code, notes, and snippets.

@poc7667
poc7667 / stef.py
Created August 2, 2015 08:45
stef
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
@poc7667
poc7667 / MB puma + Nginx settings
Last active August 29, 2015 14:25 — forked from Epigene/MB puma + Nginx settings
MB puma + Nginx settings
# /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
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ê

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@poc7667
poc7667 / .vimrc
Last active August 29, 2015 14:22 — forked from napcs/.vimrc
" 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
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 ;
/**
* Created by hsu-wei-cheng on 1/19/15.
*/
class hi{
}
object hi {
def hello_scala() : String = {
return "Hello scala"
<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>
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"
# 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