Skip to content

Instantly share code, notes, and snippets.

View xlat's full-sized avatar

Nicolas Georges xlat

  • Nicolas Georges Service SARL
  • Tanger, Morroco
View GitHub Profile
@xlat
xlat / mojo-post-params.pl
Created May 27, 2015 06:27
Reproduce a matter of decoding parameter from a post query.
use utf8; #script encoded in utf8 without bom
use Mojolicious::Lite;
use Data::HexDump;
{
require Mojolicious;
say "perl $^V, Mojolicious: v", Mojolicious->VERSION, ", ", `chcp` ;
}
post '/' => sub{
my $self = shift;
use strict;
use warnings;
use feature qw(say);
=head1 FUNCTION send_mail( auth => 'server/auth/user/pwd', from => $from, to => $to, subject => $subject, $body => $body, header => \%header )
auth-type can be : PLAIN, LOGIN, CRAM-MD5, NTLM (and possibly others)
=cut
sub send_mail{
@xlat
xlat / impexp.vbe
Last active August 29, 2015 14:06
Import/Export Workbook as/from text files
Sub ExportWorkBook()
Dim sheet As Worksheet
Dim filename As String
Dim bookname As String
Dim path As String
Dim ls_data As String
Dim lastSheet As Worksheet
Dim lastRange As Range
Set lastSheet = ThisWorkbook.ActiveSheet
Set lastRange = ActiveCell