To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
// String utils | |
// | |
// resources: | |
// -- mout, https://github.com/mout/mout/tree/master/src/string | |
/** | |
* "Safer" String.toLowerCase() | |
*/ | |
function lowerCase(str) { | |
return str.toLowerCase(); |
# bash <(curl -s https://gist.github.com/drye/5387341/raw/ec72cddfe43ec3d39c91a3c118cb68ab14a049f8/enable_dnsmasq_on_osx.sh) | |
# ---------------------- | |
# installing dnsmasq and enable daemon | |
# ---------------------- | |
brew install dnsmasq | |
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
# ---------------------- | |
# adding resolver for vbox domain | |
# ---------------------- |
@Grab( 'org.apache.poi:poi:3.9' ) | |
import static org.apache.poi.ss.usermodel.CellStyle.* | |
import static org.apache.poi.ss.usermodel.IndexedColors.* | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook | |
new HSSFWorkbook().with { workbook -> | |
def styles = [ LIGHT_BLUE, LIGHT_GREEN, LIGHT_ORANGE ].collect { color -> | |
createCellStyle().with { style -> | |
fillForegroundColor = color.index | |
fillPattern = SOLID_FOREGROUND |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
The plan is to create a pair of executables (ngrok
and ngrokd
) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok
to connect to this ngrokd
, and vice versa.
Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com
, you'll need a record for that and for *.domain.com
.
Unzip and move to /opt
Create symlink
try: | |
import xmlrpclib | |
except ImportError: | |
import xmlrpc.client as xmlrpclib | |
client = xmlrpclib.ServerProxy('https://pypi.python.org/pypi') | |
packages = client.list_packages() | |
total = len(packages) | |
dashes = len([x for x in packages if '-' in x]) |
import logging | |
from fastapi import FastAPI | |
from uicheckapp.services import EchoService | |
logging.config.fileConfig('logging.conf', disable_existing_loggers=False) | |
logger = logging.getLogger(__name__) | |
app = FastAPI() |