start new:
tmux
start new with session name:
tmux new -s myname
| ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
| html = %(<div class="field_with_errors">#{html_tag}</div>).html_safe | |
| # add nokogiri gem to Gemfile | |
| form_fields = [ | |
| 'textarea', | |
| 'input', | |
| 'select' | |
| ] |
| # Apparently, I am really 'en fuego' today. | |
| require 'test/unit' | |
| module RubyRegexMeister | |
| BALANCED_GROUP_CHECKER = /( | |
| (?<non_grouping_char> | |
| [^\(\{\[\<\)\}\]\>] | |
| ){0} | |
| (?<parens_group> |
| diff -r 96a023de3ddf make/sun/font/Makefile | |
| --- a/make/sun/font/Makefile Wed Jun 06 18:39:46 2012 -0700 | |
| +++ b/make/sun/font/Makefile Fri Jun 08 12:52:01 2012 +0900 | |
| @@ -128,7 +128,7 @@ | |
| ifeq ($(USING_SYSTEM_FT_LIB), false) | |
| FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6 | |
| endif | |
| - OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype | |
| + OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype -lfontconfig | |
| endif |
| # The following should prevent an ArgumentError "invalid %-encoding (...%)" exception from being raised for malformed URLs. | |
| # To use this code simply drop this in your rails app initializers. | |
| # See: https://github.com/rack/rack/issues/337 | |
| # Taken from: http://stackoverflow.com/a/11162317/1075006 | |
| module URI | |
| major, minor, patch = RUBY_VERSION.split('.').map { |v| v.to_i } |
| # Create a new file in your home directory called .gtkrc-eclipse | |
| # call eclipse with this command: | |
| # Gtk2 forced: | |
| # export SWT_GTK3=0 | |
| # env GTK2_RC_FILES=/usr/share/themes/<YourTheme>/gtk-2.0/gtkrc:/home/<YourUser>/.gtkrc-eclipse '/path_to_eclipse/eclipse' | |
| # In your Eclipse directory find the file 'e4_default_gtk.css' | |
| # In this file there's a CSS class: |
| su - | |
| #dependcies | |
| #centos 6.2 | http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-7.noarch.rpm | |
| rpm -Uvh http://mirrors.ustc.edu.cn/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm | |
| yum -y groupinstall 'Development Tools' 'Additional Development' | |
| yum -y install readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc sqlite-devel gcc-c++ libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel system-config-firewall-tui python-devel redis |
| #!/bin/sh | |
| # | |
| cmd=$(which tmux) | |
| session=hjue | |
| if [ -z $cmd ]; then | |
| echo "You need to install tmux." | |
| exit 1 | |
| fi |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| RSpec.configure do |config| | |
| config.before(:suite) do | |
| DatabaseCleaner.clean_with(:truncation) | |
| end | |
| config.before(:each) do | |
| DatabaseCleaner.strategy = Capybara.current_driver == :rack_test ? :transaction : :truncation | |
| DatabaseCleaner.start | |
| end |