This file contains 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
# Change Java Runtime: | |
sudo update-alternatives --config java | |
# Delete Open-JDK | |
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\* | |
# Change fonts - remove hinting: | |
http://askubuntu.com/questions/32624/ugly-fonts-in-netbeans-how-can-i-make-it-use-the-system-font | |
# Change RubyMine AntiAliasing first: |
This file contains 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
class Calculator | |
def calc(raw) | |
return 0 if raw.empty? | |
arith_calc(sanitize(raw)) | |
end | |
protected | |
def sanitize(raw='') | |
raw.scan(/[0-9]|\+|\-|\*|\/|\(|\)|sqrt/).join. | |
split(/(\+)|(\-)|(\*)|(\/)|(\()|(\))|(sqrt)/).reject(&:empty?) |
This file contains 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> | |
<meta charset="utf-8"> | |
<style type="text/css"> | |
.my.select { | |
width: 120px; | |
font-size: 12px; | |
background-color: #ddd; | |
cursor: pointer; |
This file contains 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 'spreadsheet' | |
Spreadsheet.client_encoding = 'UTF-8' | |
test_data = {:foo => 'a/a', :bar => 'normal'} | |
book = Spreadsheet::Workbook.new | |
sheet = book.create_worksheet :name => "#{test_data[:foo]}" | |
sheet = book.create_worksheet :name => "#{test_data[:bar]}" |
NewerOlder