- Connect printer, install printer drivers, and enable Printer Sharing.
- Open terminal, run:
dns-sd -Z _ipp._tcp
. You'll see a few lines of repeated text. Look for your printer's name, next to that record you will see aTXT
, copy everything afterTXT
into a notepad. - In that TXT line, you'll see a line like this:
"pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/pwg-raster"
Change that, to add,image/urf
. So it'll look like:"pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/pwg-raster,image/urf"
- Now take that entire TXT line, and add it to this:
dns-sd -R "name_to_be advertised" _ipp._tcp.,_universal . 631 URF=none pdl=application/pdf,image/urf YOUR_TXT_STRING
- Run that line in the terminal, and Airprint should be enabled.
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 IO | |
def read | |
if @eof | |
'' | |
else | |
`res = self.read_proc(@path)` | |
@eof = true | |
@lineno = res.size | |
res | |
end |
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
SPROCKETS_NON_DIGEST = true | |
# form: https://gist.github.com/ryana/6049833 | |
raise("Sprockets monkey patch for v 2.10.0. Check before moving on") unless Sprockets::VERSION == "2.10.0" | |
module Sprockets | |
class Manifest | |
def compile(*args) |
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
Day job: | |
Your Rails contributions (if any): | |
What's your Ruby/Rail experience?: | |
How do you use GitHub?: |
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 'rubygems' | |
require 'eventmachine' | |
require 'em-http' # gem install em-http-request | |
require 'yajl' # gem install yajl-ruby | |
module ChatClient | |
def post_init | |
@name = "anonymous_#{ChatClient.client_num+=1}" | |
@sid = ChatClient.channel.subscribe(method(:send_msg)) | |
@buf = '' |