Skip to content

Instantly share code, notes, and snippets.

On Gitlab -

Sébastien Feugère smonff

On Gitlab -
Block or report user

Report or block smonff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9851736
; mmm-mode config for Mojolicious::Lite perl file.
; mmm-mode lib is from here:
; font locks of [c]perl-mode and mmm-mode conflict each other.
(add-to-list 'load-path "~/.emacs.d/packages/mmm-mode")
(require 'mmm-auto)
(require 'mmm-compat)
(require 'mmm-vars)
smonff / .emacs
Created Sep 7, 2014
Gain sudo privileges in Emacs without launch it as sudo
View .emacs
;; 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
View gist:1b85681105d49ad5e310
<span class="separator">&nbsp;</span>
smonff /
Created Nov 20, 2012
Generate a hundred UUID.
use strict;
use warnings;
use feature(qw/say/);
use Data::UUID;
my $ug = new Data::UUID;
my $idx = 0;
my $uuid;
my $unik;
View ubuntu-configure-sendmail-with-gmail
function install_postfix() {
echo | sudo debconf-set-selections <<__EOF
postfix postfix/root_address string
postfix postfix/rfc1035_violation boolean false
postfix postfix/mydomain_warning boolean
postfix postfix/mynetworks string [::ffff:]/104 [::1]/128
smonff / gettext
Created Sep 3, 2013
The command line for pot files generation
View gettext --verbose --directory=mon/directory --directory=mon/autre/directory --output=la/bas/out.pot
smonff / jsbin.UkIFuRi.css
Last active Dec 24, 2015
Search a textarea for a mail address and disable the sform submission button if found
View jsbin.UkIFuRi.css
input {
height: 50px;
width: 90%;
#message {
color: red;
View smartphone.poetry
smartphone poetry
not for books, made by me
available for you
as an open work
you should add your own
smonff / cold_art.poetry
Created Nov 24, 2013
another thought about art
View cold_art.poetry
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
smonff /
Created Jan 17, 2014
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
You can’t perform that action at this time.