Skip to content

Instantly share code, notes, and snippets.

View smonff's full-sized avatar

Sébastien Feugère smonff

View GitHub Profile
smonff /
Last active July 23, 2022 07:49
Natural language example
my $is_easy_to_read = $self->evaluate_readability( $pattern );
$self->explain_meaning unless $is_easy_to_read;
smonff /
Last active July 21, 2021 13:55
/proc/mounts to JSON with perlcore only
use strict;
use warnings;
use diagnostics;
use JSON::PP;
my @only = qw(ext4);
my @mounts = ();
smonff /
Created April 1, 2019 21:18

Keybase proof

I hereby claim:

  • I am smonff on github.
  • I am smonff ( on keybase.
  • I have a public key ASCQT5EfYHLpLVAS9P_jYpAIuCVpdfyBrMfAoUKsk5s1Xgo

To claim this, I am signing this object:

smonff /
Created January 23, 2017 17:49 — forked from Adirael/
Fix wordpress file permissions
# This script configures WordPress file permissions based on recommendations
# from
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
smonff /
Last active April 1, 2016 13:10 — forked from dougireton/
I've started responding to recruiters with this list of requirements

Company Requirements

I'm definitely not looking for work. However to provide some helpful guidance for hiring like-minded engineers, I would only consider working for a company if it met these requirements:

  1. Concrete, measurable plan to increase the number of women and minorities in engineering roles.
  2. I would only be willing to interview if there were women/minorities in the interview pool for this position.
  3. Commitment to using and contributing to open source.
  4. Collaborative, friendly atmosphere where pair programming is encouraged.
  5. Meaningful work with clear linkage between work and company goals.
  6. Demonstrated commitment to ethical business practices, e.g. B corp certification.
<span class="separator">&nbsp;</span>
smonff / .emacs
Created September 7, 2014 19:10
Gain sudo privileges in Emacs without launch it as sudo
;; Makes possible to sudo-edit files
;; From Damien Cassou
(defun sudo ()
(let ((fname (or buffer-file-name
(when fname
(if (string-match "^/sudo:root@localhost:" fname)
(setq fname (replace-regexp-in-strin
smonff / gist:9851736
Last active January 12, 2021 13:38 — forked from am0c/gist:3803249
; mmm-mode config for Mojolicious::Lite perl file.
; Forked from
; mmm-mode lib is from here:
; font locks of [c]perl-mode and mmm-mode conflict each other.
(require 'mmm-auto)
(require 'mmm-compat)
(require 'mmm-vars)
smonff /
Created January 17, 2014 02:37
An excerpt from chromatic's Modern Perl book about clean regexes
# The /x modifier allows you to embed additional whitespace and comments within patterns.
# With this modifier in effect, the regex engine ignores whitespace and comments.
# The results are often much more readable.
# This regex isn't simple, but comments and whitespace improve its readability.
# Even if you compose regexes together from compiled fragments, the /x modifier
# can still improve your code.
my $attr_re = qr{
\A # start of line
smonff / cold_art.poetry
Created November 24, 2013 22:54
another thought about art
this is not a haiku
this is not code
you won't need to have feelings
it's much more conceptual
it' not about love