Skip to content

Instantly share code, notes, and snippets.

View alexpls's full-sized avatar

Alex Plescan alexpls

View GitHub Profile
-- vim: tabstop=2 shiftwidth=2 expandtab
-- We almost always start by importing the wezterm module
local wezterm = require 'wezterm'
-- Define a lua table to hold _our_ module's functions
local module = {}
-- Returns a bool based on whether the host operating system's
-- appearance is light or dark.
function module.is_dark()
@alexpls
alexpls / filter_email_domains.sh
Created July 11, 2016 04:10
Filter a list of domains keeping only those which have a valid MX record
awk '{print $1}' domains.txt | while read domain; do if [[ $(dig +noall +answer mx $domain) ]]; then echo $domain; fi; done
@alexpls
alexpls / BorderedButton.swift
Last active August 7, 2016 09:59
UIButton subclass where borderRadius can be set for each corner individually
//
// BorderedButton.swift
//
// A UIButton subclass where you can choose which corners (top left, top right,
// bottom left, bottom right) of the button you want to have a borderRadius on.
// Either set these in code or in Interface Builder.
//
import UIKit