Skip to content

Instantly share code, notes, and snippets.

View bienvenidosaez's full-sized avatar

Bienvenido Sáez Muelas bienvenidosaez

  • Junta de Andalucía
  • Motril
View GitHub Profile
alias start_ngrok='./ngrok http 8000'
@bienvenidosaez
bienvenidosaez / bck_python_folder_mega.py
Created March 21, 2015 12:34
Python Folder Backup in MEGA
#!/usr/bin/python
# -*- encoding: utf-8 -*-
######################################################################################################
## ##
## SCRIPT EN PYTHON PARA EL RESPALDO DE DIRECTORIOS Y SUBIDA A MEGA ##
## ##
## Almacenará tres tipos de copia: ##
## - Diarias: el sistema realizará una copia diaria por carpeta eliminará aquellas ##
## que tengan más de N_DAYS_AGO_DIARY_BACKUP días de antiguedad ##
@bienvenidosaez
bienvenidosaez / bck_python_postgres_mega.py
Last active September 29, 2015 09:35
Python Postgres Backup in MEGA
#!/usr/bin/python
# -*- encoding: utf-8 -*-
######################################################################################################
## ##
## SCRIPT EN PYTHON PARA EL RESPALDO DE BASES DE DATOS POSTGRES Y SUBIDA A MEGA ##
## ##
## Almacenará tres tipos de copia: ##
## - Diarias: el sistema realizará una copia diaria por base de datos y eliminará aquellas ##
## que tengan más de N_DAYS_AGO_DIARY_BACKUP días de antiguedad ##
@bienvenidosaez
bienvenidosaez / gist:17a0f165c18815b95bc1
Created February 22, 2015 21:20
Primeros vuelos programados
var arDrone = require('ar-drone');
var client = arDrone.createClient();
client.takeoff();
client
.after(5000, function() {
this.front(0.2);
})
.after(3000, function() {
#!/bin/bash
#
# The MIT License
#
# Copyright 2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# ~/.tmux.conf
# Colores de la barra inferior
set -g default-terminal "screen-256color"
set-option -g status-bg blue
set-option -g status-fg white
set -g mouse on
# default window title colors
set-window-option -g window-status-fg colour244
@bienvenidosaez
bienvenidosaez / Utiles Postgres
Last active November 12, 2015 11:40
Postgres con Django
# Útiles para el uso de Postgres con Django
#Instalación en Ubuntu, sin tener activado entornos virtuales
sudo apt-get update
sudo apt-get install libpq-dev python-dev
sudo apt-get install postgresql postgresql-contrib
#Para cualquier uso de postgres cambiar al usuario postgres
sudo su - postgres
#!/bin/bash
NAME="hello_app" # Name of the application
DJANGODIR=/webapps/hello_django/hello # Django project directory
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket
USER=hello # the user to run as
GROUP=webapps # the group to run as
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name
@bienvenidosaez
bienvenidosaez / gist:916155351282de419481
Last active August 29, 2015 14:06
SublimeText2Configuration
{
//Atajos
// CMD+J - CMD+1 = Contrae todo el archivo
// CMD+J + CMD+K = Expande todo el archivo
"Seti_SB_big": false,
"Seti_SB_med": true,
"Seti_sb_no_icons": false,
"Seti_sb_tree_med": true,
"color_scheme": "Packages/Seti_UI/Scheme/Seti.tmTheme",
"font_size": 18,