Skip to content

Instantly share code, notes, and snippets.

View berryp's full-sized avatar
😎

Berry Phillips berryp

😎
  • Seoul, Korea
  • 19:43 (UTC +09:00)
View GitHub Profile
@berryp
berryp / serve.go
Created August 4, 2015 15:11
Super simple http file server tool
package main
import (
"flag"
"fmt"
"log"
"net/http"
)
func LogHandler(handler http.Handler) http.Handler {
@berryp
berryp / resume.md
Last active January 16, 2017 22:12

BERRY PHILLIPS // Senior Developer

Technical Skills

Python JavaScript Go Ruby JSON APIs Front-End Full Stack TDD SQL Django CherryPy Node.JS AWS Compute AWS Networking AWS Management AWS Storage AWS CLI Docker Jenkins CI CD Scalability High Availability Micro Services Distributed Systems DevOps Automation Tooling

package main
import (
"fmt"
"strings"
)
type CategoryList struct {
Categories []Category
}

NPM Artifactory proxy

NPM reads package names from the first slug ion the URL in the request. Artifactory URLs have a bunch of slugs before the package name. This means that when NPM prints out the package name in case of an error, you don’t get the package name when using Artifactory.

This Nginx config will allow you to proxy requests from a naked path on a local Nginx server to the full Artifactory URL.

Setup

Nginx

Create a file in the current directory called nginx.conf (or any name of your choice, just make sure you use than name in all instructions) and add the following:

Default values

if somevar is None:
    somevar = somedefaultvar

vs.

@berryp
berryp / docker.py
Created November 15, 2017 10:25
aiodocker with Hyper.sh support
import asyncio
import json
import logging
import os
from pathlib import Path
import re
import ssl
import aiohttp
from yarl import URL
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: myapp-frontend
spec:
replicas: 1
revisionHistoryLimit: 3
strategy:
rollingUpdate:
maxUnavailable: 0
2019-08-14 13:26:38.578 IBCocoaTouchImageCatalogTool[28118:2400122] Unable to get image dimensions for file:///Users/berryp/code/salmteo/app/platforms/ios/삶터-직원용/Images.xcassets/LaunchStoryboard.imageset/Default@2x~universal~anyany.png
2019-08-14 13:26:38.612 IBCocoaTouchImageCatalogTool[28118:2400122] Unable to get image dimensions for file:///Users/berryp/code/salmteo/app/platforms/ios/삶터-직원용/Images.xcassets/AppIcon.appiconset/icon-1024.png
2019-08-14 13:26:38.618 IBCocoaTouchImageCatalogTool[28118:2400122] Unable to get image dimensions for file:///Users/berryp/code/salmteo/app/platforms/ios/삶터-직원용/Images.xcassets/AppIcon.appiconset/icon-20.png
2019-08-14 13:26:38.618 IBCocoaTouchImageCatalogTool[28118:2400122] Unable to get image dimensions for file:///Users/berryp/code/salmteo/app/platforms/ios/삶터-직원용/Images.xcassets/AppIcon.appiconset/[email protected]
2019-08-14 13:26:38.619 IBCocoaTouchImageCatalogTool[28118:2400122] Unable to get image dimensions for file:///Users/berryp/code/salmteo/app/platforms/ios/삶

Keybase proof

I hereby claim:

  • I am berryp on github.
  • I am berryp (https://keybase.io/berryp) on keybase.
  • I have a public key whose fingerprint is 234D 1F9A F98A C9BD 2A96 B28D 8223 4D65 3810 D474

To claim this, I am signing this object: