Skip to content

Instantly share code, notes, and snippets.

@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;
@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 / 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 / README.md
Created July 18, 2020 12:35 — forked from mau21mau/README.md
Configure Celery + Supervisor With Django
@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 / 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 / gource-multiple-repositories.sh
Created March 5, 2021 12:52 — forked from derEremit/gource-multiple-repositories.sh
Generates gource video out of multiple repositories.
#!/usr/bin/env bash
# Generates gource video (h.264) out of multiple repositories.
# Pass the repositories in command line arguments.
# Example:
# <this.sh> /path/to/repo1 /path/to/repo2
RESOLUTION="1600x1080"
outfile="gource.mp4"
i=0
@muneneevans
muneneevans / DOCKER_COMPOSE.md
Created June 5, 2021 11:53 — forked from GabrielCzar/DOCKER_COMPOSE.md
Docker compose samples

Scripts to run specific services

@muneneevans
muneneevans / Confetti.tsx
Created August 6, 2021 09:26 — forked from ShopifyEng/Confetti.tsx
Building Arrive's Confetti in React Native with Reanimated - Confetti Final
import React, {useMemo} from 'react'
import Animated from 'react-native-reanimated'
import {View, Dimensions, StyleSheet} from 'react-native'
import FastImage from 'react-native-fast-image'
import ConfettiImage from 'assets/images/confetti.png'
const NUM_CONFETTI = 100
const COLORS = ['#00e4b2', '#09aec5', '#107ed5']
const CONFETTI_SIZE = 16
@muneneevans
muneneevans / Dockerfile
Created August 11, 2021 19:49 — forked from nolram/Dockerfile
Docker-compose: Django + Postgis + RabbitMQ + Celery + Redis
FROM python:3.5
MAINTAINER Marlon Baptista de Quadros(marlonbaptista@hotmail.com)
ENV PYTHONUNBUFFERED 1
RUN apt-get update -y
RUN apt-get -y install binutils libproj-dev gdal-bin postgresql-client python3-lxml
RUN apt-get -y install libmemcached-dev