convert image.png -resize 40 txt:-|sed -E 's/://;s/\( ? ?//;s/, ? ?/,/g;s/\)//;s/([0-9]+,[0-9]+,[0-9]+),[0-9]+/\1/g;s/255/254/g;/mage/d'|awk '{print $1,$2}'|sed -E 's/^0,[0-9]+ /print "echo;tput setaf "\;/;s/^[0-9]+,[0-9]+ /print "tput setaf ";/;s/(.+),(.+),(.+)/\1\/42.5*36+\2\/42.5*6+\3\/42.5+16/'|bc|sed 's/$/;echo -n " ";/'|tr '\n' ' '|sed 's/^/tput rev;/;s/; /;/g;s/$/tput sgr0;echo/'|bash
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 | |
# NOTE: Requires Ruby 2.1 or greater. | |
# This script can be used to parse and dump the information from | |
# the 'html/contact_info.htm' file in a Facebook user data ZIP download. | |
# | |
# It prints all cell phone call + SMS message + MMS records, plus a summary of each. | |
# | |
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQENBEitfOcBCAC238JNzEZwSXVGZmIAlmfyyVqgOmoReKyp7sIQoHNhUT2Li4LP | |
wmAiZnoXQcBIVn0dG9OKXY8sAU9naavOrqhWorDtpY9W3Chg9O/yBiu4jSO1YZK5 | |
YkXLlHs/gF3qbZPXR2JYq+2IjxY3r2TXkoVT3HWgy4vymr/KLoK9tQ0DbAn9dGil | |
UufXKsbE72x8/JECPo3jIBm+drEegeSf6tRgQPpQ0vMMZtwLRqJm1UHwqOnqg4xi | |
8Mypnz5ocDLYp7DJEBoNvAJ1033vwA3yK0GQnRIrfaupFR8tcw+hDQC7rpVtlqus | |
I1qcOc+NLfUQbkz+dcQ3avRqkNEyOfNNLjuxABEBAAG0H0p1c3RpbiBNYXp6aSA8 | |
aGhAbWFpbGhlaXN0LmNvbT6JAYcEEAECAHEFAki1vrYwFIAAAAAAIAAHcHJlZmVy | |
cmVkLWVtYWlsLWVuY29kaW5nQHBncC5jb21wZ3BtaW1lBwsJCAcDAgoCGQEZGGxk |
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
rsync -aPH -e "ssh" --rsync-path="sudo rsync" ubuntu@server:/remote_path /local_path |
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
(*.ics AND has:attachment AND ("(GMT" OR "Invitation:")) |
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
<?php | |
/** | |
* Run with `wp --require=import-cache.php import ... | |
*/ | |
WP_CLI::add_hook( 'after_wp_load', function(){ | |
// Only intercept HTTP requests when the importer is running | |
if ( ! defined( 'WP_IMPORTING') || ! WP_IMPORTING ) { | |
return; |
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
setw -g mode-keys vi | |
# Tmux conf file to use on OSX machines to get copy and past to work properly | |
set -g default-command "reattach-to-user-namespace -l zsh" | |
# OSX Copy mode | |
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
bind h select-pane -L | |
bind j select-pane -D |
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 'active_support/all' | |
class Rails | |
def self.logger=(logger) | |
@logger = logger | |
end | |
def self.logger | |
@logger | |
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
require 'active_support/concern' | |
require 'active_support/core_ext/array/extract_options' | |
module CryptKeeper | |
module Model | |
class WithoutEncrypted | |
def initialize(collection) | |
@collection = collection | |
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
non_boundary = boundary(this_query_char) do |index,score| | |
if index && score | |
this_score = index + 1 | |
this_score + score | |
end | |
end | |
if non_boundary | |
boundary = boundary(/\b#{this_query_char}/) do |index, score| |
NewerOlder