As configured in my dotfiles.
start new:
tmux
start new with session name:
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Belajar Git</title> | |
</head> | |
<body> | |
<a href="http://feedburner.google.com/fb/a/mailverify?uri=saiqulhaq&loc=en_US">Subscribe to M. Saiqul Haq Site by Email</a> | |
</body> | |
</html> |
#!/bin/sh | |
# Build Zsh from sources on Ubuntu. | |
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file. | |
# Some packages may be missing | |
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo | |
git clone git://zsh.git.sf.net/gitroot/zsh/zsh | |
cd zsh |
As configured in my dotfiles.
start new:
tmux
start new with session name:
sudo apt-get build-dep tmux | |
git clone git://tmux.git.sourceforge.net/gitroot/tmux/tmux tmux | |
cd tmux | |
./autogen.sh | |
./configure --prefix=/usr/local | |
make |
class ApplicationController < ActionController::Base | |
... | |
# FORCE to implement content_for in controller | |
def view_context | |
super.tap do |view| | |
(@_content_for || {}).each do |name,content| | |
view.content_for name, content | |
end | |
end | |
end |
source 'http://rubygems.org' | |
gem 'rails', '3.1.3' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
# To use ActiveModel has_secure_password | |
# gem 'bcrypt-ruby', '3.0.1' |
<script src="your_path/holder.js"></script> |
// Usage | |
// font awesome | |
// icon_link_to("Dashboard", internal_path, fa: :dashboard, class: "btn btn-primary") | |
// bootstrap | |
// icon_link_to("Dashboard", internal_path, bs: :home, class: "btn btn-primary") | |
def icon_link_to text, path, options = {} | |
list = block_given? ? yield : "" | |
btn_dropdown = options.delete(:dropdown) ? content_tag(:i, "", class: 'fa fa-angle-left pull-right') : "" | |
if icon = options.delete(:fa) // font-awesome | |
return link_to(content_tag(:i, "", class: 'fa fa-' + icon.to_s) + content_tag(:span, text) + btn_dropdown, path, options) + list |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
require 'active_record' | |
require 'bcrypt' | |
class User < ActiveRecord::Base | |
PASSWORD_SALT = '$2a$20$ESQ40HbYj00QFse2rbArOe'.freeze | |
PASSWORD_COST = 15.freeze | |
establish_connection adapter: 'sqlite3', database: ':memory:' | |
connection.create_table table_name, force: true do |t| | |
t.string :email |