ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media print { | |
a:after { | |
/* Display link address for accessibility */ | |
content: ' [' attr(href) '] '; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text = open('scrambled.txt', 'r').read() | |
words = ['miner', 'willy', 'andre', 'jet', 'set', 'bug', 'byte'] | |
def permute(string): | |
result = [] | |
if len(string) == 1: | |
result = [string] | |
else: | |
for i, char in enumerate(string): |
I hereby claim:
- I am huntie on github.
- I am huntie (https://keybase.io/huntie) on keybase.
- I have a public key whose fingerprint is 144D 5AFF A2FB 93C3 167B 5B0C 7B78 B3A2 DCC8 FF93
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
class KeyGenerateCommand extends Command | |
{ | |
/** | |
* The name and signature of the console command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Run a callback over all children of a given element using depth-first | |
* traversal. | |
* | |
* @param {HTMLElement} element | |
* @param {Function} callback | |
*/ | |
function iterateDOM(element, callback) { | |
const nodes = []; |
Install Certbot and register Let's Encrypt account:
add-apt-repository ppa:certbot/certbot
apt update
apt install certbot
certbot register
Issue new SSL certificates for each host:
certbot certonly --webroot -w /var/www/alexhunt.io/ -d alexhunt.io -d www.alexhunt.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def unpack_module(module) -> dict: | |
""" | |
Return the members of an imported package or module explicitly exported | |
using __all__. | |
""" | |
return {k: module.__dict__[k] for k in module.__dict__.get('__all__', [])} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import falcon | |
from typing import Tuple | |
import ujson | |
from .graphql import schema | |
class GraphQLNoQueryResolved(falcon.HTTPBadRequest): | |
""" | |
An exception indicating that a GraphQL query could not be resolved from the | |
incoming request. This will create an HTTP 400 response when raised. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dotenv = require('dotenv'); | |
const fs = require('fs'); | |
const { flowRight, partial, unary } = require('lodash'); | |
const path = require('path'); | |
/** | |
* Load the environment settings for the current mode from `.env.{mode}` merged | |
* with any private entries defined in `.env` if present. | |
* | |
* @param {string} mode |
OlderNewer