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
#!/bin/sh | |
# | |
# ABSTRACT: use 'ls | grep' to find your particular hackerrank's task solution) | |
### MAIN ### | |
# | |
# URLs found in curl(1) output can be used as a reference to seek for a particular task to solve as files' names are quite descriptive | |
curl 'https://www.blogger.com/feeds/8068649101764775888/posts/default?max-results=500' \ | |
| perl -Mstrict -nwE 'say join "\n" => m{href='"'"'(https://programs.programmingoneonone.com[^'"'"']*\.html)'"'"'}g;' \ | |
| wget -i - |
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
// ABSTRACT: find route or single short diagonal route | |
// Returns 2d-array filled with falses | |
function getArrOfFalses( arr ){ | |
let rv = [] | |
arr.forEach( ( row, i ) => { | |
let rowRv = [] | |
row.forEach( ( col, j ) => { | |
rowRv.push( false ) |
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
$ mkdir test00 && cd test00 | |
$ git init && dd if=/dev/random bs=1m count=1 > test00.txt && git add test00.txt && git commit -a -m init | |
Initialized empty Git repository in /tmp/test01/test00/.git/ | |
1+0 records in | |
1+0 records out | |
1048576 bytes transferred in 0.072885 secs (14386712 bytes/sec) | |
[master (root-commit) 4a45d69] init | |
1 files changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 test00.txt | |
$ dd if=/dev/random bs=1m count=1 >> test00.txt && git commit -a -m 'commit 00' |
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
$ rm -rf .git test00.txt [2/69] | |
$ dd if=/dev/random bs=1m count=1 >> test00.txt | |
1+0 records in | |
1+0 records out | |
1048576 bytes transferred in 0.070135 secs (14950799 bytes/sec) | |
$ ls -l | |
total 1032 | |
-rw-r--r-- 1 meme wheel 1048576 13 ноя 18:38 test00.txt | |
$ git init | |
Initialized empty Git repository in /tmp/test00/.git/ |
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
--- showdependencygraph.cgi.orig | |
+++ showdependencygraph.cgi | |
@@ -269,6 +269,8 @@ | |
print $pngfh $_ while <DOT>; | |
close DOT; | |
close $pngfh; | |
+ | |
+ chmod( 0644, $pngfilename ) or die $!; | |
# On Windows $pngfilename will contain \ instead of / |
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
1..15 | |
ok 1 | |
ok 2 | |
ok 3 - testing quoting of utf 8 string | |
ok 4 - testing quoting of blob | |
ok 5 - INSERT query INSERT INTO t1 (name, bincol, shape, binutf) | |
# VALUES (?,?, GeomFromText('Point(132865 501937)'), ?) | |
# | |
# | |
ok 6 |
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
1..15 | |
ok 1 | |
ok 2 | |
ok 3 - testing quoting of utf 8 string | |
ok 4 - testing quoting of blob | |
ok 5 - INSERT query INSERT INTO t1 (name, bincol, shape, binutf) | |
# VALUES (?,?, GeomFromText('Point(132865 501937)'), ?) | |
# | |
# | |
ok 6 |
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
--- bugzilla.orig/createaccount.cgi 2010-01-09 20:41:47.727879656 +0400 | |
+++ bugzilla/createaccount.cgi 2010-01-16 15:27:08.947848543 +0400 | |
@@ -47,6 +47,10 @@ | |
$vars->{'doc_section'} = 'myaccount.html'; | |
+my $captcha_cookie = $cgi->cookie( 'Captcha_cookie' ); | |
+unless( length $captcha_cookie ){ $captcha_cookie = generate_random_password; } | |
+$cgi->send_cookie( -name => 'Captcha_cookie', -value => $captcha_cookie, ); | |
+ |
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/perl | |
package main; | |
use strict; | |
use warnings; | |
use POSIX qw/setsid/; | |
use Readonly; |
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
perl -Mstrict -MFile::Find -MConvert::Cyrillic -MFile::Copy -MFile::Basename -we 'my @names = (); find sub{ push @names, $File::Find::name }, "Ноль"; map { my $newname = dirname( $_ ). "/". Convert::Cyrillic::cstocs( "WIN", "UTF8", basename $_ ); print $newname, "\n"; File::Copy::mv( $_, $newname ) or die $!; } reverse @names; ' |
NewerOlder