- Go to Devices & Printers (Control Panel\All Control Panel Items\Devices and Printers)
- On the top menu, there is “Add a Printer”. (Windows 8.1)
- Select “The printer I want isn’t listed” => Next
- “Add a local printer with manual settings” => Next
- “Use an Existing Port” and select “USB001 (Virtual Printer Port For USB)” => Next
- Select “Generic” from Manufacturer, “Generic / Text Only” from Printers => Next
- If it asked, which version you want, keep recommended option and => Next
- Give a Printer Name, E.g.: “POS58” => Next
- “Do not share” but if you want, share it.
- Turn on your printer and click on “Print a test page”. It should print a long text.
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 'test_helper' | |
# Capybara driver chosen based on the value of ENV['TEST_WITH_CHROME'] | |
# - `false` - use capybara-webkit | |
# - `headless` - chromedriver in headless mode | |
# - `true` (or any other value) - chromedriver in a Window | |
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase | |
if ENV['TEST_WITH_CHROME'] && ENV['TEST_WITH_CHROME'] != 'false' | |
require "selenium/webdriver" |
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
# shell function to compress image sizes | |
# smartresize inputfile.png 300 outputdir/ | |
# credit: https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/ | |
smartresize() { | |
mogrify -path $3 -filter Triangle -define filter:support=2 -thumbnail $2 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB $1 | |
} |
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
#!/bin/sh | |
# bash -c "$(curl -fsSL https://gist.github.com/jaxn/e1fd1442582141282d8bebdeec536fd8/raw)" | |
read -r -p "Would version of ruby would you like to install? " rubyversion | |
read -r -p "Would version of rails would you like to install? " railsversion | |
echo "Installing dependencies" | |
sudo apt-get --assume-yes -qq update | |
sudo apt-get --assume-yes -qq install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs openssh-server qt5-default libqt5webkit5-dev xvfb libmagickwand-dev | |
cd | |
if [ ! -d ~/.rbenv ] ; then | |
echo "Installing rbenv" |
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
# An example driver with multiple implementations | |
# | |
# Allows documentation on the parent class while implementing functionality on the child classes. | |
# Raises a NoMethodError if the child class does not implement a documented method | |
class InterfaceDriver < ActiveRecord::Base | |
self.inheritance_column = :type | |
def abstract( method ) #:nodoc: | |
raise NoMethodError.new("undefined abstract method `#{method}' called for InterfaceDriver <#{self.class}:#{self.id}>") | |
end |