Skip to content

Instantly share code, notes, and snippets.

@muneneevans
muneneevans / docker_wordpress.md
Created December 17, 2020 09:12 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@muneneevans
muneneevans / Dockerfile
Created September 19, 2020 08:40 — forked from nosahama/Dockerfile
django, postgres, redis, celery, nginx, uwsgi docker setup
FROM python:latest
ADD requirements.txt /requirements.txt
RUN python3.6 -m venv /venv \
&& /venv/bin/pip install -U pip \
&& LIBRARY_PATH=/lib:/usr/lib /bin/sh -c "/venv/bin/pip install --no-cache-dir -r /requirements.txt"
ENV PYTHONUNBUFFERED 1
# Copy your application code to the container (make sure you create a .dockerignore file if any large files or directories should be excluded)
RUN mkdir /code/
@muneneevans
muneneevans / README.md
Created July 18, 2020 12:35 — forked from mau21mau/README.md
Configure Celery + Supervisor With Django
@muneneevans
muneneevans / owner_to.sh
Created July 8, 2020 08:33 — forked from dmutende/owner_to.sh
ALTER owner to tables, sequences and views on PostgreSQL databases using bash
#!/bin/bash
DB=[YOUR_DB_NAME]
OWNER=[NEW_OWNER]
# alter tables owner
for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" $DB` ; do psql -c "alter table \"$tbl\" owner to $OWNER" $DB ; done
# alter sequences owner
for tbl in `psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" $DB` ; do psql -c "alter table \"$tbl\" owner to $OWNER" $DB ; done
@muneneevans
muneneevans / cors-nginx.conf
Created May 15, 2020 09:23 — forked from michiel/cors-nginx.conf
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@muneneevans
muneneevans / animate.js
Created April 28, 2020 07:05 — forked from shafayeatsumit/animate.js
Example: React Native Maps smooth animation to coordinate and region.
import React, { Component } from 'react';
import {TouchableOpacity, Image,StyleSheet,Dimensions, View, Text, Animated, Easing, PanResponder, Platform } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { MapView } from 'expo';
import DateTimePicker from 'react-native-modal-datetime-picker';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE_DELTA = 0.006339428281933124;
const LONGITUDE_DELTA = LATITUDE_DELTA * ASPECT_RATIO;