Skip to content

Instantly share code, notes, and snippets.

View chrisvoncsefalvay's full-sized avatar
🥼
doing science & still alive ;)

Chris von Csefalvay chrisvoncsefalvay

🥼
doing science & still alive ;)
View GitHub Profile

Configuring Nginx to serve SSL content is straight forward, once you have your certificate and key ready:

server { 
    listen 443 default ssl;
    root /path/to/source;
    server_name mydomain;

    ssl_certificate      /path/to/cert;
    ssl_certificate_key  /path/to/key;
@chrisvoncsefalvay
chrisvoncsefalvay / nginx.conf
Created November 6, 2017 11:57 — forked from lciolecki/nginx.conf
Nginx config for django rest framework + angular application
server {
listen 80;
listen 443 ssl;
server_name your-domain.com;
charset utf-8;
client_max_body_size 32M;
root /project/static;
index index.html;
@chrisvoncsefalvay
chrisvoncsefalvay / keybase.md
Created September 8, 2017 19:40
keybase.md

Keybase proof

I hereby claim:

  • I am chrisvoncsefalvay on github.
  • I am chrisvcsefalvay (https://keybase.io/chrisvcsefalvay) on keybase.
  • I have a public key ASBW46UZB1-aXHVxnMvOhck6NEvMlQsjiOP7sqxQOuQ3Vgo

To claim this, I am signing this object:

@chrisvoncsefalvay
chrisvoncsefalvay / pipeline.py
Created May 24, 2017 18:53 — forked from sampsyo/pipeline.py
multithreaded pipelines for Python coroutines
"""Simple but robust implementation of generator/coroutine-based
pipelines in Python. The pipelines may be run either sequentially
(single-threaded) or in parallel (one thread per pipeline stage).
This implementation supports pipeline bubbles (indications that the
processing for a certain item should abort). To use them, yield the
BUBBLE constant from any stage coroutine except the last.
In the parallel case, the implementation transparently handles thread
shutdown when the processing is complete and when a stage raises an
@chrisvoncsefalvay
chrisvoncsefalvay / bootstrap.sh
Last active April 30, 2017 21:17
CentOS dev env
sudo yum -y install yum-utils
sudo yum -y groupinstall development
sudo yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel
sudo yum install -y wget
# Python 3 IUS
sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm
sudo yum -y install python36u
sudo yum -y install python36u-pip
sudo yum -y install python36u-devel
@chrisvoncsefalvay
chrisvoncsefalvay / CONTEXT_IMPORTING.md
Last active April 12, 2017 20:00
Context importing in Python

Shamelessly stolen from Kenneth Reitz.

@chrisvoncsefalvay
chrisvoncsefalvay / humanized_join_list.py
Created February 8, 2017 22:19
All sorts of useful Python hacks...
def humanized_join_list(item_list: Union[List, Tuple], ordinary_separator: str = ", ", final_separator=" and "):
return final_separator.join([ordinary_separator.join(item_list[:-1]), item_list[-1]] if len(item_list) > 2 else
item_list)
@chrisvoncsefalvay
chrisvoncsefalvay / install.sh
Created December 4, 2016 21:18
Install GQRX and all its dependencies for OS X
brew tap godber/godber
brew update
brew install gnuradio
brew install rtl-sdr
brew install hackrf
brew install gnuradio-osmosdr
brew install gqrx
brew linkapps gqrx
@chrisvoncsefalvay
chrisvoncsefalvay / README.md
Last active November 16, 2016 22:05
LiveCapture

LiveCapture 📸

LiveCapture is a tool to experiment with computer vision, in particular with image processing. The workflow is quite simple.

  1. You write a processing function, which takes a logger and an image.
  2. You run the script including the processing function.
  3. From a live view of the camera, you capture a frame using the Esc key.
  4. The capture is then run through your processing functions. The results are logged in log.html using visual-logging.
@chrisvoncsefalvay
chrisvoncsefalvay / install.sh
Last active November 7, 2016 00:54
OpenCV installation script (OS X + Python 3.5 + OpenCV 3.1.0)
pip install --upgrade pip
pip install numpy scipy matplotlib scikit-learn
pip install -U scikit-image
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D PYTHON3_PACKAGES_PATH==~/.virtualenvs/cv3/lib/python3.5/site-packages \
-D PYTHON3_LIBRARY=/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5m.dylib \
-D PYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/include/python3.5m \
-D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=ON \