Skip to content

Instantly share code, notes, and snippets.

View caleywoods's full-sized avatar

Caley Woods caleywoods

View GitHub Profile
@caleywoods
caleywoods / encoding_repairer.rb
Created April 20, 2021 20:40 — forked from xijo/encoding_repairer.rb
Repair utf-8 strings that contain iso-8599 encoded utf-8 characters
class EncodingRepairer
REPLACEMENTS = {
"€" => "€", "‚" => "‚", "„" => "„", "…" => "…", "ˆ" => "ˆ",
"‹" => "‹", "‘" => "‘", "’" => "’", "“" => "“", "â€" => "”",
"•" => "•", "–" => "–", "—" => "—", "Ëœ" => "˜", "â„¢" => "™",
"›" => "›", "Å“" => "œ", "Å’" => "Œ", "ž" => "ž", "Ÿ" => "Ÿ",
"Å¡" => "š", "Ž" => "Ž", "¡" => "¡", "¢" => "¢", "£" => "£",
"¤" => "¤", "Â¥" => "¥", "¦" => "¦", "§" => "§", "¨" => "¨",
"©" => "©", "ª" => "ª", "«" => "«", "¬" => "¬", "®" => "®",
Array (
[order_id] => 300080
[is_parent_order] => N
[parent_order_id] => 0
[company_id] => 0
[user_id] => 14
[total] => 72.00
[subtotal] => 72
[discount] => 0.00
[subtotal_discount] => 0.00
@caleywoods
caleywoods / Poll.php
Created September 1, 2012 01:49 — forked from jamescarr/Poll.php
<?php
namespace Poll\Model;
use Zend\InputFilter\Factory as InputFactory;
use Zend\InputFilter\InputFilter;
use Zend\InputFilter\InputFilterAwareInterface;
use Zend\InputFilter\InputFilterInterface;
class Poll {
public $id,
@caleywoods
caleywoods / hack.sh
Created April 5, 2012 19:26 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@caleywoods
caleywoods / move_text.md
Created March 6, 2012 22:23 — forked from colinta/move_text.md
move_text

Since there is already a binding for "m+":

Vintage/Default.sublime-keymap:

{ "keys": ["m", "<character>"], "command": "vi_set_bookmark",
    "context": [{"key": "setting.command_mode"}]
},

You might have trouble getting the keymap you want. But try this:

# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.