This file contains hidden or 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 'socket' #socket library | |
| def open_port(host, port) | |
| sock = Socket.new(:INET, :STREAM) | |
| raw = Socket.sockaddr_in(port, host) | |
| puts "#{port} open." if sock.connect(raw) | |
| rescue (Errno::ECONNREFUSED) | |
| rescue(Errno::ETIMEDOUT) | |
| end |
This file contains hidden or 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
| .box { | |
| background: #FFF; | |
| padding: 20px; | |
| margin: 10px; | |
| } | |
| .box h1 { | |
| text-align:center; | |
| position:relative; | |
| } |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Untiled</title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <link rel="icon" href="http://scotch.io/images/icons/favicon-32.png" type="image/png"><!-- default favicon --> | |
| <link rel="shortcut icon" href="http://scotch.io/favicon.ico"><!-- legacy default favicon (in root, 32x32) --> | |
This file contains hidden or 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
| .ribbon { | |
| text-align: center; | |
| position: relative; | |
| color: #fff; | |
| margin: 0 -30px 30px -30px; | |
| padding: 10px 0; | |
| text-shadow: 0 1px rgba(0,0,0,.8); | |
| background: #00AA9C; | |
| background-image: -moz-linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0)); | |
| background-image: -webkit-linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0)); |
This file contains hidden or 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
| <select name="timezone" > | |
| <option disabled selected style='display:none;'>Time Zone...</option> | |
| <optgroup label="US (Common)"> | |
| <option value="America/Puerto_Rico">Puerto Rico (Atlantic)</option> | |
| <option value="America/New_York">New York (Eastern)</option> | |
| <option value="America/Chicago">Chicago (Central)</option> | |
| <option value="America/Denver">Denver (Mountain)</option> | |
| <option value="America/Phoenix">Phoenix (MST)</option> | |
| <option value="America/Los_Angeles">Los Angeles (Pacific)</option> |
This file contains hidden or 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
| Ext.apply(Ext.form.VTypes, { | |
| // Color vtype definition | |
| color: function(v) {return /^#(?:[0-9a-f]{3}){1,2}$/i.test(v);}, | |
| colorText: 'This field must be a valid hex web color.', | |
| colorMask: /[#0-9a-f]/i, | |
| }); |
This file contains hidden or 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
| <%# shared/_flash_messages.html.erb %> | |
| <% flash.each do |type, message| %> | |
| <div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
| <button class="close" data-dismiss="alert">×</button> | |
| <i class='<%= bootstrap_icon_for(type) %>'></i> <%= message %> | |
| </div> | |
| <% end %> |
This file contains hidden or 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
| ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
| html = %(<div class="error">#{html_tag}) | |
| html += %(<small>#{instance.error_message.to_a.to_sentence}</small>).html_safe unless html_tag =~ /^<label/ | |
| html += %(</div>) | |
| html.html_safe | |
| end |
This file contains hidden or 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
| source 'https://rubygems.org' | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '4.0.3' | |
| gem 'activerecord-fb-adapter' | |
| gem 'activerecord-jdbc-adapter' | |
| ... |
This file contains hidden or 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
| Use CONNECT or CREATE DATABASE to specify a database | |
| SQL> CONNECT C:\data\db\production.fdb; | |
| Database: C:\data\db\production.fdb | |
| SQL> show sql dialect; | |
| Client SQL dialect is set to: 3 and database SQL dialect is: 3 | |
| SQL> set sql dialect 2 | |
| CON> show sql dialect; | |
| WARNING: Client SQL dialect has been set to 2 when connecting to Database SQL dialect 3 database. | |
| SQL> set sql dialect 1; | |
| WARNING: Client SQL dialect has been set to 1 when connecting to Database SQL dialect 3 database. |
OlderNewer