Skip to content

Instantly share code, notes, and snippets.

View egguy's full-sized avatar

Etienne G. egguy

  • DPM Technologies
  • .au
  • 21:58 (UTC +10:00)
View GitHub Profile
@egguy
egguy / main.cpp
Created October 5, 2021 23:12
Wemos® TTGO WiFi + Batterie Bluetooth ESP32 with ADAFruit SSD1306
/**************************************************************************
This is an example for our Monochrome OLEDs based on SSD1306 drivers
Pick one up today in the adafruit shop!
------> http://www.adafruit.com/category/63_98
This example is for a 128x64 pixel display using I2C to communicate
3 pins are required to interface (two I2C and one reset).
Adafruit invests time and resources providing this open
@egguy
egguy / Configuration.h
Last active May 2, 2020 14:58
CTC Y3230 / Prusa i3 Clone / ANET A10 clone (no SD card support)
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* 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 3 of the License, or
@egguy
egguy / toornament_extractor.php
Created March 26, 2018 09:31
Extract toornament participant list - POC
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://www.toornament.com/tournaments/1298026881086267392/participants/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$return = curl_exec($curl);
curl_close($curl);
$dom = new DOMDocument;
#!/usr/bin/python
# -*- coding: utf-8 -*-
import requests
import time
import sys
ua = 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1'
referer = 'http://www.lequipe.fr/Tennis/Directs'
@egguy
egguy / build-openresty.sh
Created May 27, 2013 16:06
Script adapted from the post: http://brian.akins.org/blog/2013/03/19/building-openresty-on-ubuntu/. Used to create openresty for my vagrant environnement under debian.
#!/bin/sh
OPENRESTY_VERSION="1.2.7.8"
INSTALL=/tmp/openresty
mkdir -p ${INSTALL}/var/lib/nginx
install -m 0555 -D nginx.init ${INSTALL}/etc/init.d/nginx
install -m 0555 -D nginx.logrotate ${INSTALL}/etc/logrotate.d/nginx
sudo apt-get -y install make ruby1.9.1 ruby1.9.1-dev git-core \
libpcre3-dev libxslt1-dev libgd2-xpm-dev libgeoip-dev unzip zip build-essential
@egguy
egguy / mongo_db_recover_delete_record.py
Created May 25, 2012 16:04
Recover deleted data from mongo DB database
"""A little script to recover deleted recording of a mongoDB db file
There's no optimization but it work and has saved me
"""
import struct
import bson
import pymongo
import sys