Skip to content

Instantly share code, notes, and snippets.

View delgadofarid's full-sized avatar

Farid Delgado delgadofarid

View GitHub Profile
@delgadofarid
delgadofarid / ldap_mysql.sh
Created August 24, 2018 19:33
Getting LDAP data and Updating MySQL
#!/bin/bash
# Current time function
NOW=$(date +"%Y-%m-%d_%H-%M-%S")
# Set output file name
FILE="/tmp/inactive_users.$NOW.csv"
#ldapsearch -x \
# -H "CHANGEIT" \ # -> LDAP HOST & PORT
# -b "CHANGEIT" \ # -> OU USER LOCATION
@delgadofarid
delgadofarid / models.py
Created June 16, 2018 17:17
Corrección Manual Django Semana 2 - 5. Modelos de Django
from django.db import models
from django.utils import timezone
class Post(models.Model):
author = models.ForeignKey(
'auth.User',
on_delete=models.CASCADE, #Cambio incluido
)
title = models.CharField(max_length=200)
text = models.TextField()
{
"active": true,
"address": "Calle 32 # 38 D 10",
"birthDate": "1990-11-14T00:00:00-05:00",
"creationDate": "2017-08-20T19:15:00-05:00",
"email": "client@client.com",
"genre": "M",
"identification": "100",
"lang": "ES",
"lastname": "Cliente",
@delgadofarid
delgadofarid / HelloWorld.txt
Last active November 8, 2017 16:41
This is a test description
print "This is my first Gist!";