Skip to content

Instantly share code, notes, and snippets.

View ruddfawcett's full-sized avatar

Rudd Fawcett ruddfawcett

View GitHub Profile
@ruddfawcett
ruddfawcett / email-blacklist.json
Last active November 2, 2015 08:28 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
["1033edge.com","11mail.com","123.com","123box.net","123india.com","123mail.cl","123qwe.co.uk","150ml.com","15meg4free.com","163.com","1coolplace.com","1freeemail.com","1funplace.com","1internetdrive.com","1mail.net","1me.net","1mum.com","1musicrow.com","1netdrive.com","1nsyncfan.com","1under.com","1webave.com","1webhighway.com","212.com","24horas.com","2911.net","2bmail.co.uk","2d2i.com","2die4.com","3000.it","321media.com","37.com","3ammagazine.com","3dmail.com","3email.com","3xl.net","444.net","4email.com","4email.net","4mg.com","4newyork.com","4x4man.com","5iron.com","5star.com","88.am","8848.net","888.nu","97rock.com","aaamail.zzn.com","aamail.net","aaronkwok.net","abbeyroadlondon.co.uk","abcflash.net","abdulnour.com","aberystwyth.com","abolition-now.com","about.com","academycougars.com","acceso.or.cr","access4less.net","accessgcc.com","ace-of-base.com","acmecity.com","acmemail.net","acninc.net","adelphia.net","adexec.com","adfarrow.com","adios.net","ados.fr","advalvas.be","aeiou.pt","aemail4u.com","aene
javascript:(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}funct
display dialog "Bonjour!"
import praw # simple interface to the reddit API, also handles rate limiting of requests
import re
from collections import deque
from time import sleep
USERNAME = "Your username here"
PASSWORD = "Your password here"
USERAGENT = "Your useragent string here. It should include your /u/username as a courtesy to reddit"
r = praw.Reddit(USERAGENT)
@ruddfawcett
ruddfawcett / octicons.css
Created December 6, 2013 19:29
The @font-face for the GitHub Octicons. See https://github.com/styleguide/css/7.0 for more information.
@font-face {
font-family: 'Octicons';
src: url("https://a248.e.akamai.net/assets.github.com/fonts/octicons/octicons-regular-webfont.eot?ade8e027");
src: url("https://a248.e.akamai.net/assets.github.com/fonts/octicons/octicons-regular-webfont.eot?ade8e027#iefix") format("embedded-opentype")
, url("https://a248.e.akamai.net/assets.github.com/fonts/octicons/octicons-regular-webfont.woff?fca05081") format("woff")
, url("https://a248.e.akamai.net/assets.github.com/fonts/octicons/octicons-regular-webfont.ttf?b2778fb1") format("truetype")
, url("https://a248.e.akamai.net/assets.github.com/fonts/octicons/octicons-regular-webfont.svg?b5c3b089#newFontRegular") format("svg")
;
font-weight: normal;
font-style: normal;
@ruddfawcett
ruddfawcett / bones.html
Last active June 28, 2016 02:32
Barbones HTML file
<!DOCTYPE HTML>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>Title</title>
<link rel='stylesheet' href='assets/styles/index.css'>
</head>
<body>
<script src='js/scripts.js'></script>
import UIKit
class ViewController: UIViewController {
let keyboard = KeyboardControl()
override func viewDidLoad() {
super.viewDidLoad()
@ruddfawcett
ruddfawcett / enum-access.js
Created July 15, 2016 04:44 — forked from bnoguchi/enum-access.js
How to access enumValues in mongoose from a Model or Document
var mongoose = require('./index')
, TempSchema = new mongoose.Schema({
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']}
});
var Temp = mongoose.model('Temp', TempSchema);
console.log(Temp.schema.path('salutation').enumValues);
var temp = new Temp();
console.log(temp.schema.path('salutation').enumValues);
@ruddfawcett
ruddfawcett / Slimdown.md
Created August 5, 2016 19:38 — forked from jbroadway/Slimdown.md
Slimdown - A simple regex-based Markdown parser.

Slimdown

A very basic regex-based Markdown parser. Supports the following elements (and can be extended via Slimdown::add_rule()):

  • Headers
  • Links
  • Bold
  • Emphasis
  • Deletions
@ruddfawcett
ruddfawcett / simple-json-reponse.php
Created August 22, 2017 19:48 — forked from james2doyle/simple-json-reponse.php
A simple JSON response function for PHP. Used in various PhileCMS plugins.
<?php
function json_response($message = null, $code = 200)
{
// clear the old headers
header_remove();
// set the actual code
http_response_code($code);
// set the header to make sure cache is forced
header("Cache-Control: no-transform,public,max-age=300,s-maxage=900");