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
test |
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
#!/usr/bin/env ruby | |
## | |
# Change the type of MySQL columns that contain UTF-8 data to UTF-8 without changing their values | |
# | |
# Converts the columns to binary, then converts them back to char/text with the utf8 charset | |
# This is useful when the database has some other default value like latin1 but you've been | |
# storing values as UTF-8 | |
## |
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
### Keybase proof | |
I hereby claim: | |
* I am ericmason on github. | |
* I am ericmason (https://keybase.io/ericmason) on keybase. | |
* I have a public key whose fingerprint is 2E19 21D5 9F6E D235 C2E7 40C9 560F EBC4 A2E1 2685 | |
To claim this, I am signing this object: |
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
#!/usr/bin/env ruby | |
require 'zip/zip' # rubyzip gem | |
require 'nokogiri' | |
class WordMailMerge | |
def self.open(path, &block) | |
self.new(path, &block) | |
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
def force_settings | |
@replace["word/settings.xml"] = %{<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<w:settings xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:sl="http://schemas.openxmlformats.org/schemaLibrary/2006/main"><w:zoom w:percent="100"/></w:settings>} | |
end |