Skip to content

Instantly share code, notes, and snippets.

@tomoconnor
tomoconnor / govnotify_email_backend.py
Created Mar 29, 2020
Django Email Backend for Gov Notify
View govnotify_email_backend.py
"""
Backend for Gov.Notify
"""
from django.core import mail
from django.core.mail.backends.base import BaseEmailBackend
from notifications_python_client.notifications import NotificationsAPIClient
from django.conf import settings
View gist:7e38dd82d03e096dd46484f475022b74
I fishweliteomhoge in pantirided and huvk,.
eethelal
oosh with to myce ossoce hosnised in my 1 his abond to a toed shanhens bicdtzon..
Aloby i e6 and I cilpens I ip at, on srroted as. Mus of the Sarpibising wes mipis. I I garpin noling jeinlbeing on the dermot gird Soten to It wrong wo most. Ib or toisode wlite.
A wank Coorand afderturles and a anCenet that food she
hant. I leoyed I haw tI dust my parelhy doose Monsite intraunt srule in she buged jus fo of them, anne wDints. I wan Anos't how alted watteg
ttoed I've shurponelarts afdy. Ner I for on 2 dimts thad wadhi the end spiht Uacd at i cmcluuuted helt knomites of to by prilk dodose
wer plitderny sick'at by dorslince fiw biny wamhed of fur, in at I devasosed dointele in the metlone refenduog (houge shaned my hrole and gics a wobandt. Andestmgut anlucse oveuks Ons drams in at any same efcertitoous,. I trovinlhed yaldlet to the toantoens my hrange noke my rycers the paris coeed mutuotfored abd there frotite I slitebs, is a's gix I maads dender. I nies fac
View spiders.py
ladies = 8
desired_spiders = 8
required_spider_shoes_per_spider=8
spider_cost = 0.08 // 8 pence each
shoe_cost = 0.00125 // 1/8th of a pence
print("Shoe Shopping")
@tomoconnor
tomoconnor / lightning_anal.py
Created Jul 24, 2019
Quick and dirty thing I hacked together for finding lightning in night-time video. It just measures the average brightness of each image of a video (you first rip the video to a sequence of images with ffmpeg), then symlinks the brightest frames into a subdirectory called "brightest".
View lightning_anal.py
from PIL import Image, ImageStat
import os
import sys
import shutil
import glob
import argparse
import operator
View andon_prtg.py
#!/usr/bin/env python
import RPi.GPIO as GPIO
import time
import requests
import sys
import xmltodict
GPIO.setmode(GPIO.BCM)
GPIO.cleanup()
GPIO.setwarnings(False)
View redirectatron.py
from flask import Flask
from flask import redirect
app = Flask(__name__)
@app.route("/")
def rickroll():
return redirect("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
View clamav-scan-summary
C:\Documents and Settings/All Users/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Microsoft/OEMOffice14/OStarter/en-us/click2run.msi: Win.Worm.Chir-2576 FOUND
...!(100)MSCAB:VIRTUALSEARCHPROTOCOLHOSTPS.DLL: Win.Worm.Chir-2576 FOUND
C:\Documents and Settings/All Users/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Microsoft/OEMOffice14/OStarter/en-us/click2run.msi: Win.Worm.Chir-2576 FOUND
...!(277)MSCAB:VIRTUALSEARCHPROTOCOLHOSTPS.DLL: Win.Worm.Chir-2576 FOUND
C:\Documents and Settings/All Users/Application Data/Application Data/Application Data/Application Data/Application Data/Application Data/Microsoft/OEMOffice14/OStarter/en-us/click2run.msi: Win.Worm.Chir-2576 FOUND
...!(277)MSCAB:VIRTUALSEARCHPROTOCOLHOSTPS.DLL: Win.Worm.Chir-2576 FOUND
C:\Documents and Settings/All Users/Application Data/Application Data/Application Data/Application Data/App
View gist:79a291ef5c639d3b9a3db518df488f7b
Welcome to LiveChat
Lisa Jones
Support Agent
Good
Lisa Jones
4:39 pm
Let me help you get our Black Friday Limited Time Offer!
Visitor
@tomoconnor
tomoconnor / cherry-menthol.js
Created Oct 13, 2016
Set all bundle options on https://flavourfactory-eliquid.co.uk to cherry menthol, as it's my favourite.
View cherry-menthol.js
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();
var x = $('select');
var flavour_options = x.slice(1,-1);
flavour_options.each(function(i,v){v.value="cherry-menthol";})
View imgur_spam
<link rel="dns-prefetch" href="http://popcash.net/world/go/80401/158240/">
<link rel="dns-prefetch" href="http://latest-403709.aptexof.ru/protJS/OzpxFg4mExYDBAdEXVVKShYDDkZcSg8QEhgXXEdIERMfbBMWBi8oJ0oILRdLFEgkAwsADwYDSVcHCR0JEFtaUUAJARIBGn8VQD1%2Bcz0MAnpYSEQRGhUOEAkaLQJKXldfVVJWXVFRXUtEFwEmQ0lVcnhgXFhuWAgJBhcvA0ZcXVJSX11QUV9QV1FQSkoIFA0PKw8SDgcuMgAiJlheCBIfCktGBBoLERsBFDcBBQ0NAERSCRMIBG5DAAcUKDdGUXJWRjAOACIGEAdKXkQiDhYQIzVfDzUgPjUwMT4VNB8kGRkGDC4AOzE1IyE3Nis0XCogOSEyOiFRLQsiICsxIT4QIwofAy84ZjM9c0sgMAtCMzEPPD0yCg9PNC01IiMPVFUsNiwvMBQ7OjEiFB4hDDEUPVQLJjRVJSktE148JhElMTYKED01LTYuJSklKTcjLAkUHAgLOzURNyEKLR0yPiEqIjAzWiEDUhAgDBs3J1UuITdDCg4AAgs4Big9IiALK1AgER88NC4tXidXDC0lJjMuLB9cESE3RzMbcAkjLTozMyA1PigkNT8cJyQfJiApVzEjK1wrLlc0NzgGEilANg%3D%3D">
</head>
<body class="">
<object type="application/x-shockwave-flash" id="infCP" name="infCP" data="//rajniko.ru/handler_static/swf/cndr.swf" style="position:fixed !important;visibility:visible !important;left:0 !important;top:0 !important;width:1px !important;height:1px !im
You can’t perform that action at this time.