This is the haml version. If you want to use the same with erb just change haml to erb.
- Create you partial form example
_form.haml(The underscore at the beginning is really important). - In you
.hamlfile just write= partial("form").
| cd /Applications/Kaleidoscope.app/Contents/Resources/Integration/scripts | |
| ./install_git-default |
| require 'pry' | |
| class Animal | |
| def initialize(name) | |
| @name = name | |
| end | |
| def say() | |
| begin | |
| raise NotImplementedError, "something goes wrong" | |
| rescue Exception | |
| puts $! |
| require 'rake' | |
| require 'rake/testtask' | |
| Rake::TestTask.new do |t| | |
| t.test_files = Dir.glob('spec/**/*_spec.rb') | |
| end | |
| task(default: :test) |
| #!/usr/bin/env ruby | |
| # Full Contol on Ethnet, IP & TCP headers. Play with it ;) | |
| # to test it: nc -lvp 4444 | |
| # as root: tcpdump -nvvvv 'tcp port 4444' -i wlan0 # change wlan0 to your interface | |
| # or use packetfu to monitor as tcpdump | |
| ## cap = PacketFu::Capture.new(:iface => 'wlan0' , :promisc=> true) | |
| ## cap.show_live(:filter => 'tcp and port 4444') | |
| # libpcap should be installed | |
| # gem install pcaprub packetfu |
| <!doctype html> | |
| <!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
| <html> | |
| <head> | |
| <title>iOS 8 web app</title> | |
| <!-- CONFIGURATION --> |
| # The latest version of this script is now available at | |
| # https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh | |
| VERSION=1.9.3-p286 | |
| brew update | |
| brew install rbenv ruby-build rbenv-vars readline ctags | |
| if [ -n "${ZSH_VERSION:-}" ]; then | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc | |
| else | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile |
| require 'rubygems' | |
| require 'socket' | |
| include Socket::Constants | |
| class ChatServer | |
| def initialize | |
| @reading = Array.new | |
| @writing = Array.new | |
| @clients = Hash.new |
| function random_chinese_name() { | |
| function random(a, l) { | |
| var x = []; | |
| x.push(a[Math.ceil(Math.random() * a.length)]); | |
| while(l > 1) { | |
| x.push(a[Math.ceil(Math.random() * a.length)]); | |
| l--; | |
| } | |
| return x.join(""); | |
| } |