Skip to content

Instantly share code, notes, and snippets.

View mattbasta's full-sized avatar
🌭
Still writing JavaScript

Matt Basta mattbasta

🌭
Still writing JavaScript
View GitHub Profile
@mattbasta
mattbasta / custom-css.css
Created May 3, 2017 15:13
Put this in the custom CSS section of your site's configuration
.episode > img {
width: 250px;
margin-left: auto;
margin-right: auto;
}
import hashlib
ADJECTIVES = {
'0': 'Ancient',
'1': 'Breezy',
'2': 'Charming',
'3': 'Delightful',
'4': 'Exuberant',
'5': 'Fantastic',
'6': 'Jolly',
import binascii
import hashlib
import json
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import algorithms, Cipher, modes
from django.conf import settings
from pinecast.helpers import gravatar
import binascii
# import codecs
import hashlib
import json
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import algorithms, Cipher, modes
from django.conf import settings
from pinecast.helpers import gravatar
import codecs
import hashlib
import json
import pyaes
from django.conf import settings
from pinecast.helpers import gravatar
@mattbasta
mattbasta / fontello.json
Created October 14, 2016 01:15
Pinecast fontello config
{
"name": "",
"css_prefix_text": "icon-",
"css_use_suffix": false,
"hinting": true,
"units_per_em": 1000,
"ascent": 850,
"glyphs": [
{
"uid": "e99461abfef3923546da8d745372c995",
@mattbasta
mattbasta / imageDownsize.js
Created January 13, 2016 01:23
Started working on an image resizing script for Lambda, but there's too many weird edge cases for me to finish it.
var fs = require('fs');
var path = require('path');
var aws = require('aws-sdk');
var im = require('imagemagick');
var s3 = new aws.S3({ apiVersion: '2006-03-01' });
var postProcessResource = function(resource, fn) {
var pt=performance.timing,rs=pt.responseStart;console.log([pt.domLoading-rs,pt.responseEnd-rs,pt.domContentLoadedEventStart-rs,pt.domContentLoadedEventEnd-rs,pt.loadEventStart-rs,pt.loadEventEnd-rs].join(','));location.reload()
function notify(title, body, icon, callback) {
if (window.Notification) {
function donotify() {
var notification = new Notification(title, {
body: body,
icon: icon
});
notification.onclick = callback;
}
if (Notification.permission === 'granted') {