Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Juan Julián Merelo Guervós JJ

🏠
Working from home
View GitHub Profile
@JJ
JJ / perl-modules-travis-ubuntu.md
Last active May 8, 2021
Perl modules installed in the Travis default runner
View perl-modules-travis-ubuntu.md
@JJ
JJ / perl-modules-github-actions-ubuntu-runner.md
Created Jan 8, 2021
List of Perl modules installed in the Github action runner
View perl-modules-github-actions-ubuntu-runner.md

Here's the list of modules installed in the Ubuntu runner for Github actions. They've been obtained using a script that list all modules installed

Module
AnyDBM_File
App::Cpan
App::Prove::State::Result::Test
App::Prove::State::Result
App::Prove::State
App::Prove
@JJ
JJ / gist:e4ef3ed2dc31bdbfe2275998fc148b96
Last active May 8, 2021
List of Perl modules installed in the Docker Hub hook runner
View gist:e4ef3ed2dc31bdbfe2275998fc148b96

List of Perl modules

It's been obtained by running cpan -l on the Docker Hub runner

Module Version
Algorithm::Diff 1.1903
Algorithm::Diff::XS 0.04
Algorithm::DiffOld 1.1
Algorithm::Merge 0.08
@JJ
JJ / threaded-primes.p6
Created Jul 31, 2020
Using threads to compute primes in an interval
View threaded-primes.p6
#!/usr/bin/env raku
constant $interval = 100000;
my @threads = (^10).map: -> $i {
Thread.start(
name => "Checking primes from {$i * $interval } to { ($i+1)*$interval}",
sub {
for ($i * $interval)..^(($i+1)*$interval) -> $n {
next if ( $n %% 2 ) | ( $n %% 3 ) | ($n %% 5 );
@JJ
JJ / PAS-UGR-Linux.md
Last active Mar 16, 2020
Conexión PAS UGR desde Linux
View PAS-UGR-Linux.md

La seguridad es lo primero

Recuerda que tienes que tratar el ordenador con el que estés trabajando con ficheros de la UGR como si fuera tu ordenador de la propia UGR. No trabajes nunca en un usuario compartido, usa tu propio usuario y no compartas la contraseña. Los ficheros especialmente sensibles deberán estar protegidos contra lectura de cualquier otro usuario. Cierra tu escritorio siempre que te ausentes.

Ahora, a trabajar en Linux.

Aparentemente, la UGR no ha considerado necesario dar instrucciones para que el PAS se conecte al escritorio remoto desde Linux, sólo para sistemas operativos privativos. Además, se usa un programa privativo, sólo para Windows y con licencias restrictivas, que hace que la única forma de usarlo sea mediante escritorio remoto a un ordenador en la UGR.

A ver si esto sirve de lección para las universidades. Aunque lo dudo.

@JJ
JJ / rakudo-star-github-action.yml
Created Dec 5, 2019
Installing Rakudo Star in a GitHub Action
View rakudo-star-github-action.yml
name: "We 🎔 Raku"
on: [push, pull_request]
jobs:
test:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2-beta
- name: Install and update
@JJ
JJ / raku-test.Dockerfile
Created Dec 5, 2019
Raku Dockerfile for Container Action
View raku-test.Dockerfile
FROM jjmerelo/alpine-perl6:latest
LABEL version="4.0.2" maintainer="JJ Merelo <jjmerelo@GMail.com>"
# Set up dirs
ENV PATH="/root/.rakudobrew/versions/moar-2019.11/install/bin:/root/.rakudobrew/versions/moar-2019.11/install/share/perl6/site/bin:/root/.rakudobrew/bin:${PATH}"
RUN mkdir /test
VOLUME /test
WORKDIR /test
@JJ
JJ / 00-regex.p6
Created Dec 5, 2019
Simple Raku test using the Test library
View 00-regex.p6
#!/usr/bin/env perl6
use v6;
use Test;
constant $greeting = "Merry Xmas!";
constant $non-greeting = "Hey!";
is( greet( "Hey", $greeting, $non-greeting), $non-greeting, "Non-seasonal salutation OK");
is( greet( "Merry Xmas!", $greeting, $non-greeting), $greeting, "Seasonal salutation OK");
done-testing;
@JJ
JJ / raku-github-action-CI.yaml
Created Dec 5, 2019
GitHub action for continuous integration using the Raku container.
View raku-github-action-CI.yaml
name: "We 🎔 Ubuntu, Docker and Raku"
on: [push, pull_request]
jobs:
adventest:
runs-on: ubuntu-latest
name: AdvenTest
steps:
- name: Checkout
uses: actions/checkout@v1
@JJ
JJ / windows-perl-comment-github-action.yml
Created Dec 5, 2019
GitHub action that uses Perl in Windows with Powershell. This creates a comment when certain words are mentioned in an issue.
View windows-perl-comment-github-action.yml
name: "We 🎔 Perl"
on:
issues:
types: [opened, edited, milestoned]
jobs:
seasonal_greetings:
runs-on: windows-latest
steps:
- name: Checkout