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 hidden or 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
| FROM debian:latest | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| build-essential \ | |
| wget \ | |
| python3 | |
| WORKDIR /build |
This file contains hidden or 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 should be triggered through a cron job at 6:15 PM on week days. | |
| # Example cron: 15 18 * * 1,2,3,4,5 cd ~/code/jury_duty && ~/.rbenv/shims/ruby call.rb >> ~/code/jury_duty/call-log.txt 2>&1 | |
| # It uses Twilio to make a call based on TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, and TWILIO_PHONE. | |
| # It calls the JURY_PHONE, transcribes it, looks for JURER_NUMBER and texts the result to PERSONAL_PHONE. | |
| require "rubygems" | |
| require "bundler/setup" | |
| Bundler.require(:default) | |
| Dotenv.load |
This file contains hidden or 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
| javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{ | |
| default: Turndown | |
| }, { | |
| default: Readability | |
| }]) => { | |
| /* Optional vault name */ | |
| const vault = ""; | |
| /* Optional folder name such as "Clippings/" */ |
This file contains hidden or 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 hidden or 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 'rubygems' | |
| require 'mechanize' | |
| FIRST_NAME = 'FIRST_NAME' | |
| LAST_NAME = 'LAST_NAME' | |
| PHONE = 'PHONE' | |
| EMAIL = '[email protected]' | |
| PARTY_SIZE = 2 | |
| SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' } |
This file contains hidden or 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
| ~ > node -e "console.log((0.1 + 0.2) + 0.3 == 0.1 + (0.2 + 0.3))" | |
| false | |
| ~ > php -r "var_dump((0.1 + 0.2) + 0.3 == 0.1 + (0.2 + 0.3));" | |
| bool(false) | |
| ~ > ruby -e "p (0.1 + 0.2) + 0.3 == 0.1 + (0.2 + 0.3)" | |
| false | |
| ~ > python -c "print (0.1 + 0.2) + 0.3 == 0.1 + (0.2 + 0.3)" |
This gist contains the nginx and tor configurations for the [mike.tig.as][mta] servers, mainly to show:
- Use of the
chris-lea/nginx-develPPA to allow use of SPDY. ssl_ciphersselection to mitigate BEAST attack, enable [perfect forward secrecy][pfs] if possible and select the strongest possible ciphers within those bounds. (Exception is made for several ciphers at the end of list, for compatibility reasons.)
RE: teampoltergeist/poltergeist#44
Use Rack::SimpleEndpoint to prevent Poltergeist/PhantomJS from crashing on TTF fonts.
In config/environments/test.rb, add
require 'rack/contrib/simple_endpoint'
config.middleware.insert_after Rack::Runtime, Rack::SimpleEndpoint, /\.ttf$/ do |req, res, match|
res.status = '403'
"I will not serve TTF fonts in test mode."
This file contains hidden or 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
| guake-helix() { | |
| # HelixCore | |
| guake --rename-tab="CoreSpec" --execute-command="cd /home/fabio/dev/site5/helix_core && bundle exec guard" && | |
| guake --new-tab=2 --rename-tab="Core" --execute-command="cd /home/fabio/dev/site5/helix_core" && | |
| # Helix | |
| guake --new-tab=3 --rename-tab="HelixServer" --execute-command="cd /home/fabio/dev/site5/helix && rails s" && | |
| guake --new-tab=4 --rename-tab="HelixSpec" --execute-command="cd /home/fabio/dev/site5/helix && bundle exec guard" && | |
| guake --new-tab=5 --rename-tab="Helix" --execute-command="cd /home/fabio/dev/site5/helix"; | |
| } |
NewerOlder
