If you, like me, resent every dollar spent on commercial PDF tools,
you might want to know how to change the text content of a PDF without
having to pay for Adobe Acrobat or another PDF tool. I didn't see an
obvious open-source tool that lets you dig into PDF internals, but I
did discover a few useful facts about how PDFs are structured that
I think may prove useful to others (or myself) in the future. They
are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.
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
function! IAmAPutsEmojiDebugger() | |
ruby <<EOS | |
separator = rand(0x1F601..0x1F64F).chr('UTF-8') | |
VIM::command("normal! oputs '#{separator}' * (`tput cols`.to_i / 2)") | |
VIM::command('normal! oputs "#{__FILE__}:#{__LINE__}"') | |
VIM::command("normal! oputs '#{separator}' * (`tput cols`.to_i / 2)") | |
EOS |
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
defmodule Blink do | |
@led_gpio 2 | |
def start() do | |
gpio_driver = GPIO.open() | |
GPIO.set_direction(gpio_driver, @led_gpio, :output) | |
loop(gpio_driver, 0) | |
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
= f.simple_fields_for :inputs do |input| | |
= render 'input_fields', f: input | |
.links | |
= link_to_add_association f, :inputs, partial: 'input_fields', force_non_association_create: true do | |
Add |
gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'
Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component
(and thus, prerendering).
Note that jquery-rails
can be removed from Gemfile, the npm version of jquery
and jquery-ujs
will be used instead.
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
In Gemfile | |
========= | |
gem 'capistrano-rails' | |
gem 'capistrano-rbenv' | |
gem 'capistrano-rbenv-install' | |
gem 'capistrano-safe-deploy-to' | |
gem 'capistrano-sidekiq' | |
gem 'capistrano3-puma' | |
In Capfile |
- Indent using 2 spaces
- Use single quotes, unless you are writing JSON
- Declare one variable per var statement
- Variables and properties should use lower camel case capitalization
- Class names should be capitalized using upper camel case
- Constants should be declared as regular variables or static class properties, using all uppercase letters
- Use the triple equality operator
UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!
- liblinear-ruby: Ruby interface to LIBLINEAR using SWIG
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
This is a Python script to extract GNOME/GTK's color scheme and apply it to Wine, so that the themes (approximately) match. | |
Instructions: | |
1. Set your Gnome theme as you would like it | |
2. Run with a command like "python wine_colors_from_gtk.py" | |
3. Restart any apps running in Wine. They should match the Gnome theme colors now. | |
Better description with screenshots here: http://www.endolith.com/wordpress/2008/08/03/wine-colors/ | |
This is also stored on https://code.launchpad.net/~endolith/+junk/wine-color-scraper |
NewerOlder