As configured in my dotfiles.
start new:
tmux
start new with session name:
# Gawk version | |
# Remote | |
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}' | |
# Local | |
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}' | |
# No Gawk | |
# Local | |
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){ |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/sh | |
# Set the macOS installer path as a variable | |
MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")" | |
MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport" | |
echo "macOS installer is \"$MACOS_INSTALLER\"" | |
# Set the target disk as a variable | |
TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//') | |
echo "Target disk is \"$TARGET\"" |
<!doctype html> | |
<html> | |
<head> | |
<title>Froala with Webpack</title> | |
</head> | |
<body> | |
<div id="editor"></div> |
We dropped Lerna from our monorepo architecture in PouchDB 6.0.0. I got a question about this from @reconbot, so I thought I'd explain our reasoning.
First off, I don't want this post to be read as "Lerna sucks, don't use Lerna." We started out using Lerna, but eventually outgrew it because we wrote our own custom thing. Lerna is still a great idea if you're getting started with monorepos (monorepi?).
Backstory:
"tiers": [{"eventId": 5275, "mappedSeats": 0, "name": "to1", "color": "#e6194b", "price": 35.0, "seats": 100, "id": 3040}, {"eventId": 5275, "mappedSeats": 0, "name": "to2", "color": "#ffe119", "price": 25.0, "seats": 100, "id": 3041}, {"eventId": 5275, "mappedSeats": 0, "name": "to3", "color": "#f58231", "price": 15.0, "seats": 100, "id": 3042}, {"eventId": 5275, "mappedSeats": 0, "name": "ga", "color": "#911eb4", "price": 5.0, "seats": 100, "id": 3043}], "name": "test event", "eventBrief": {"date_time": "08:00PM", "title": "test event", "poster": "http://eventcartel.com/cache/31/1e/311eb76027aa06f057dad6ce2a8f7161.jpg", "eventUrl": "/events/test-event-None-tickets-5275/", "place": "5 Village Lodge Rd, Stratton Mountain, VT", "date_day": "Fri 10/19"}, "seatmapId": 61, "ga": {"tierId": 3040, "quantity": {"max_qty": 10, "current_qty": 0, "step": 1}, "unsoldSeats": 100, "name": "ga", "height": 1000, "width": 1000, "x": 4581, "y": 2520, "rotate": 0, "zoneId": "ga"} |
# Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too. | |
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready! | |
Resources: | |
sslSecurityGroupIngress: | |
Type: AWS::EC2::SecurityGroupIngress | |
Properties: | |
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]} | |
IpProtocol: tcp | |
ToPort: 443 |
// Application Javascript - see https://github.com/lfender6445/google_places for full example | |
var autocomplete, input, address = {}; | |
$(document).ready(function(){ | |
input = $("#searchBox"); | |
$("#searchBox").clearOnFocus(); | |
$('form').submit(function(){ return false; }); | |
}); | |
var init = function(){ |