Skip to content

Instantly share code, notes, and snippets.

@drakodev
drakodev / free-disposable-email-providers.txt
Last active April 13, 2024 05:38
16413 Free or Disposable Email Providers Domains - Collected and combined from various resources primarily built on top of lists provided by Okutbay & frankwarwick
0-00.usa.cc
0-mail.com
0.pl
001.igg.biz
0039.cf
0039.ga
0039.gq
0039.ml
007addict.com
00b2bcr51qv59xst2.cf
@vladox
vladox / download_sentry_data.py
Last active April 13, 2024 01:00 — forked from bubenkoff/download_sentry_data.py
Download all sentry events for a project. Useful for data processing
"""Download sentry data.
usage:
python download_sentry_data.py <org>/<project> <api_key>
"""
import requests
import csv
import sys
if __name__ == '__main__':
@jimjh
jimjh / gevent_tracer.py
Last active June 23, 2023 01:49
gevent_tracer.py
def _callback(event, args):
# switch and throw both switch the active greenlet from origin to target
if event not in set(['switch', 'throw']):
return
origin, target = args
# record last switch (time and CPU tick)
global __last_switch_time_ms, __last_switch_cpu_tick
@mattheworiordan
mattheworiordan / restart.sh
Created August 19, 2017 13:23
Heroku scheduled restarts
#!/bin/sh
# Set up the Heroku scheduler to run this command every hour. See example setup at https://goo.gl/nMCSH3
#
# Requires env vars to be set in Heroku with `heroku config:set`:
# - HEROKU_APP_NAME: this is just the app name in Heroku, i.e. `heroku apps` will list all apps you have access to
# - HEROKU_CLI_USER: Once Heroku CLI is authenticated (https://goo.gl/Qypr4x), check `cat .netrc` (or `_netrc` on Windows),
# look for `login` under `machine api.heroku.com`
# - HEROKU_CLI_TOKEN: As above, but use the `password` field
#
# Copyright 2017, Markus Holtermann
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
@mtik00
mtik00 / wp_to_hugo.py
Created July 24, 2015 18:45
This script is used to convert a WordPress XML dump to Hugo-formatted posts.
#!/usr/bin/env python2.7
"""
This script is used to convert a WordPress XML dump to Hugo-formatted posts.
NOTE: The WP post data is kept as-is (probably HTML). It is not converted to
Markdown. This is to reduce the amount of "fixing" one has to do after the
data is converted (e.g. line endings, links, etc). This is generally not an
issue since Markdown allows HTML.
The post Metadata is converted to TOML.
@johtso
johtso / gist:5881137
Last active February 18, 2021 18:37
Django Rest Framework underscore <-> camelcase conversion
import re
from rest_framework import serializers, renderers, parsers
class JSONRenderer(renderers.JSONRenderer):
def render(self, data, *args, **kwargs):
if data:
data = recursive_key_map(underscore_to_camelcase, data)
return super(JSONRenderer, self).render(data, *args, **kwargs)
@mariocesar
mariocesar / runserver.py
Created October 23, 2012 11:18
Runs the django dev server along with ´compass watch´ command. For fun and profit
import os
import subprocess
import atexit
import signal
from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.management.commands.runserver import Command as RunserverCommand
@jturcotte
jturcotte / gist:3912465
Created October 18, 2012 15:11
Terminator plugin to open paths in Sublime Text
import re
import terminatorlib.plugin as plugin
import subprocess
# Every plugin you want Terminator to load *must* be listed in 'AVAILABLE'
AVAILABLE = ['FileURLHandler']
class FileURLHandler(plugin.URLHandler):
capabilities = ['url_handler']
handler_name = 'file_path'
@winhamwr
winhamwr / awesome_task.py
Created May 17, 2012 16:02
Celery base task that adds some niceties for longish-running or singleton jobs.
"""
Celery base task aimed at longish-running jobs that return a result.
``AwesomeResultTask`` adds thundering herd avoidance, result caching, progress
reporting, error fallback and JSON encoding of results.
"""
from __future__ import division
import logging
import simplejson