Skip to content

Instantly share code, notes, and snippets.

View jelitox's full-sized avatar

Javier León jelitox

View GitHub Profile
@jelitox
jelitox / batch-delete-gmail-emails.js
Created January 20, 2022 04:35 — forked from gene1wood/batch-delete-gmail-emails.js
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
/*
This script, when used with Google Apps Scripts will delete 400 emails and
can be triggered to run every few minutes without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Google returns a maximum of 500 threads. This limits to 400 threads in case 500
threads is causing timeouts
Configure the search query in the code below to match the type of emails
you want to delete
@jelitox
jelitox / delete_git_submodule.md
Created October 29, 2020 03:52 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@jelitox
jelitox / example.json
Created November 18, 2019 11:35 — forked from sevennineteen/example.json
Example using Jinja2 to populate a JSON payload template
{ "path": "/content/geometrixx/my-first-jinja-page",
"properties": [
{ "name": "jcr:primaryType",
"value": "cq:Page" }],
"nodes": [
{ "path": "jcr:content",
"properties": [
{ "name": "jcr:primaryType",
"value": "cq:PageContent"},
@jelitox
jelitox / README-español.md
Created January 14, 2018 04:13 — forked from Villanuevand/README-español.md
Una plantilla para hacer un buen README.md. Inspirado en el gist de @PurpleBooth => https://gist.github.com/PurpleBooth/109311bb0361f32d87a2

Título del Proyecto

Acá va un párrafo que describa lo que es el proyecto

Comenzando

Estas instrucciones te permitirán obtener una copia del proyecto en funcionamiento en tu máquina local para propósitos de desarrollo y pruebas. Mira Despliegue para conocer como desplegar el proyecto.

@jelitox
jelitox / filterawscdn.py
Created December 1, 2016 23:17
Filter AWS Subnets
import urllib, json, requests
response = requests.get('https://ip-ranges.amazonaws.com/ip-ranges.json')
r = response.json()
o = len(r['prefixes'])
for i in range(o):
if r['prefixes'][i]['region'] == "eu-west-1":
print r['prefixes'][i]['ip_prefix']
@jelitox
jelitox / slack.py
Created December 1, 2016 22:51
Delete Slack files through api
import requests
import json
import calendar
from datetime import datetime, timedelta
_token = "Slack_token"
_domain = "Slack_subdomain"
if __name__ == '__main__':
while 1: