Giter VIP home page Giter VIP logo

perlprojects's People

Contributors

deoxal avatar terminalforlife avatar zn3x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sonick13 deoxal zn3x

perlprojects's Issues

YouTube videos missing

Hi TFL

So I started watching some video this weekend and love your contents. Started to looking at your code to learn more but all of your videos are gone?. Hope all is ok, have you moved to a new platform? Your stuff is really great and appreciate the content and comments of your knowledge. Again hope all is well with you. Wish you had a way to be contacted

i cant install TFL

i cant found TFL
i try cpan TFL and many ways but i cant install it
some help will be great

Wrong UbuChk Bash Completions (solution)

Sorry, I keep forgetting to fix that damn Bash completion script. Here's a quick fix if you've already got it installed, either via the Deb package or using something like Cito:

sudo sed -i 's/rmne/ubuchk/g' /usr/share/bash-completion/completions/ubuchk

It of course assumes the default location, and that you have sudo(8) installed. You may have to restart your shell session in order for it to be re-read.

The completion is a bit buggy anyway. I thought I'd fixed it, but I must have overwritten the changes I made on my laptop, by mistake. Hopefully in the next update we'll finally have it working properly.

YT Deleted?

Sorry but I couldn't find any other platform to reach you, I was trying to loof for your vids (adventOfCode in shell) and couldn't find em, turns out your channel disappeared from yt? Would appreciate any update

(issue) dayborn

This is perl 5, version 34, subversion 0 (v5.34.0) built for x86_64-linux-thread-multi

code in file

#------------------------------------------------------------------------------
# Path         - /usr/bin/editbash
# GitHub       - https://github.com/The-Repo-Club/
# Author       - The-Repo-Club [[email protected]]
# Start On     - Sat 30 Oct 15:00:06 BST 2021
# Modified On  - Sun 31 Oct 01:01:56 BST 2021
#------------------------------------------------------------------------------

code im using

#!/usr/bin/env perl
#cito M:755 O:0 G:0 T:/usr/bin/dayborn
#------------------------------------------------------------------------------
# Project Name      - PerlProjects/source/dayborn
# Started On        - Mon 10 Feb 23:49:15 GMT 2020
# Last Change       - Mon  1 Feb 01:44:26 GMT 2021
# Author E-Mail     - [email protected]
# Author GitHub     - https://github.com/terminalforlife
#------------------------------------------------------------------------------
# This project was originally called Iteration. The aim was to generate a more
# traditional version number from the delta of the two timestamps, the time the
# project was born, and the time of the last change made.
#
# In the end, it wound up being a nifty little program which simply outputs how
# many days it has been since the project was born, hence the name.
#
# Dependencies:
#
#   perl (>= 5.22.1-9)
#------------------------------------------------------------------------------

require Date::Format;
require Time::Piece;

use v5.22.1;
use strict;
use warnings;
use autodie;
use Date::Format 'time2str';
use Time::Piece;

no warnings 'uninitialized';

my $CurVer = '2021-02-01';
my $Progrm = 'dayborn';

sub Usage{
	print(qq{Usage: $Progrm [OPTS] [FILE]

		  -h, --help               - Display this help information.
		  -v, --version            - Output the version datestamp.
	} =~ tr/\t//dr)
}

while (defined($ARGV[0])){
	if ($ARGV[0] =~ '^(--help|-h|-\?)$'){
		Usage(1); exit(0)
	}elsif ($ARGV[0] =~ '^(--version|-v)$'){
		print("$CurVer\n"); exit(0)
	}elsif ($ARGV[0] =~ '^-'){
		die("Incorrect option(s) specified")
	}else{
		last
	}

	shift()
}

scalar(@ARGV) == 1 or die("File name required");
scalar(@ARGV) > 1 and die("Only one file at a time is valid");

-f $ARGV[0] or die("File '$ARGV[0]' not found");
-r $ARGV[0] or die("File '$ARGV[0]' unreadable");
-B $ARGV[0] and die("File '$ARGV[0]' is binary");

open(my $FH, '<', $ARGV[0]);

my ($Start, $Now);
while (<$FH>){
	/^# (Started|Modified) / or next;

	chomp(my @Arr = split(' '));

	# The following format (sans quotes) is expected:
	#
	#   '# Started On        - Mon 10 Feb 23:49:15 GMT 2020'
	#
	if ($Arr[1] eq 'Started') {
		$Start = Time::Piece->strptime(
			join(' ', @Arr[4,6,5,7,9]), '%a %b %d %T %Z %Y'
		)->epoch()
	}

	# The following format (sans quotes) is expected:
	#
	#   '# Modified On       - Tue 11 Feb 01:00:34 GMT 2020'
	#
	if ($Arr[1] eq 'Modified') {
		$Now = Time::Piece->strptime(
			join(' ', @Arr[4,6,5,7,9]), '%a %b %d %T %Z %Y'
		)->epoch()
	}
}

close($FH);

my $Project = ($ARGV[0] =~ m{(?:.*/)?([^/].*)})[0];
my $DeltaDay = ($Now - $Start) / 60 / 60 / 24;

printf("Project '%s' was born %.2f day's ago.\n", $Project, $DeltaDay)

output i get

Project 'editbash' was born 18931.04 day's ago.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.