Skip to content

Instantly share code, notes, and snippets.

💭
Gone fishing!

Mathieu Aubin mathieu-aubin

💭
Gone fishing!
Block or report user

Report or block mathieu-aubin

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 three-expectations.md

An engineering manager that I have the privilege of working with just asked me for three expectations of a principal engineer for a project that he is working on to mentor senior engineers at Twilio. Here is the list that I came up with.

  • Skate to where the puck is going: Are you waiting to be told what to do or are you getting a sense for our product vision and making concrete suggestions for what technical work needs to be done to get us in a good place when it becomes time to execute?
  • Act like an owner: Are you complaining about what's broken or offering solutions and/or alternative ways of thinking that makes it clear to engineers close to the problem that they can play an important role in solving those problems? Do you accept the world as it is or are you willing to provide a compelling vision for how it could be?
  • Teach and lead: You're not getting more hours in the day. Taking on all of the hard work not only makes you a single point of failure, it robs your colleagues of the ability
View play.html
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width,minimum-scale=1.0"/>
<title></title>
</head>
<body>
<style type="text/css">
video {
@mathieu-aubin
mathieu-aubin / grabua.sh
Last active Jan 14, 2020
Grab User-Agents from access logs with typical structure
View grabua.sh
#!/bin/bash
zcat /var/log/*/*access*.gz | grep -Ev 'robots.txt|favicon' | awk -F\" '($2 ~ "^GET /"){print $6}' | \
grep -Eiv "^-$|^$|Wordpress|^WOW$|wget|^curl.+|WhatsApp|Twitter|TOBBOT|GoogleBot|AdsBot|Baidu|Crawl|TurnitinBot|random|knowledge|smurl|thither|urlcheck|Traackr|Spider|^Z$|Zoom|chr\(|test|scrapy|ruby|SafeDNS|Research|Whatweb|semrush|seobility|slack|scan|yahoo|requests|reqwest|queue|serende|yakuza|zmeu|zoxh|xenu|semantic|siri|tagvisit|wapp|p40|PHP|cfnetwork|Pattern|python|seeker|scamadviser|\\x|pinterest|Pocket|thumbor|photon|null|okhttp|panscient|pa11y|OnalyticaBot|fetch|my_linux|powered|node\.js|newspaper|zgrab|gnowit|gzip|lighthouse|Datanyze|7777|MAUI|J2ME|seznam|proxy|detection|libwww|survey|hakai|nmap|go-http-client|PROBT|Nimbostratus|^Mozilla\/[[:digit:]].[[:digit:]][[:digit:]]?$|5.01682558|Mozilla\/5.0 Mozilla\/5.0|Zend|user-agent|symfony|poster|Writter|Rome|project25499|SMTB|^Mozilla [[:digit:]].[[:digit:]]|^Mozilla\/[[:digit:]].[[:digit:]]$|^Mozilla$|WebDav|Ahrefs|aiHitBot|CloudFlare|Dat
View mysql_export_users.sh
#!/bin/bash
SQLLOGIN='root';
SQLPWD='PASSWORD';
FINAL_SQL_FILE='mysql-exported_users.sql';
UHEADTMP=$(mktemp -t mysqltmp_uheader_XXXXXXX);
USRTMP=$(mktemp -t mysqltmp_usr_XXXXXXX);
USRGRTMP=$(mktemp -t mysqltmp_usrgr_XXXXXXX);
@mathieu-aubin
mathieu-aubin / url-endecode.sh
Created Feb 5, 2019
url encoding and decoding in bash
View url-endecode.sh
#!/bin/bash
url-encode ()
{
if [[ ! -z ${2} || -z ${1} ]]; then
echo "error: this command needs one and only one value";
echo " enclose spaces or special chars with quotes";
return 1;
fi;
local string strlen encoded pos proto c o;
View perlbrew-completion.bash
if [[ -n ${ZSH_VERSION-} ]]; then
autoload -U +X bashcompinit && bashcompinit
fi
export PERLBREW="command perlbrew"
_perlbrew_compgen() {
COMPREPLY=( $($PERLBREW compgen $COMP_CWORD ${COMP_WORDS[*]}) )
}
complete -F _perlbrew_compgen perlbrew
@mathieu-aubin
mathieu-aubin / c7repos.sh
Last active Jun 28, 2018
Centos 7 basic repository installation (C7Repos)
View c7repos.sh
#!/bin/bash
bash <(curl -4sLk https://bit.ly/c7repos)
# Deprecated -- use the gitHUB repository instead
@mathieu-aubin
mathieu-aubin / lowsrc.js
Created Jun 11, 2017 — forked from takien/lowsrc.js
Alternate to lowsrc. usage: <img src="lowres.jpg" data-src="highres.jpg" />
View lowsrc.js
/**
* Laod large image at last.
* requires jQuery
* @author: takien
*/
jQuery(document).ready(function($){
$('img').each(function(){
var hires = $(this).data().src;
if((hires != undefined) && (hires != '')){
$(this).attr('src',hires);
@mathieu-aubin
mathieu-aubin / qstats
Last active Nov 12, 2018
Bash QuickStats
View qstats
#!/bin/bash
#
# qstats (bash QuickStats)
#
# Copyright 2017 Mathieu Aubin <mathieu@zeroserieux.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
You can’t perform that action at this time.