- Install Homebrew from https://brew.sh
$ brew install podman
#!/usr/bin/env python3 | |
# encoding: utf-8 | |
"""Use instead of `python3 -m http.server` when you need CORS""" | |
from http.server import HTTPServer, SimpleHTTPRequestHandler | |
class CORSRequestHandler(SimpleHTTPRequestHandler): | |
def end_headers(self): | |
self.send_header('Access-Control-Allow-Origin', '*') |
#!/usr/bin/env PYTHONIOENCODING=utf-8 python | |
# encoding: utf-8 | |
"""Git pre-commit hook which lints Python, JavaScript, SASS and CSS""" | |
from __future__ import absolute_import, print_function, unicode_literals | |
import os | |
import subprocess | |
import sys |
#!/usr/bin/env python | |
# encoding: utf-8 | |
from pprint import pformat, pprint | |
import logging | |
class PasswordMaskingFilter(logging.Filter): | |
"""Demonstrate how to filter sensitive data:""" |
$ brew install podman
#!/usr/bin/env python3 | |
""" | |
Ensure that every security group tagged with 'AllowCloudflareIngress' has | |
an ingress rule allowing HTTPS in from every public Cloudflare edge IPv4 and | |
IPv6 CIDR block. | |
Note that HTTP is intentionally not enabled: use the always-HTTPS page rule for | |
that to avoid potential security problems. | |
""" |
<?xml version="1.0" encoding="utf-8"?> | |
<opml version="1.1"> | |
<!--Generated by NewsBlur - newsblur.com--> | |
<head> | |
<title>NewsBlur Feeds</title> | |
<dateCreated>2023-05-15 14:04:44.095425</dateCreated> | |
<dateModified>2023-05-15 14:04:44.095425</dateModified> | |
</head> | |
<body> | |
<outline text="Web" title="Web"> |
# encoding: utf-8 | |
""" | |
Experimental SearchQuerySet exposing Solr's Collapse filter and Expand component | |
See https://cwiki.apache.org/confluence/display/solr/Collapse+and+Expand+Results | |
Usage:: | |
sqs = sqs.collapse('item_grouping', sort='"score DESC, wdl_id ASC"') | |
sqs = sqs.expand(rows=2, fq='django_ct:core.file') | |
#!/usr/bin/env python3 | |
""" | |
Example of how to non-destructively remove None values from an object before | |
JSON serialization | |
""" | |
import json | |
def filter_nones(obj): |
#!/usr/bin/env PYTHONIOENCODING=utf-8 python | |
# encoding: utf-8 | |
from __future__ import absolute_import, print_function, unicode_literals | |
import os | |
import re | |
import requests |
{ | |
"plugins": [ | |
"stylelint-order" | |
], | |
"extends": "stylelint-config-standard", | |
"rules": { | |
"indentation": 4, | |
"function-comma-newline-after": "always-multi-line", | |
"function-comma-space-after": "always", | |
"function-parentheses-newline-inside": "always-multi-line", |