Skip to content

Instantly share code, notes, and snippets.

RNB Developer rodrigobertin

Block or report user

Report or block rodrigobertin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View range_date.py
from datetime import timedelta, date
def daterange(date1, date2):
for n in range(int ((date2 - date1).days)+1):
yield date1 + timedelta(n)
start_dt = date(2015, 12, 20)
end_dt = date(2016, 1, 11)
for dt in daterange(start_dt, end_dt):
print(dt.strftime("%Y-%m-%d"))
View post-receive.sh
#!/bin/bash
export GIT_WORK_TREE=/mnt/websites/sites/AdminPanelRNB/WEBSITES/escueladeskate.com.ar #Carpeta publica donde se copian los archivos
export GIT_DIR=/mnt/websites/sites/AdminPanelRNB/REPOS/escueladeskate.com.ar.git #Carpeta del repositorio git
echo "-------------------------------------------------------------------------->"
echo "--------------------- Actualizando Rama MASTER --------------------------->"
echo "-------------------------------------------------------------------------->"
git --work-tree=$GIT_WORK_TREE --git-dir=$GIT_DIR checkout -f
echo "-------------------------------------------------------------------------->"
View gulpfile.js
//========== Gulp ===============//
const {src,dest,parallel,task,watch}=require('gulp');
const concat =require('gulp-concat'), //concatenar js
uglify =require('gulp-uglify'), //minificar js
browserSync =require('browser-sync').create(), //browser sync
reload =browserSync.reload,//reload
plumber =require('gulp-plumber'), //errores
sass =require('gulp-sass'),
postcss =require('gulp-postcss'),//post CSS
cssnano =require('cssnano'),
View fix_gulp.sh
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
View gulpfile.js
//========== Gulp ===============//
var gulp =require('gulp'), //gulp basico
concat =require('gulp-concat'), //concatenar js
uglify =require('gulp-uglify'), //minificar js
browserSync =require('browser-sync'), //browser sync
reload =browserSync.reload,//reload
plumber =require('gulp-plumber'), //errores
sass =require('gulp-sass'),
postcss =require('gulp-postcss'),//post CSS
cssnano =require('cssnano'),
View flash_erorrs.py
def flash_errors(form):
"""
Errores de formulario
:param form:
:return:
"""
for field, errors in form.errors.items():
for error in errors:
flash(u"Error en %s campo - %s" % (
getattr(form, field).label.text,
View index.base.html
{% extends "bootstrap/base.html" %}
{% block html_attribs %} lang="es"{% endblock %}
{% block title %}Title page{% endblock %}
{% block head %}
{{ super() }}
<link rel="shortcut icon" href="{{ url_for('static',filename='/img/icons/favicon.ico') }}" type="image/x-icon"/>
View docker.sh
docker run -d --name local.dev -v /home/rnb/SITES:/var/www/html -v /home/rnb/Docker/Volumes/Vhost:/etc/apache2/sites-enabled -v /home/rnb/Docker/Volumes/SitesAvailables/:/etc/apache2/sites-available -p 8080:80 --link mysql.dev:mysql.local rodrigobertin/local.dev
View template_mail_flask.html
{% set color = '#FFD200' %}
<html lang="es" style="overflow-x: hidden;margin:0">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Consulta Web</title>
</head>
<body style="overflow-x:hidden; margin:0">
View Dockerfile
FROM ubuntu:16.04
MAINTAINER Rodrigo Bertin <rodrigonbertin@gmail.com>
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y install software-properties-common
RUN export LANG=C.UTF-8
ENV LANG=C.UTF-8
ENV FOLDER_SITE=/var/www/html
You can’t perform that action at this time.