Skip to content

Instantly share code, notes, and snippets.

View JJ's full-sized avatar
🏠
Working from home

Juan Julián Merelo Guervós JJ

🏠
Working from home
View GitHub Profile
@JJ
JJ / rakudo-star-github-action.yml
Created December 5, 2019 15:40
Installing Rakudo Star in a GitHub Action
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 December 5, 2019 15:35
Raku Dockerfile for Container Action
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 December 5, 2019 15:32
Simple Raku test using the Test library
#!/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 December 5, 2019 15:31
GitHub action for continuous integration using the Raku container.
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 December 5, 2019 15:27
GitHub action that uses Perl in Windows with Powershell. This creates a comment when certain words are mentioned in an issue.
name: "We 🎔 Perl"
on:
issues:
types: [opened, edited, milestoned]
jobs:
seasonal_greetings:
runs-on: windows-latest
steps:
- name: Checkout
@JJ
JJ / using-steps.yaml
Last active December 5, 2019 17:14
Gist for the Raku Advent Calendar: using step results in GitHub actions
name: "One step up"
on: [push]
jobs:
seasonal_greetings:
runs-on: ubuntu-latest
steps:
- name: Pre-Merry Xmas!
env:
greeting: "Merry"
@JJ
JJ / hola.yaml
Created December 3, 2019 18:53
Raku advent calendar 2019 gists
name: "Merry Christmas"
on: [push]
jobs:
seasonal_greetings:
runs_on: ubuntu-latest
steps:
- name: Merry Xmas!
run: echo Merry Xmas!
@JJ
JJ / all.kids
Last active March 18, 2019 08:52 — forked from daotoad/all.kids
Getting to Know Perl6 From the Command Line: An Article for the 2018 Perl6 Advent Calendar
1234,Bobby Smith
1235,Rosa Felix
1236,Ramesh Patil
1245,Virginia Ryder
1356,Snively Witherspoon
1358,Burnedette Down
1366,Evelyn Tent
@JJ
JJ / santa.md
Created December 1, 2018 08:40
Advent Calendar Article (for formatting)

Like 6 Perls in a Pod: document everything

Christmas season was approaching, and Santa was in a gloomy mood. His inbox was full with letters from boys and girls coming from all over.

But.

Were they letter to Santa? Was the kid properly identified by signature, so that you sent the gifts to the proper person and not someone else who might

@JJ
JJ / compilingmath-statx.md
Created November 1, 2018 12:23
Compilation test for Mathx::Stat

Created this test file

use v6;
use Test;
use-ok 'Mathx::Stat::Probability';

Run with

perl6 -Ilib t/use.t