Skip to content

Instantly share code, notes, and snippets.

View luckyshot's full-sized avatar
🌍
xaviesteve.com

Xavi Esteve luckyshot

🌍
xaviesteve.com
View GitHub Profile
@luckyshot
luckyshot / CleanUpGmail.gs
Last active May 18, 2024 07:17 — forked from alimbada/CleanUpGmail.gs
Google Apps Script for cleaning up Gmail
/**
* Scripts: https://script.google.com/u/0/home/my
* Triggers: https://script.google.com/u/0/home/triggers
*/
function cleanUpGmail() {
var queries = [
'from:(noreply@steampowered.com) in:inbox subject:(from your Steam wishlist on sale) older_than:7d',
'from:(no-reply@twitch.tv) in:inbox subject:(is live) older_than:1d',
'from:ebay.com subject:("is live!" OR "has been relisted") older_than:7d',
// Security alerts
@luckyshot
luckyshot / lemon_mysql.php
Last active October 10, 2019 18:29 — forked from AngeloR/lemon_mysql.php
A tiny function to interact with a MySQL database, can be used as a standalone PHP function or inside Limonade-php framework. Returns data in a multi-dimensional associative array. When working with Limonade-php a full-fledged MySQL wrapper seems like overkill. This method instead accepts any mysql statement and if it works returns either the re…
<?php
/**
* A quick little function to interact with a MySQL database.
* Updated by Xavi Esteve to use mysqli, original by AngeloR (https://gist.github.com/AngeloR/919695)
*
* When working with Limonade-php a full-fledged MySQL wrapper seems like
* overkill. This method instead accepts any mysql statement and if it works
* returns either the result or the number of rows affected. If neither worked,
* then it returns false
*