Skip to content

Instantly share code, notes, and snippets.

@jeffknupp
jeffknupp / ApacheHTTPSConfig.md
Created October 29, 2019 18:29 — forked from nrollr/ApacheHTTPSConfig.md
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@jeffknupp
jeffknupp / jemalloc hang stack trace
Last active July 27, 2017 00:05
Stack trace of bug where jemalloc hangs during large memory reallocation initiated by Arrow
Thread 1 "python3" received signal SIGINT, Interrupt.
je_spin_adaptive (spin=<synthetic pointer>) at include/jemalloc/internal/spin.h:40
40 include/jemalloc/internal/spin.h: No such file or directory.
(gdb) where
#0 je_spin_adaptive (spin=<synthetic pointer>) at include/jemalloc/internal/spin.h:40
#1 chunk_dss_max_update (new_addr=<optimized out>) at src/chunk_dss.c:83
#2 je_chunk_alloc_dss (tsdn=tsdn@entry=0x7ffff7fe8620, arena=arena@entry=0x7fffc0200140, new_addr=new_addr@entry=0x7fff37e00000, size=size@entry=2097152, alignment=alignment@entry=2097152,
zero=zero@entry=0x7fffffffbac0, commit=commit@entry=0x7fffffffba10) at src/chunk_dss.c:122
#3 0x00007fffd346369f in chunk_alloc_core (dss_prec=dss_prec_secondary, commit=0x7fffffffba10, zero=0x7fffffffbac0, alignment=2097152, size=2097152, new_addr=0x7fff37e00000, arena=0x7fffc0200140,
tsdn=0x7ffff7fe8620) at src/chunk.c:357
@jeffknupp
jeffknupp / build_output
Created April 1, 2017 22:11
`cmake -DARROW_PYTHON=on ..`
[ 90%] Built target arrow_ipc_shared
[ 91%] Building CXX object src/arrow/python/CMakeFiles/arrow_python_objlib.dir/builtin_convert.cc.o
[ 91%] Building CXX object src/arrow/python/CMakeFiles/arrow_python_objlib.dir/common.cc.o
[ 92%] Building CXX object src/arrow/python/CMakeFiles/arrow_python_objlib.dir/config.cc.o
[ 93%] Building CXX object src/arrow/python/CMakeFiles/arrow_python_objlib.dir/helpers.cc.o
[ 94%] Building CXX object src/arrow/python/CMakeFiles/arrow_python_objlib.dir/io.cc.o
[ 95%] Building CXX object src/arrow/python/CMakeFiles/arrow_python_objlib.dir/pandas_convert.cc.o
[ 95%] Built target arrow_python_objlib
[ 95%] Linking CXX static library ../../../debug/libarrow_python.a
[ 95%] Built target arrow_python_static
FROM nginx
COPY dist/ /opt/frontend/
COPY deploy/nginx.conf /etc/nginx/nginx.conf
RUN rm /etc/nginx/conf.d/default.conf
COPY deploy/explore.conf /etc/nginx/sites-enabled/frontend.conf
COPY deploy/explore.conf /etc/nginx/sites-available/frontend.conf
FROM ubuntu:16.04
MAINTAINER Jeff Knupp <jeff.knupp@enigma.io>
RUN apt-get update && \
apt-get install -y python3 \
python3-psycopg2 \
python3-pip \
uwsgi \
uwsgi-plugin-python3

Keybase proof

I hereby claim:

  • I am jeffknupp on github.
  • I am jeffknupp (https://keybase.io/jeffknupp) on keybase.
  • I have a public key whose fingerprint is 0AFC 2D24 DE9D BE22 5150 676D 2174 F85E 5B44 3DF6

To claim this, I am signing this object:

from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
class Cloud(db.Model):
__tablename__ = 'cloud'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String, nullable=False)
description = db.Column(db.String, nullable=False)
@jeffknupp
jeffknupp / pygments.css
Created September 27, 2012 19:28 — forked from zmanji/pygments.css
Solarized Pygments Dark CSS
.highlight{background-color:#073642;color:#93a1a1}.highlight .c{color:#586e75 !important;font-style:italic !important}.highlight .cm{color:#586e75 !important;font-style:italic !important}.highlight .cp{color:#586e75 !important;font-style:italic !important}.highlight .c1{color:#586e75 !important;font-style:italic !important}.highlight .cs{color:#586e75 !important;font-weight:bold !important;font-style:italic !important}.highlight .err{color:#dc322f !important;background:none !important}.highlight .k{color:#cb4b16 !important}.highlight .o{color:#93a1a1 !important;font-weight:bold !important}.highlight .p{color:#93a1a1 !important}.highlight .ow{color:#2aa198 !important;font-weight:bold !important}.highlight .gd{color:#93a1a1 !important;background-color:#372c34 !important;display:inline-block}.highlight .gd .x{color:#93a1a1 !important;background-color:#4d2d33 !important;display:inline-block}.highlight .ge{color:#93a1a1 !important;font-style:italic !important}.highlight .gr{color:#aa0000}.highlight .gh{color:#586e