Skip to content

Instantly share code, notes, and snippets.

testing gist

(defun gist-created-callback (gist)
(let ((location (oref gist :html-url)))
(message "Paste created: %s" location)
(when gist-view-gist
(browse-url location))
(kill-new location)))
use warnings;
use strict;
my $comp3 = 0x01234D;
my $dec = $comp3 >> 4;
$dec = sprintf "%x", $dec;
if($comp3 & 0xD) {
$dec *= -1;
} elsif(!$comp3 & 0xC) {
print "error!"
my $cat = $cat_rs->find(1);
$cat->config($config);
$cat->get_product(1);
sub config {
# ler config do disco aqui
}
sub get_product {
my($self, $sku) = @_;
use warnings;
use strict;
package Product;
use Moose;
has catalog => (
isa => 'Catalog',
is => 'ro',
required => 1,
handles => { is_discount_valid => 'validate_discount' }
LEFT JOIN %(partition) part ON
part.cust_num = oa.cust_num AND
part.cont_num = oa.cont_num AND
part.date = %(date)
WHERE
part.cust_num IS NULL
GROUP BY
oa.cust_num,
oa.cont_num
sub foo { print @_ }
sub bar { @_[ 0 .. @_ - 1 ] = qw(bar); goto &foo }
my @quux = "baz";
bar(@quux);
(add-to-list 'ec/path "~/perl5/bin")
(add-to-list 'ec/perl-inc "~/perl5/lib/perl5")
(setq cperl-highlight-variables-indiscriminately t)
(defalias 'perl-mode 'cperl-mode)
(require 'perltidy)
(global-set-key "\C-cpb" 'perltidy-buffer)
| col_id | col_nome |
|--------+----------|
| 1 | foo |
| 1 | bar |
...................................................................................................
...................................................................................................
.................................mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm......................
.........................mmmmmmmmmmmmmmmm..................................mmmmm...................
...................mmmmmmmmmmm..........mmmmm...............mm................mmm..................
.................mmmm............................................mm.............mmm................
..............mmmm....m..mmmmmm............mmm..............mm......m............mmm...............
............mmmm.................................................mm....m..........mmm..............
...........mmm............mmmmm....................m..........mmm...m....m.........mmm.............
..........mm...........m.........................m................mm...m....m.......mmm............