https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/
$ pip install celery
$ sudo apt-get install rabbitmq-server
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; |
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
#!/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 |
https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/
$ pip install celery
$ sudo apt-get install rabbitmq-server
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/ |
#!/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 |
Scripts to run specific services
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 |
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 |