Skip to content

Instantly share code, notes, and snippets.

View smonff's full-sized avatar

Sébastien Feugère smonff

View GitHub Profile
@smonff
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
;; https://github.com/renard/dired-toggle-sudo/issues/1
(defun sudo ()
(interactive)
(let ((fname (or buffer-file-name
dired-directory)))
(when fname
(if (string-match "^/sudo:root@localhost:" fname)
(setq fname (replace-regexp-in-strin
<span class="separator">&nbsp;</span>
@smonff
smonff / unique_uuid.pl
Created November 20, 2012 16:15
Generate a hundred UUID.
#!usr/bin/perl
use strict;
use warnings;
use feature(qw/say/);
use Data::UUID;
my $ug = new Data::UUID;
my $idx = 0;
my $uuid;
my $unik;
@smonff
smonff / ubuntu-configure-sendmail-with-gmail
Created November 28, 2012 20:10 — forked from sshtmc/ubuntu-configure-sendmail-with-gmail
Ubuntu sendmail using smtp.gmail.com
#!/bin/bash
HOST=$(hostname)
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 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
@smonff
smonff / gettext
Created September 3, 2013 15:16
The command line for pot files generation
xgettext.pl --verbose --directory=mon/directory --directory=mon/autre/directory --output=la/bas/out.pot
@smonff
smonff / jsbin.UkIFuRi.css
Last active December 24, 2015 11:59
Search a textarea for a mail address and disable the sform submission button if found
input {
height: 50px;
width: 90%;
}
#message {
color: red;
}
@smonff
smonff / smartphone.poetry
Created November 24, 2013 22:08
smartphone poetry
smartphone poetry
not for books, made by me
available for you
as an open work
you should add your own
@smonff
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
@smonff
smonff / clean-regex.pl
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
smonff / recruiter_response.md
Last active April 1, 2016 13:10 — forked from dougireton/recruiter_response.md
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.