Portions taken from http://www.cs.utexas.edu/~mitra/csSpring2011/cs327/cx_mac.html (in case that link ever dies.)
Assume you've got homebrew installed.
Download the following files from Oracle
/* eslint-disable no-invalid-this */ | |
const { request: Request } = require('express'); | |
const parseQuery = Object.getOwnPropertyDescriptor(Request, 'query').get; | |
function getQuery() { | |
if (this.__queryModified) | |
return this.__queryModified; | |
return parseQuery.call(this); | |
} |
/** | |
* Find the longest class names in Spring. | |
* Also find FactoryFactory classes. | |
* a goof-off project by @thom_nic | |
*/ | |
import java.util.jar.* | |
defaultTasks 'longest', 'factoryfactory' |
Portions taken from http://www.cs.utexas.edu/~mitra/csSpring2011/cs327/cx_mac.html (in case that link ever dies.)
Assume you've got homebrew installed.
Download the following files from Oracle
import android.content.Context; | |
import android.content.DialogInterface; | |
import android.content.res.TypedArray; | |
import android.preference.DialogPreference; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import com.quietlycoding.android.picker.NumberPicker; | |
public class NumberPickerPreference extends DialogPreference { |
#!/bin/bash -ue | |
# Modified "CIDR to IP range" function taken from https://stackoverflow.com/a/18120519/213983 | |
# use like `cidr_iter "192.168.1.1/24"` | |
cidr_iter() { | |
# create array containing network address and subnet | |
local network=(${1//\// }) | |
# split network address by dot | |
local iparr=(${network[0]//./ }) | |
# if no mask given it's the same as /32 |
/* | |
* Spacing helpers for consistent margin and padding on elements. Uses rems (not px!) | |
* | |
* With the current default settings, generates classes like: | |
* .mts = margin-top: 0.5rem | |
* .phl = padding-left: 2rem; padding-right: 2rem; // h = horizontal = left/right | |
* | |
* Inspired by: | |
* https://github.com/mrmrs/css-spacing | |
* https://getbootstrap.com/docs/4.0/utilities/spacing/ |
### | |
# Node.js app Docker file | |
# | |
# Some basic build instructions: | |
# ``` | |
# # you should delete node_modules b/c you don't want that copied during 'ADD' | |
# docker build -t thom-nic/node-bootstrap . | |
# # run a shell in the container to inspect the environment (as root): | |
# docker run --rm -itu root thom-nic/node-bootstrap /bin/bash | |
# ``` |
import logging, urllib2 | |
import https | |
client_cert_key = None # file path | |
client_cert_pem = None #file path | |
ca_certs = None # file path | |
handlers = [] | |
handlers.append( HTTPSClientAuthHandler( |
# Node.js app Docker file | |
FROM ubuntu:14.04 | |
MAINTAINER Thom Nichols "thom@thomnichols.org" | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update | |
RUN apt-get -qq update | |
RUN apt-get install -y nodejs npm |
#require 'rack/request' | |
# Rack middleware to decode a `Transfer-Encoding: chunked` HTTP request. | |
# | |
# USAGE NOTE: | |
# | |
# Some HTTP servers (Webrick and Unicorn/Rabinbows/Zbatery) already decode the | |
# chunked stream, but they leave the 'Transfer-Encoding' header and don't bother | |
# to add a 'Content-Length' header, which causes rails ActionDispatch::Request | |
# to not parse the whole request body. |