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 / dlpatent
Last active June 22, 2022 10:02
Download PDF patent files from https://patents.google.com using download url and description
#!/bin/bash
#
# Downloads patent files from patents.google.com as pdf
# Must provide 2 arguments which are.. (quotes encapsulated)
#
# File URL (pdf download link)
# Description or name of patent
#
# File will be saved as PATENT#_DESCRIPTION.pdf
#
@vncsna
vncsna / bash_strict_mode.md
Created June 6, 2021 01:59 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u

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
@goldyfruit
goldyfruit / zynpass.c
Created October 27, 2018 16:35
Zyxel firmware
/* ZyXEL prestige 660HW series password calculator by brainstorm
* Thanks to http://www.adslayuda.com/Zyxel650-9.html authors
*
* Example usage:
*
* Router:
* ======
*
* ATSE
* 0028D6DF1C03
@paivaric
paivaric / 1.google-analytics-proxy-nginx.conf
Last active January 30, 2024 17:21
Google Analytics Proxy using Nginx to bypass Adblock and other blockers
server {
listen 80;
server_name your.domain.com;
location = /analytics.js {
# you have to compile nginx with http://nginx.org/en/docs/http/ngx_http_sub_module.html (this is not default)
# and http://nginx.org/en/docs/http/ngx_http_proxy_module.html (it's a default module)
proxy_set_header Accept-Encoding "";
@mathieu-aubin
mathieu-aubin / c7repos.sh
Last active June 28, 2018 03:27
Centos 7 basic repository installation (C7Repos)
#!/bin/bash
bash <(curl -4sLk https://bit.ly/c7repos)
# Deprecated -- use the gitHUB repository instead
@adrianocalvitto
adrianocalvitto / wp-cli-export-woo-orders.txt
Last active December 7, 2022 03:33
Export All WooCommerce Orders via WP-CLI in a single .xml file
wp export --post__in=$(wp eval 'foreach( get_posts(array("post_type" => "shop_order", "posts_per_page" => -1, "fields" => "ids")) as $id ) { echo $id. ","; }') --max_file_size=200
@silverkorn
silverkorn / ffmpeg-nonfree-build-centos-7.sh
Last active February 24, 2022 21:31
An automated script to build FFmpeg non-free on RHEL/CentOS with as much features as possible. (Including mediainfo for debugging)
# TODO: Verify to link statically some dependencies usually not available in a default instllation of RHEL/CentOS (ex.: libxcb)
###################
## Configuration ##
###################
FFMPEG_CPU_COUNT=$(nproc)
FFMPEG_ENABLE="--enable-gpl --enable-version3 --enable-nonfree --enable-runtime-cpudetect --enable-gray --enable-openssl --enable-libfreetype"
FFMPEG_HOME=/usr/local/src/ffmpeg
@ishu3101
ishu3101 / gist_to_github_repo.md
Created November 24, 2015 08:35
Transfer a gist to a GitHub repository

Transfer a gist to a GitHub repository

clone the gist

git clone https://gist.github.com/ishu3101/6fb35afd237e42ef25f9

rename the directory

mv 6fb35afd237e42ef25f9 ConvertTo-Markdown

change the working directory to the newly renamed directory

cd ConvertTo-Markdown