Skip to content

Instantly share code, notes, and snippets.

View leMaik's full-sized avatar

Maik Marschner leMaik

View GitHub Profile
@orenitamar
orenitamar / Dockerfile
Last active March 22, 2024 05:13
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib
# in an Alpine based Docker image.
FROM alpine:3.4
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install numpy scipy pandas matplotlib
@mgax
mgax / cleanup.py
Created December 23, 2013 12:21
Clean up old backups
#!/usr/bin/env python
# encoding: utf-8
import re
from datetime import date
from path import path
class BackupPrune:
@thebookworm101
thebookworm101 / gist:7928391
Created December 12, 2013 14:03
This is what i did to get the ace editor working with sharejs @0.7
/*
Most stuff up here seemed to need no change the orginal unmodified may be found here:
https://github.com/share/ShareJS/blob/0.6/webclient/ace.js
ideally you should be able to use it thus:
sjs = new window.sharejs.Connection(sock);
var doc = sjs.get('users', 'blah ' + Math.random());
doc.attach_ace(editor); // editor here here is some ace editor object i.e: var editor = ace.edit("editor");
###############
@bellbind
bellbind / difffeq.js
Created September 26, 2013 08:15
[nodejs][javascript]numerical analysis of differential equations
// analysis of differential equations
// parameters
// f: differential equation dy/dx = f(x, y)
// y0, x0: initial values
// h: small value of diff x
// n: calc count, xn = x0 + n*h
var eular = function (f, y0, x0, h, n) {
var y = [y0], x = [x0];
@alertor
alertor / jira-behing-nginx-ssl
Last active April 27, 2023 15:45
Atlassian JIRA behind nginx + SSL
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {