For an ADT type, such as,
data Exp = Num Int | App Char Exp
deriving (Show)
In Haskell we have case expressions to deconstruct values, and they have exhaustiveness checking. We have
#!/usr/bin/env bash | |
set -Eeuxo pipefail | |
# Set up git | |
git init | |
gitignore haskell | |
echo '*.cabal' >> .gitignore | |
# Set up niv | |
niv init |
For details on the attached policies see: https://gist.github.com/brianantonelli/e3fe950fffdd04275b306953a5742104
Hello software developers,
Please check your code to ensure you're not making one of the following mistakes related to cryptography.
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist | |
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist |
# Wouldn't it be great if you could have STI like functionality | |
# without needing to encode strings of class names in the database? | |
# Well today is your lucky day! Discriminable Model is here to help. | |
# | |
# Simply specify your models desired type column, and provide a block to | |
# do the discrimination. If you want the whole STI-esque shebang of properly | |
# typed finder methods you can supply an array of 'discriminate_types' that will | |
# be used to apply an appropriate type. | |
# | |
# class MyModel < ActiveRecord::Base |
# Invoke as follow | |
# $ ruby build.rb x | |
# Where $ is your bash prompt and x is the glass ceiling you want to build. | |
def build(n) | |
unless (n-1) < 0 | |
build(n-1) | |
end | |
unless (n-2) < 0 | |
destroy(n-2) |
# Old-school GPG config was taken from the following docs. I'm preserving these | |
# links here just in case I need to configure an old version of mutt & gnupg in | |
# the future without gpgme. | |
# * /usr/share/docs/mutt/gpg.rc | |
# * http://codesorcery.net/old/mutt/mutt-gnupg-howto | |
# * http://dev.mutt.org/trac/wiki/MuttGuide/UseGPG | |
# | |
# Mutt now has solid support for GPGME, which not only makes config much | |
# simpler and eliminates the need to fork gpg processes & parse their output - | |
# it also makes working with gpg-agent, kwallet, gnome-keyring etc. a doddle |
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\