Inspired by Literate CoffeeScript.
$ cat hello.rb.md
Here's a simple program
puts "Hello, world"
$ ruby litrb.rb < hello.rb.md
Hello, world
Inspired by Literate CoffeeScript.
$ cat hello.rb.md
Here's a simple program
puts "Hello, world"
$ ruby litrb.rb < hello.rb.md
Hello, world
Recently someone asked me for online resources about MRI's internal C source | |
code. Here are a few - if there are more to add please leave a comment! - pat | |
1. Ruby Hacking Guide - The definitive resource for people who want to learn | |
the C programming details of how Ruby works internally. Intended for C hackers. | |
It was just recently translated into English from the original Japanese. | |
http://ruby-hacking-guide.github.io | |
2. Various presentations by Koichi Sasada - he often does public presentations | |
on Ruby internals and they're always fascinating and full of technical details. |
I was chasing down another issue (slow "Save As") and thought these two issues may have been related (with QuickLook being the common broken link). Unfortunately, my "Save As" dialog is still miserably slow on the initial load; but IconServicesAgent hasn't gone above 30MB and he rarely makes an appearance in the Console!
Some of these steps may not be necessary, but here are all of the steps I took that inadverdently put IconServicesAgent back in its place. Note: all commands are a single-line, if they appear to be multiple that's just the forum formatting.
Check for any QuickLooks related .plist files. In a terminal: mdfind com.apple.quicklook. -name .plist
I only had files at the system level (specifically within /System/Library/LaunchAgents/). If you have others, modify the directions below to take that into account (re-introducing plist files from the system level back up to the user).
Make some temporary directories to store these plist files, just in case: mkdir ~/tmp-quicklook
Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.
From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:
1. (On a mac): Command-option-J
2. (On a PC): Control-alt-J
$ brew install ansible # OSX
$ [sudo] pip install ansible # elsewhere
http://yysource.com/2011/03/debugging-with-css-outline-all-elements/ | |
* { outline: 2px dotted red } | |
* * { outline: 2px dotted green } | |
* * * { outline: 2px dotted orange } | |
* * * * { outline: 2px dotted blue } | |
* * * * * { outline: 1px solid red } | |
* * * * * * { outline: 1px solid green } | |
* * * * * * * { outline: 1px solid orange } | |
* * * * * * * * { outline: 1px solid blue } |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
# Copyright (C) [2014] by Keith Tom <keith dot tom at gmail> | |
# Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE | |
module Rack | |
# disable CSS3 and jQuery animations in test mode for speed, consistency and avoiding timing issues. | |
# Usage for Rails: | |
# in config/environments/test.rb | |
# config.middleware.use Rack::NoAnimations | |
class NoAnimations |
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
# env.rb or spec_helper.rb
Capybara.register_driver :poltergeist do |app|
opts = {
extensions: ["#{Rails.root}/features/support/phantomjs/disable_animations.js"] # or wherever
}
Capybara::Poltergeist::Driver.new(app, opts)
end