Skip to content

Instantly share code, notes, and snippets.

View mathieu-aubin's full-sized avatar
💭
blop!

Mathieu Aubin mathieu-aubin

💭
blop!
  • Montreal, Quebec, Canada
View GitHub Profile
@mathieu-aubin
mathieu-aubin / com.vsubhash.bash.twitter-to-pdf.txt
Created February 9, 2022 00:43 — forked from vsubhash/com.vsubhash.bash.twitter-to-pdf.txt
com.vsubhash.bash.twitter-to-pdf.txt is a Unix/Linux shell script for saving all messages posted by a Twitter account as an archive in PDF format.
if [ $# -lt 2 ]; then
echo -e "The format is:\n\t\e[35m`basename $0` \e[35;1mtwitter-handle-or-hashtag number-of-tweets [nojs]\e[0m"
exit
fi
# A backup of all files will be available in this Logs directory
if [ ! -d ~/Logs ]; then
mkdir ~/Logs
fi
cd ~/Logs

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
@mathieu-aubin
mathieu-aubin / play.html
Last active December 19, 2019 02:31 — forked from hzlzh/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 / lowsrc.js
Created June 11, 2017 03:46 — forked from takien/lowsrc.js
Alternate to lowsrc. usage: <img src="lowres.jpg" data-src="highres.jpg" />
/**
* 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 / redir.sh
Created November 13, 2016 18:43 — forked from digitalresistor/redir.sh
Simple script that prints a list of redirects, and what the final HTTP result was...
function count_redir {
curl -L -I -D - -o /dev/null $1 | awk 'BEGIN { redir = 0; status = 200; } tolower($1) ~ /http/ { redir=redir+1; status=$2 } tolower($1) ~ /location:/ { print redir, status, $2 } END { print "Completed, with ", redir-1, "redirects. Final result: ", status }'
}

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@mathieu-aubin
mathieu-aubin / wp.sh
Created March 19, 2016 20:55 — forked from phlbnks/wp.sh
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Do you need to setup new MySQL database? (y/n)"
read -e setupmysql
if [ "$setupmysql" == y ] ; then
echo "MySQL Admin User: "
read -e mysqluser
@mathieu-aubin
mathieu-aubin / ytdID.min.js
Last active March 11, 2016 21:34 — forked from takien/youtubeID.js
Get YouTube ID from various YouTube URL using JavaScript
// src: takien (http://takien.com) mods: Mathieu Aubin (mathieu@zeroserieux.com)
function ytdID(url){var ID='';url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);if(url[2]!==undefined){ID = url[2].split(/[^0-9a-z_\-]/i);ID = ID[0];}else {ID = url;}return ID;}
@mathieu-aubin
mathieu-aubin / svg.bash
Created January 22, 2016 00:48 — forked from peteboere/svg.bash
Utilities for working with svgs
#
# Utilities for working with svgs
#
# svg2png - Create png file from source svg using inkscape
# svg2pngr - Create png file from source svg using inkscape recursively
# svgz - Create svgz file from source svg
# svgzr - Create svgz file from source svg recursively
#
@mathieu-aubin
mathieu-aubin / digitalocean-proxy.sh
Created December 10, 2015 06:24 — forked from haf/LICENSE
Setting up a digitalocean proxy
#!/usr/bin/env bash
# How to start:
# 1. Sign up for DigitalOcean with this link https://www.digitalocean.com/?refcode=7bf219507e61
# -- it will be filled with $10 to start out (if you use the above link)
# 2. Go to https://cloud.digitalocean.com/settings/applications and find you API key
# 3. In your shell, run 'export DIGITALOCEAN_TOKEN="INSERT TOKEN HERE"', without the outer quotes.
# 4. `brew install jq`
# 5. `./digitalocean-proxy`
# 6. When you are done, press CTRL+C ONCE, and everything will be cleaned up.