jq is useful to slice, filter, map and transform structured json data.
brew install jq
#!/usr/local/bin/python | |
"""Replacement for htpasswd""" | |
# Original author: Eli Carter | |
import os | |
import sys | |
import random | |
from optparse import OptionParser | |
# We need a crypt module, but Windows doesn't have one by default. Try to find |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
# Disable send and reply animations in Mail.app | |
defaults write com.apple.Mail DisableReplyAnimations -bool YES | |
defaults write com.apple.Mail DisableSendAnimations -bool YES | |
# Copy email addresses as `[email protected]` instead of `Foo Bar <[email protected]>` in Mail.app | |
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false | |
# Disable inline attachments (just show the icons) |
I have run an nginx container... | |
docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
6d67de07731d nginx "nginx -g 'daemon ..." 40 minutes ago Up 40 minutes 80/tcp, 443/tcp epic_goldberg | |
I want to use Debian for debug: | |
docker run -it --pid=container:6d67de07731d --net=container:6d67de07731d --cap-add sys_admin debian | |
I can see the nginx process: |
# install homebrew | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
brew install git | |
brew install node | |
brew install wget | |
brew install z | |
brew install ag | |
brew install ack | |
brew install ffind |
I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.
There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*
, e.g.:
:vs **/*<partial file name><Tab>
FROM golang:1.9 | |
WORKDIR /go/src/github.com/purplebooth/example | |
COPY . . | |
RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go | |
FROM scratch | |
COPY --from=0 /go/src/github.com/purplebooth/example/main /main | |
CMD ["/main"] |
import requests, json | |
from subarucreds import username,password,pin # just a "subarucreds.py" that has some variables i didn't want to share | |
import datetime | |
#login | |
s=requests.Session() | |
loginr=s.post('https://www.mysubaru.com/login', data = {'username':username,'password':password}) | |
#should return a response 200 | |
#Where's my subaru? |